pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/40692: imake, Solaris and GCC

>Number:         40692
>Category:       pkg
>Synopsis:       imake, Solaris and GCC
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 19 16:10:00 +0000 2009
>Originator:     Jörn Clausen
University of Bielefeld
SunOS spare4200 5.10 Generic_120012-14 i86pc i386 i86pc

When building packages that use imake on Solaris, using GCC as compiler and 
modular X11, the resulting binaries are missing a runpath to the X libraries. 
Examples are sysutils/xdu, x11/xearth and probably others:

$ ldd xearth =>    (file not found) =>    /usr/lib/ =>   /usr/lib/ =>  /usr/lib/ =>   (file not found) =>     /lib/ =>        /lib/ =>   /lib/ =>     /lib/ =>    /lib/ =>   /usr/openwin/lib/ =>    /lib/ =>    /lib/ =>   /lib/ =>  /lib/ =>         /lib/ =>   /lib/

The libraries found in /usr/lib (SM, ICE, Xext) are wrong, i.e. not the ones 
originally linked against.

The reason is, that imake defines the runpath by setting LD_RUN_PATH. This is 
ignored, because GCC internally passes the option '-R /path/to/gccs/libraries' 
to the linker, which takes precedence over LD_RUN_PATH, i.e. the latter is 

The imake rules are too convoluted for me to understand. This

#ifdef HasGcc3
#define HasLdRunPath NO

in turns off defining LD_RUN_PATH, but I can't find the magic formula to 
insert linker flags like "-R$(USRLIBDIRPATH)" or "-Wl,-R$(USRLIBDIRPATH)".

Note that e.g. graphics/xfig (see patch-ab) just Pull a Homer by unconditional 
changes like this:


Otherwise this package would be affected as well.

Home | Main Index | Thread Index | Old Index