Forum: NGINX -rpath linker option?

8d313c5d85c52a953e498c4f66d59c8a?d=identicon&s=25 Jeffrey Walton (Guest)
on 2014-01-03 06:19
(Received via mailing list)
I'm having trouble with dll hell on Debian and Ubuntu with OpenSSL.
Debian and Ubuntu insist on runtime linking with the copy in /usr/lib.
Fedora and Red Hat are OK because they don't use OpenSSL by default,
so they are not present in /usr/lib.

I've tried specifying a rpath in ld options:

  --with-ld-opt="-rpath=$OPENSSL_LIB_DIR -ldl"

That results in:

  checking for C compiler ... found
   + using GNU C compiler
  checking for --with-ld-opt="-rpath=/usr/local/ssl/lib -ldl" ... not
found
  ./auto/configure: error: the invalid value in
--with-ld-opt="-rpath=/usr/local/ssl/lib -ldl"

The path is valid:

  $ ls /usr/local/ssl/lib
  engines      libcrypto.so        libssl.a   libssl.so.1.0.0
  libcrypto.a  libcrypto.so.1.0.0  libssl.so  pkgconfig

LD_LIBRARY_PATH and LD_PRELOAD tricks don't work because they are
dropped when running as root.

Any ideas how to proceed?
A8108a0961c6087c43cda32c8616dcba?d=identicon&s=25 Maxim Dounin (Guest)
on 2014-01-03 14:38
(Received via mailing list)
Hello!

On Fri, Jan 03, 2014 at 12:18:27AM -0500, Jeffrey Walton wrote:

>
>   checking for C compiler ... found
>    + using GNU C compiler
>   checking for --with-ld-opt="-rpath=/usr/local/ssl/lib -ldl" ... not found
>   ./auto/configure: error: the invalid value in
> --with-ld-opt="-rpath=/usr/local/ssl/lib -ldl"

Try looking into objs/autoconf.err.  Most likely, your cc want it
to be spelled like "-Wl,-rpath=...".

--
Maxim Dounin
http://nginx.org/
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.