Iain Buchanan wrote:
> On Wed, 2007-08-15 at 13:23 +0200, Andreas Niederl wrote:
>> Iain Buchanan wrote:
>>> On Mon, 2007-08-13 at 08:02 +0200, Andreas Niederl wrote:
> 
>> [...]
>>>> My own little workaround:
>>>> echo 'LDPATH="/lib:/usr/lib:/usr/local/lib"' >> /etc/env.d/04basic-ldpath
>>>> env-update
>>> I tried that, but eix still fails with the same error...  Or do I have
>>> to rebuild the system again?!
>> No, eix still takes the wrong libstdc++.so.6 and rebuilding won't likely
>> change that.
>> Whats the output of the libstdc++ section, if you call eix with LD_DEBUG
>> like `LD_DEBUG=libs eix`?
> 
> the current eix (0.9.9) shows this (and a whole lotta other stuff):
> 
> $ LD_DEBUG=libs eix
>      18778:     find library=libstdc++.so.6 [0]; searching
>      18778:      search path=/usr/lib/fglrx             (LD_LIBRARY_PATH)
>      18778:       trying file=/usr/lib/fglrx/libstdc++.so.6
>      18778:      search cache=/etc/ld.so.cache
>      18778:       trying 
> file=/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libstdc++.so.6
> [snip]
>      18778:     calling init: 
> /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/libstdc++.so.6
> 
>> You could directly query the exported CXXABI versions of different
>> libstdc++ libraries in the same order as they are tried by the dynamic
>> linker by pasting the following loop into your shell:
>>
>> while read dir ; do
>>   if [ -r $dir/libstdc++.so.6 ] ; then
>>     echo $dir:
>>     readelf -a $dir/libstdc++.so.6 | grep Rev | grep CXXABI
>>   fi
>> done < /etc/ld.so.conf
> 
> /usr/lib/gcc/i686-pc-linux-gnu/3.4.6:
>   0x00a4: Rev: 1  Flags: none  Index: 6  Cnt: 1  Name: CXXABI_1.3
> /usr/lib/gcc/i686-pc-linux-gnu/4.1.2:
>   0x0158: Rev: 1  Flags: none  Index: 11  Cnt: 1  Name: CXXABI_1.3
>   0x0174: Rev: 1  Flags: none  Index: 12  Cnt: 2  Name: CXXABI_1.3.1
> /usr/lib/gcc/i686-pc-linux-gnu/4.2.0:
>   0x017c: Rev: 1  Flags: none  Index: 12  Cnt: 1  Name: CXXABI_1.3
>   0x0198: Rev: 1  Flags: none  Index: 13  Cnt: 2  Name: CXXABI_1.3.1
> 
> 
> But what does it all _mean_ Basil? (gratuitous bad movie quote...)
[...]

Just that the first libstdc++.so.6 found by ld.so doesn't have
CXXABI_1.3.1 which is apparently needed by eix.
If you look into your /etc/ld.so.conf you'll see some directories listed
which ld.so will probe from the top downwards when it searches for
dynamically linked libraries. In your case the gcc library directories
are in the wrong order.

My guess is that you should reverse them.

The search order is specified by the LDPATH variables in the
/etc/env.d/* files. env-update reads these files sorted alphabetically
concatenates the found LDPATHs and writes it into /etc/ld.so.conf.

The LDPATH for gcc should be in /etc/env.d/05gcc, I imagine something
like
LDPATH="/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/:/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/:/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/"
standing in your version of this file. For reversing the search order
simply reverse this variable so that it reads:
LDPATH="/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/:/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/:/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/"
and do a env-update.

The reason for the search path being in the wrong order is probably some
bug in gcc-config or eselect-compiler, whichever you are using. At least
I can't think of another reason.


Regards,
Andi
-- 
[EMAIL PROTECTED] mailing list

Reply via email to