Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: User

about LIBRARY_PATH

 

 

Gentoo user RSS feed   Index | Next | Previous | View Threaded


dongfangxunlei at gmail

Aug 11, 2013, 7:49 PM

Post #1 of 6 (19 views)
Permalink
about LIBRARY_PATH

It seems that this variable is hard-code by gcc.I cannot change it any
more.When I use gcc -m32 to compile a 32bit program,gcc is looking for
/usr/lib rather than /usr/lib32.But in my system,/usr/lib is a symlink to
/usr/lib64.The real 32bit librarys is in /usr/lib32.The linker is always
complaining about "i386:x86-64 architecture of input file
`/usr/lib/gcc/x86_64-pc-linux-gnux32/4.7.3/../../../../lib/crt1.o' is
incompatible with i386 output.".Why does it not search /usr/lib32?


adamcarter3 at gmail

Aug 11, 2013, 8:03 PM

Post #2 of 6 (18 views)
Permalink
Re: about LIBRARY_PATH [In reply to]

I thought LD_LIBRARY_PATH was old skool and now ppl use ldconfig, so man
ldconfig.


dongfangxunlei at gmail

Aug 11, 2013, 9:12 PM

Post #3 of 6 (15 views)
Permalink
Re: about LIBRARY_PATH [In reply to]

LIBRARY_PATH is not LD_LIBRARY_PATH.


2013/8/12 Adam Carter <adamcarter3 [at] gmail>

> I thought LD_LIBRARY_PATH was old skool and now ppl use ldconfig, so man
> ldconfig.
>


idontknw.wang at gmail

Aug 11, 2013, 10:34 PM

Post #4 of 6 (11 views)
Permalink
Re: about LIBRARY_PATH [In reply to]

2013/8/12 东方巽雷 <dongfangxunlei [at] gmail>:
> It seems that this variable is hard-code by gcc.I cannot change it any
> more.When I use gcc -m32 to compile a 32bit program,gcc is looking for
> /usr/lib rather than /usr/lib32.But in my system,/usr/lib is a symlink to
> /usr/lib64.The real 32bit librarys is in /usr/lib32.The linker is always
> complaining about "i386:x86-64 architecture of input file
> `/usr/lib/gcc/x86_64-pc-linux-gnux32/4.7.3/../../../../lib/crt1.o' is
> incompatible with i386 output.".Why does it not search /usr/lib32?

Well, you can always emerge crossdev and crossdev i686-pc-linux-gnu then... (-:

PS: A quick check on my system shows this:

# [08/12 13:27:52] xenon [at] ribosom ~ $
gcc -m32 -v --version 2>&1 | grep LIBRARY_PATH
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/32/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../lib32/:/lib/../lib32/:/usr/lib/../lib32/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../:/lib/:/usr/lib/
# [08/12 13:28:00] xenon [at] ribosom ~ $
gcc -v --version 2>&1 | grep LIBRARY_PATH
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../:/lib/:/usr/lib/

So the lib32 paths are actually included in the library search path,
and correctly placed *before* the lib counterparts. I'm not sure how
your toolchain ends up in the state you described, but it's certainly
weird... Can you please provide the output of "emerge --info" and "gcc
-v --version"? This way people will have more clue to help you...


ssuominen at gentoo

Aug 12, 2013, 2:07 AM

Post #5 of 6 (11 views)
Permalink
Re: about LIBRARY_PATH [In reply to]

On 12/08/13 05:49, 东方巽雷 wrote:
> It seems that this variable is hard-code by gcc.I cannot change it any
> more.When I use gcc -m32 to compile a 32bit program,gcc is looking for
> /usr/lib rather than /usr/lib32.But in my system,/usr/lib is a symlink
> to /usr/lib64.The real 32bit librarys is in /usr/lib32.The linker is
> always complaining about "i386:x86-64 architecture of input file
> `/usr/lib/gcc/x86_64-pc-linux-gnux32/4.7.3/../../../../lib/crt1.o' is

You have a x32 system?

> incompatible with i386 output.".Why does it not search /usr/lib32?


dongfangxunlei at gmail

Aug 12, 2013, 5:22 AM

Post #6 of 6 (10 views)
Permalink
Re: about LIBRARY_PATH [In reply to]

I think the gcc version with x32 abi is faster.So I install a x32 version
on amd64.Now I have solved my problem by creating a new gcc specs
file.Thank you all the same.


2013/8/12 Samuli Suominen <ssuominen [at] gentoo>

> On 12/08/13 05:49, ¶«·½ÙãÀ× wrote:
>
>> It seems that this variable is hard-code by gcc.I cannot change it any
>> more.When I use gcc -m32 to compile a 32bit program,gcc is looking for
>> /usr/lib rather than /usr/lib32.But in my system,/usr/lib is a symlink
>> to /usr/lib64.The real 32bit librarys is in /usr/lib32.The linker is
>> always complaining about "i386:x86-64 architecture of input file
>> `/usr/lib/gcc/x86_64-pc-linux-**gnux32/4.7.3/../../../../lib/**crt1.o' is
>>
>
> You have a x32 system?
>
>
> incompatible with i386 output.".Why does it not search /usr/lib32?
>>
>
>
>

Gentoo user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.