Subject: | Assumed library paths are being forced, causing a make fail |
Date: | Thu, 24 Mar 2016 15:39:15 -0400 |
To: | bug-Net-SSLeay [...] rt.cpan.org |
From: | John Berger <widescreenrulez [...] gmail.com> |
I attempted to compile Net::SSLeay v1.72 and ran into make errors
because Makefile is completely ignoring existing environment variables.
A line in Makefile explicitly sets LD_RUN_PATH to /usr/lib64:/lib64,
which in this case is the wrong assumption. I do not have root access,
so I had to compile everything into non-standard directories.
As per the environment,
$ echo $LD_RUN_PATH
/app/local/lib:/app/openssl/lib:/app/zlib/lib
$ which perl
/app/perl/bin/perl
However, when running the make, I got this error
LD_RUN_PATH="/usr/lib64:/lib64" cc -shared -O2 -L/usr -L/usr/lib64
-L/usr/lib -L/usr/local/lib -fstack-protector SSLeay.o -o
blib/arch/auto/Net/SSLeay/SSLeay.so \
-L/usr -L/usr/lib64 -L/usr/lib -lssl -lcrypto -lz \
/app/local/bin/ld: cannot find -lssl
/app/local/bin/ld: cannot find -lcrypto
/app/local/bin/ld: cannot find –lz
All of those libraries are in the directories listed in LD_RUN_PATH and
LD_LIBRARY_PATH.
I also needed to modify EXTRALIBS and LDLOADLIBS with the correct
directories before I could get a clean compile. All of these variables
should have been handled by Makefile.PL by looking at the existing
environment variables. Once I manually fixed LD_RUN_PATH, EXTRALIBS, and
LDLOADLIBS with the correct library paths, the make went through
cleanly; but I shouldn’t have had to do that.
Please fix Makefile.PL so that existing LD_RUN_PATH and LD_LIBRARY_PATH
environment variables will be taken into account when generating Makefile.
Platform: Linux 2.6.32-573.12.1.el6.x86_64 #1 SMP Mon Nov 23 12:55:32
EST 2015 x86_64 x86_64 x86_64 GNU/Linux
libc version 2.12
Net::SSLeay v1.72
OpenSSL 1.0.2g 1 Mar 2016
gcc version 4.4.7
This is perl 5, version 16, subversion 2 (v5.16.2) built for x86_64-linux
*** Found OpenSSL-1.0.1e installed in /usr (çshould not have been the
case if it looked at environment variables)
*** Be sure to use the same compiler and options to compile your
OpenSSL, perl,
and Net::SSLeay. Mixing and matching compilers is not supported.
Do you want to run external tests?
These tests *will* *fail* if you do not have network connectivity. [n] y
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Net::SSLeay
Writing MYMETA.yml and MYMETA.json