Subject: | Custom OpenSSL location fails due to RPATH problems |
If you have your own openssl build in an alternate location (/opt/whatever, for example), it is impossible to pass an option to Makefile.PL to set the RPATH correctly while building this module. If you try to set -Wl,-rpath,/path in LIBS, it gets rejected by Makemaker.
The best I could come up with was after doing the perl ... Makefile.PL ... bits, was to then do:
perl -pi -e 's|EXTRALIBS = -L/opt/whatever/common/lib -lssl -lcrypto|EXTRALIBS = -Wl,-rpath,/opt/whatever/common/lib -L/opt/whatever/common/lib -lssl -lcrypto|' Makefile
perl -pi -e 's|LDLOADLIBS = -L/opt/whatever/common/lib -lssl -lcrypto|LDLOADLIBS = -Wl,-rpath,/opt/whatever/common/lib -L/opt/whatever/common/lib -lssl -lcrypto|' Makefile