LIBS='.. -Wl,-rpath ..' on Linux

Peter Stuge peter at stuge.se
Sun Jul 26 13:17:27 EST 2009


Hi.

My system image is built on amd64 using Gentoo catalyst, and my
target is x86. This works really well.

However, OpenSSH configure adds -Wl,-rpath -Wl,/usr/lib to LIBS
during build, which then causes a problem when trying to run sftp.

(sftp has been linked with libedit, and /usr/lib/libedit.so exists
but is a linker script that points to /lib/libedit.so. This linker
script confuses ld.so when trying to run sftp.)

I am working through a Gentoo bug[1] for this, but I also want to
check what people here think can be the cause for this. I don't
understand it.

Looking at configure.ac, the variable need_dash_r seems to be
controlling these flags, but need_dash_r should not be set on Linux
unless --with-rpath was specified to configure. It was not. (build
log[2] and config.log[3] available)

Why are these flags added to LIBS? It doesn't happen when building
on amd64 for amd64, only when building on amd64 for x86.


//Peter

[1] http://bugs.gentoo.org/show_bug.cgi?id=279071
[2] http://bugs.gentoo.org/attachment.cgi?id=199179
[3] http://bugs.gentoo.org/attachment.cgi?id=199181


More information about the openssh-unix-dev mailing list