Gentoo Archives: gentoo-alt

From: Martin Luessi <mluessi@×××××.com>
To: gentoo-alt@l.g.o
Subject: Re: [gentoo-alt] Prefix: how to prevent the linker to prepend -L/usr/lib/../lib64 ?
Date: Mon, 24 Oct 2011 03:37:03
In Reply to: [gentoo-alt] Prefix: how to prevent the linker to prepend -L/usr/lib/../lib64 ? by Nicolas Pinto

On Sun, Oct 23, 2011 at 9:47 PM, Nicolas Pinto <nicolas.pinto@×××××.com> wrote:
> Hello, > > Many of the build problems I'm having with Gentoo Prefix come from the > fact that gcc/ld has "hardcoded" linker search paths (e.g. -L > /usr/lib/../lib64) coming *before* the gentoo prefix ones (i.e. > $EPREFIX/usr/lib, etc.) and causing many packages to fail emerging on > most Linux distributions (CentOS, RedHat, Mandriva, Ubuntu, even > Gentoo itself) where the system libraries are incompatible. > > The only workaround I found is the ugly > LDFLAGS="-l:$EPREFIX/usr/lib/" emerge YYY. > > Any thoughts on what what I am doing wrong? > > Thanks for your help. > > Regards, > > Nicolas > >
Did you by any chance emerge gcc with the "vanilla" useflag enabled? I am asking since I had similar problems when I was installing gentoo-prefix on CentOS a few weeks ago. Gcc 4.5.3 wouldn't compile without the "vanilla" useflag enabled, so I enabled it. After that many packages failed to compile since they were being linked against system libraries instead of the prefix ones. What I did is mask gcc versions that are too new (>4.2.4 in my case) to be compatible with the CentOs glibc. Best, Martin