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

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


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/ exists
but is a linker script that points to /lib/ This linker
script confuses 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, 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.



More information about the openssh-unix-dev mailing list