This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Using --sysroot with ld is not changing where libstdc++ is searched for


Hello,

I compiled binutils 2.23 using --with-sysroot=/path and
--with-build-sysroot=/path configure options. I'm now trying to
compile something using g++ where the necessary libraries are in
/path. I get the following message when I do this:

/opt/transfer/bin/ld: skipping incompatible /usr/lib/libstdc++.so.6
when searching for /usr/lib/libstdc++.so.6 /opt/transfer/bin/ld:
cannot find /usr/lib/libstdc++.so.6 ld returned 1 exit status

If I remove the /path directory then I additionally get many messages
about libraries not being found. This not found behavior is what I
would expect but it still complains about libstdc++ being an
incompatible version. If I instead swap the system
/usr/lib/libstdc++.so.6 out with the one in /path/usr/lib then the
linking works fine with no errors. It looks like ld is still looking
in /usr/lib for libstdc++ even when I pass it the --sysroot=/path
option.

Should ld be looking in /path/usr/lib or /usr/lib for libstdc++ when I
use --sysroot=/path? Is there any way that I can force it to look in
/path/usr/lib instead?

Thanks and best regards,
Evan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]