hydra-users
[Top][All Lists]
Advanced

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

Re: i686-solaris


From: Ludovic Courtès
Subject: Re: i686-solaris
Date: Fri, 12 Jul 2013 13:54:21 +0200
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Vincent Lefevre <address@hidden> skribis:

> On 2013-07-12 11:15:15 +0200, Ludovic Courtès wrote:
>> Vincent Lefevre <address@hidden> skribis:
>> > On 2013-07-12 09:25:59 +0200, Zimmermann Paul wrote:
> [...]
>> >> configure:15350: gcc -std=gnu99 -o conftest -Wall -Wmissing-prototypes 
>> >> -Wpointer-arith -m32 -O2 -pedantic -fomit-frame-pointer -mtune=pentium2 
>> >> -march=pentium2 -ffloat-store 
>> >> -I/nix/store/yz4r78ssvhz4cc0xj4z9mv98m2xz9q97-gmp-4.3.2/include 
>> >> -L/nix/store/yz4r78ssvhz4cc0xj4z9mv98m2xz9q97-gmp-4.3.2/lib conftest.c 
>> >> -lgmp  >&5
>> >> configure:15350: $? = 0
>> >> configure:15350: ./conftest
>> >> gmp.h: 4.3.2 / libgmp: 4.3.1
> [...]
>> > It would be surprising to have a wrong GMP installation. I have the
>> > impression that libgmp 4.3.1 comes from a system-wide installation,
>> > e.g. /usr/lib,
>> 
>> Yes, but we provide explicit -I and -L flags pointing to 4.3.2 (see
>> above; this comes from mpfr/release.nix.)
>
> I thought they came from --prefix (in which case the problem would not
> be specific to Hydra), but there may be something hidden in the logs.

It’s set via CPPFLAGS and LDFLAGS, as in:

  ./configure ... CPPFLAGS="-I..." LDFLAGS="-L..."

>> However, it may be that ./conftest above is picking /usr/lib/libgmp.so
>> at run time, presumably because /nix/store/...-gmp-4.3.2/lib is not in
>> the loader’s search path.  Nixpkgs’s ld-wrapper normally adds it to the
>> RPATH [0], but perhaps this has lower precedence than /usr/lib?
>
> It didn't: there's no trace of -rpath in the above gcc line.

I know, but the ‘gcc’ command here is actually a shell script that wraps
the real ‘gcc’; among other things, it invokes a wrapper around ‘ld’.
The ‘ld’ wrapper adds -rpath for all the libs:

  
https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/gcc-wrapper/ld-wrapper.sh

> And $LD_RUN_PATH was not predefined either.

OK.

Now, how does Solaris’ loader choose between the standard directories
(/lib and /usr/lib) vs. what’s in the RPATH?

Also, GNU ld appears to behave slightly differently on Solaris that on
GNU (info "(ld) Options").  My understanding is that it should not have
any visible effect here, though, but the devil is in the details...

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]