Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 373695 - blt-2.4z-darwin.patch cripples shared libs extension in dev-tcltk/blt-2.4z-r8, breaks dev-lang/python[tk]
Summary: blt-2.4z-darwin.patch cripples shared libs extension in dev-tcltk/blt-2.4z-r8...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: TCL/TK Project
URL:
Whiteboard:
Keywords:
: 373897 (view as bug list)
Depends on:
Blocks: 373691
  Show dependency tree
 
Reported: 2011-07-01 10:03 UTC by Honza Macháček
Modified: 2011-07-05 20:06 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
A corrected version of the blt-2.4z-darwin.patch, I hope. (blt-2.4z-darwin.patch,1.16 KB, text/plain)
2011-07-01 10:03 UTC, Honza Macháček
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Honza Macháček 2011-07-01 10:03:37 UTC
Created attachment 278773 [details]
A corrected version of the blt-2.4z-darwin.patch, I hope.

dev-lang/python[tk] does not compile:

x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -L. -Wl,-O1 -Wl,--as-needed -L. -fno-strict-aliasing -march=native -O2 -pipe -fwrapv -DNDEBUG -I. -IInclude -I./Include build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.2/work/Python-2.7.2/Modules/_tkinter.o build/temp.linux-x86_64-2.7/var/tmp/portage/dev-lang/python-2.7.2/work/Python-2.7.2/Modules/tkappinit.o -L/usr/X11/lib -L/usr/local/lib -L. -lBLT -ltk8.5 -ltcl8.5 -lX11 -lpython2.7 -o build/lib.linux-x86_64-2.7/_tkinter.so
*** WARNING: renaming "_tkinter" since importing it failed: build/lib.linux-x86_64-2.7/_tkinter.so: undefined symbol: jpeg_stdio_src

The undefined symbol comes from -lBLT through a broken symling in libdir:

> ls -l /usr/lib64/*BLT*
-rw-r--r-- 1 root root 1948056 Jul  1 11:44 /usr/lib64/libBLT24.a
-rwxr-xr-x 1 root root 1212136 Jul  1 11:44 /usr/lib64/libBLT24so
lrwxrwxrwx 1 root root      10 Jul  1 11:44 /usr/lib64/libBLT.a -> libBLT24.a
-rw-r--r-- 1 root root  380650 Jul  1 11:44 /usr/lib64/libBLTlite24.a
-rwxr-xr-x 1 root root  241912 Jul  1 11:44 /usr/lib64/libBLTlite24so
lrwxrwxrwx 1 root root      14 Jul  1 11:44 /usr/lib64/libBLTlite.a -> libBLTlite24.a
lrwxrwxrwx 1 root root      15 Jul  1 11:44 /usr/lib64/libBLTlite.so -> libBLTlite24.so
lrwxrwxrwx 1 root root      11 Jul  1 11:44 /usr/lib64/libBLT.so -> libBLT24.so

Instead of libBLT24.so and libBLTlite24.so there are libBLT24so and libBLTlite24so.

The cause is blt-2.4z-darwin.patch in dev-tcltk/blt-2.4z-r8 (introduced silently without release number increment! I've found a blt-2.4z-r8.ebuild without that patch at one of my boxes!).

The upstream developers of blt use, for reasons unknown to me, in the configure script the variable SHLIB_SUFFIX in two ways, in the first part of the script, while searching for various libraries, it contains the suffix without dot, and is concatenated as libname.${SHLIB_SUFFIX} but in the second part, while defining make rules, SHLIB_SUFFIX is supposed to contain the dot, it is concatenated as libname${SHLIB_SUFFIX}.

blt-2.4z-darwin.patch introduces SHLIB_SUFFIX="dylib" for Darwin in the first part, and then removes SHLIB_SUFFIX=".so" in the second part not to overwrite the first setting, missing the change in the dot use. The result likely breaks Darwin too, only HP-UX with its SHLIB_SUFFIX=".sl" intact in the second part of the configure script is save.

The patch should either unify the use throughout the configure script or leave the SHLIB_SUFFIX=".so" intact and add SHLIB_SUFFIX=".dylib" in the *-darwin*) section of the second part of the script, analogously to the *-hpux*) section there. I've used the second approach to let my python compile.
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2011-07-01 10:28:24 UTC
Thanks for that digging into the causes.

@prefix
Could you please fix this? I assume the patch is from you.
Comment 2 Fabian Groffen gentoo-dev 2011-07-01 12:00:37 UTC
Sorry for the hassle.  Analysis looks correct to me.  Feel free to drop the patch for the time being (cannot fix/test right now).
Comment 3 Fabian Groffen gentoo-dev 2011-07-01 14:56:09 UTC
I applied the fix from Honza and bumped to -r9.  Sorry for the breakage, thanks for the analysis and patch!
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-07-05 20:06:15 UTC
*** Bug 373897 has been marked as a duplicate of this bug. ***