bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/6753] In a prefixed install, -L order is not respected when sear


From: funtoos at yahoo dot com
Subject: [Bug ld/6753] In a prefixed install, -L order is not respected when searching for -l<libname>, but -T fixes it
Date: 24 Jul 2008 05:38:44 -0000

------- Additional Comments From funtoos at yahoo dot com  2008-07-24 05:38 
-------
(In reply to comment #9)
> (In reply to comment #8)
> > > 
> > > You have a very strange setup. You better come up with a testcase
> > > which doesn't require me to copy things into /usr/lib.
> > 
> > so, don't copy. change the name libmylib.so to libcwait.so. Or pick another
> > library name which is in /usr/lib and use that. Only condition is binutils 
> > needs
> > to be installed in a prefix and the same library needs to be present in
> > $PREFIX/usr/lib/ and /usr/lib and with "-L$PREFIX/usr/lib -L/usr/lib", ld 
> > will
> > just pick the one form /usr/lib.
> 
> Please provide a testcase I can try.
> 

The bug reproduces only in a prefixed environment. And if you have a prefixed
binutils install, the steps mentioned by me should reproduce the problem:

1. run the script
2. cd /tmp/mydir
3 gcc -shared -o libcwait.so mysymbol.o
4 mv libcwait.so $PREFIX/usr/lib/libcwait.so
5. gcc -o mymain mymain.o -L$PREFIX/usr/lib -L/usr/lib -lcwait

You can use any other name for library. It should be already present in 
/usr/lib.

The link will fail with undefined symbol.

This is the minimal I can do. The bug is pretty obvious in prefix env.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6753

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

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