pkgsrc-Users archive

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

Re: general problem with pkgsrc on 64bit linux

On Monday 21 January 2008 16:51:56 Joerg Sonnenberger wrote:
> On Mon, Jan 21, 2008 at 10:30:10AM -0500, Greg Troxel wrote:
> >   Well, I think the problem comes from the fact that the guy's Linux
> > system has 3rd party software installed under system directories, like
> > /usr/lib64. So for example, GTK2 libraries are dumped under /usr/lib64,
> > when pkgsrc tries to build and link to its own GTK2 libraries, the linker
> > first searches system directories and tries to link to the wrong
> > libraries.
> >
> > This should be ok.  The question IMHO is why is pkgsrc using /usr/lib64
> > before /usr/pkg/lib.  If that's fixed, this should work.
> It is *not* pkgsrc. A random number of configure scripts do that though.
> Joerg

This might work. Create gcc wrapper scripts.

# which gcc

# mv /usr/bin/gcc /usr/bin/gcc.orig
# mv /usr/bin/g++ /usr/bin/g++.orig

# mkdir /home/myname/compiler_wrappers

# cat /home/myname/compiler_wrappers/gcc
LDOPT="-Wl,-L/usr/pkg/lib -Wl,-R/usr/pkg/lib"
exec /usr/bin/gcc.orig $LDOPT "$@"

# cat /home/myname/compiler_wrappers/g++
LDOPT="-Wl,-L/usr/pkg/lib -Wl,-R/usr/pkg/lib"
exec /usr/bin/g++.orig $LDOPT "$@"

# chmod +x /home/myname/compiler_wrappers/*
# export PATH=/home/myname/compiler_wrappers:$PATH

And then build packages

Home | Main Index | Thread Index | Old Index