public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] about LIBRARY_PATH
@ 2013-08-12  2:49 东方巽雷
  2013-08-12  3:03 ` Adam Carter
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: 东方巽雷 @ 2013-08-12  2:49 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

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?

[-- Attachment #2: Type: text/html, Size: 520 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] about LIBRARY_PATH
  2013-08-12  2:49 [gentoo-user] about LIBRARY_PATH 东方巽雷
@ 2013-08-12  3:03 ` Adam Carter
  2013-08-12  4:12   ` 东方巽雷
  2013-08-12  5:34 ` Wang Xuerui
  2013-08-12  9:07 ` Samuli Suominen
  2 siblings, 1 reply; 6+ messages in thread
From: Adam Carter @ 2013-08-12  3:03 UTC (permalink / raw
  To: gentoo-user@lists.gentoo.org

[-- Attachment #1: Type: text/plain, Size: 83 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 108 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] about LIBRARY_PATH
  2013-08-12  3:03 ` Adam Carter
@ 2013-08-12  4:12   ` 东方巽雷
  0 siblings, 0 replies; 6+ messages in thread
From: 东方巽雷 @ 2013-08-12  4:12 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

LIBRARY_PATH is not LD_LIBRARY_PATH.


2013/8/12 Adam Carter <adamcarter3@gmail.com>

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

[-- Attachment #2: Type: text/html, Size: 493 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] about LIBRARY_PATH
  2013-08-12  2:49 [gentoo-user] about LIBRARY_PATH 东方巽雷
  2013-08-12  3:03 ` Adam Carter
@ 2013-08-12  5:34 ` Wang Xuerui
  2013-08-12  9:07 ` Samuli Suominen
  2 siblings, 0 replies; 6+ messages in thread
From: Wang Xuerui @ 2013-08-12  5:34 UTC (permalink / raw
  To: gentoo-user

2013/8/12 东方巽雷 <dongfangxunlei@gmail.com>:
> 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@ribosome ~ $
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@ribosome ~ $
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...


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] about LIBRARY_PATH
  2013-08-12  2:49 [gentoo-user] about LIBRARY_PATH 东方巽雷
  2013-08-12  3:03 ` Adam Carter
  2013-08-12  5:34 ` Wang Xuerui
@ 2013-08-12  9:07 ` Samuli Suominen
  2013-08-12 12:22   ` 东方巽雷
  2 siblings, 1 reply; 6+ messages in thread
From: Samuli Suominen @ 2013-08-12  9:07 UTC (permalink / raw
  To: gentoo-user

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?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] about LIBRARY_PATH
  2013-08-12  9:07 ` Samuli Suominen
@ 2013-08-12 12:22   ` 东方巽雷
  0 siblings, 0 replies; 6+ messages in thread
From: 东方巽雷 @ 2013-08-12 12:22 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 837 bytes --]

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@gentoo.org>

> 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?
>>
>
>
>

[-- Attachment #2: Type: text/html, Size: 1470 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-08-12 12:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-12  2:49 [gentoo-user] about LIBRARY_PATH 东方巽雷
2013-08-12  3:03 ` Adam Carter
2013-08-12  4:12   ` 东方巽雷
2013-08-12  5:34 ` Wang Xuerui
2013-08-12  9:07 ` Samuli Suominen
2013-08-12 12:22   ` 东方巽雷

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox