Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 420129 - dev-lang/tcl-8.5.10-r1 (maybe others): tclConfig.h should not prepend '-L/usr/lib[64]' in *_LIB_SPEC variables.
Summary: dev-lang/tcl-8.5.10-r1 (maybe others): tclConfig.h should not prepend '-L/usr...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal blocker (vote)
Assignee: TCL/TK Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-07 16:06 UTC by Ian Stakenvicius (RETIRED)
Modified: 2013-01-09 16:36 UTC (History)
1 user (show)

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


Attachments
patch to remove '-L/usr/lib[64]' from *_LIB_SPEC in tclConfig.sh (tcl-update.patch,1.28 KB, patch)
2012-06-07 16:06 UTC, Ian Stakenvicius (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Stakenvicius (RETIRED) gentoo-dev 2012-06-07 16:06:36 UTC
Created attachment 314603 [details, diff]
patch to remove '-L/usr/lib[64]' from *_LIB_SPEC in tclConfig.sh

As tclConfig.h included -L/usr/lib64 (and presumably -L/usr/lib, on 32bit archs) with all of the *_LIB_SPEC variables, this can cause issues when building libs that depend on tcl.  If such a lib (in my case, the tcl and tk extensions in media-gfx/graphviz) links its tcl components against other internal libs, then libtool will erroneously link against already installed system versions instead of versions within $WORKDIR.

As an example, emerge graphviz-2.26.* (which installs libgvc.so.5), then upgrade to graphviz-2.28.0 with USE="tcl" enabled (which builds and installs libgvc.so.6).  Running the following:

for ech in `equery f graphviz |grep -e 'usr/bin' -e 'usr/lib.*\.so'` ; do scanelf -n $ech; done |grep libgvc.so |grep -v libgvc.so.6

...will show that all of the tcl libraries are linked against libgvc.so.5 instead of libgvc.so.6


Removing -L/usr/lib64 from the *_LIB_SPEC variables in tclConfig.h resolves this issue.

The attached patch to tcl-8.5.10-r1.ebuild modifies the sed rules to tclConfig.sh to bring about the desired results.  Note that I modified all four *_LIB_SPEC variables rather than checking to see which ones in particular are used by graphviz.
Comment 1 Justin Lecher (RETIRED) gentoo-dev 2012-06-07 16:36:36 UTC
+*tcl-8.5.11-r1 (07 Jun 2012)
+
+  07 Jun 2012; Justin Lecher <jlec@gentoo.org> +tcl-8.5.11-r1.ebuild:
+  Drop standard lib locataion from tclConfig.sh, #420129; thanks Ian
+  Stakenvicius for the patch
+
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2012-12-30 11:55:39 UTC
This commit totally broke entire tcl and tk, no reverse deps can be built anymore:

Bug 449134
Bug 377717
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2013-01-09 16:36:16 UTC
I more carefully patch the file. Should be save now.