Prefix: how to prevent the linker to prepend -L/usr/lib/../lib64 ?
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/libXXX.so" emerge YYY.
Any thoughts on what what I am doing wrong?
Thanks for your help.
Regards,
Nicolas
10-24-2011, 03:36 AM
Martin Luessi
Prefix: how to prevent the linker to prepend -L/usr/lib/../lib64 ?
Nicolas,
On Sun, Oct 23, 2011 at 9:47 PM, Nicolas Pinto <nicolas.pinto@gmail.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/libXXX.so" 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
10-24-2011, 08:06 AM
Fabian Groffen
Prefix: how to prevent the linker to prepend -L/usr/lib/../lib64 ?
On 23-10-2011 23:36:12 -0400, Martin Luessi wrote:
> 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.
Oh, thanks for the hint. I guess we should either mask vanilla, or
apply the critial prefix patches for this regardless of USE=vanilla.
Mind filing a bug for this?
Thanks a lot for the insight!
--
Fabian Groffen
Gentoo on a different level
12-08-2011, 05:05 AM
Nicolas Pinto
Prefix: how to prevent the linker to prepend -L/usr/lib/../lib64 ?
I was indeed using USE=vanilla to get gcc 4.5.3 to compile and it
appears that all my issues where caused by this useflag.
So I removed this useflag and masked >sys-devel/gcc-4.2.4-r01.
Thanks a lot!
Regards,
Nicolas
On Mon, Oct 24, 2011 at 4:06 AM, Fabian Groffen <grobian@gentoo.org> wrote:
> On 23-10-2011 23:36:12 -0400, Martin Luessi wrote:
>> 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.
>
> Oh, thanks for the hint. *I guess we should either mask vanilla, or
> apply the critial prefix patches for this regardless of USE=vanilla.
>
> Mind filing a bug for this?
>
> Thanks a lot for the insight!
>
>
> --
> Fabian Groffen
> Gentoo on a different level
>
--
Nicolas Pinto
http://web.mit.edu/pinto
12-08-2011, 12:39 PM
Jeremy Olexa
Prefix: how to prevent the linker to prepend -L/usr/lib/../lib64 ?
On Thu, Dec 8, 2011 at 12:05 AM, Nicolas Pinto <nicolas.pinto@gmail.com> wrote:
> I was indeed using USE=vanilla to get gcc 4.5.3 to compile and it
> appears that all my issues where caused by this useflag.
>
> So I removed this useflag and masked >sys-devel/gcc-4.2.4-r01.
You shouldn't need to mask it (anymore), see bug 289757. Please test
if you have time.
-Jeremy
>
> Thanks a lot!
>
> Regards,
>
> Nicolas
>
> On Mon, Oct 24, 2011 at 4:06 AM, Fabian Groffen <grobian@gentoo.org> wrote:
>> On 23-10-2011 23:36:12 -0400, Martin Luessi wrote:
>>> 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.
>>
>> Oh, thanks for the hint. *I guess we should either mask vanilla, or
>> apply the critial prefix patches for this regardless of USE=vanilla.
>>
>> Mind filing a bug for this?
>>
>> Thanks a lot for the insight!
>>
>>
>> --
>> Fabian Groffen
>> Gentoo on a different level
>>
>
>
>
> --
> Nicolas Pinto
> http://web.mit.edu/pinto
>