Skip Menu |

This queue is for tickets about the Net-SSLeay CPAN distribution.

Report information
The Basics
Id: 127527
Status: rejected
Priority: 0/
Queue: Net-SSLeay

People
Owner: Nobody in particular
Requestors: k.vychodsky [...] skynet-systems.cz
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: SSLeay CPAN install crash on 'ld: cannot find -lz'
Date: Tue, 30 Oct 2018 08:57:28 +0100
To: bug-Net-SSLeay [...] rt.cpan.org
From: Karel Východský <k.vychodsky [...] skynet-systems.cz>
Hi, I'm having trouble install SSLeay 1.85 on Debian 9.5 (up to date). The error occured while installing NetDisco. After some investigation I'm using command 'cpanm Net:SSLeay::Handle -f -v' to see what happens. Here's the end of the output before crash. ... In file included from /usr/include/openssl/objects.h:916:0,                  from /usr/include/openssl/evp.h:27,                  from /usr/include/openssl/x509.h:23,                  from /usr/include/openssl/ssl.h:50,                  from SSLeay.xs:167: /usr/include/openssl/ocsp.h:336:1: note: expected âOCSP_CERTID * {aka struct ocsp_cert_id_st *}â but argument is of type âconst OCSP_CERTID * {aka const struct ocsp_cert_id_st *}â  DECLARE_ASN1_FUNCTIONS(OCSP_CERTID)  ^ SSLeay.xs:6790:23: warning: passing argument 1 of âi2d_OCSP_CERTIDâ discards âconstâ qualifier from pointer target type [-Wdiscarded-qualifiers]        i2d_OCSP_CERTID(OCSP_SINGLERESP_get0_id(sir),&pi);                        ^~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/openssl/objects.h:916:0,                  from /usr/include/openssl/evp.h:27,                  from /usr/include/openssl/x509.h:23,                  from /usr/include/openssl/ssl.h:50,                  from SSLeay.xs:167: /usr/include/openssl/ocsp.h:336:1: note: expected âOCSP_CERTID * {aka struct ocsp_cert_id_st *}â but argument is of type âconst OCSP_CERTID * {aka const struct ocsp_cert_id_st *}â  DECLARE_ASN1_FUNCTIONS(OCSP_CERTID)  ^ rm -f blib/arch/auto/Net/SSLeay/SSLeay.so x86_64-linux-gnu-gcc  -shared -L/usr -L/usr/lib -L/usr/local/lib -fstack-protector-strong SSLeay.o  -o blib/arch/auto/Net/SSLeay/SSLeay.so      \    -L/usr -L/usr/lib -lssl -lcrypto -lz         \ /usr/bin/ld: cannot find -lz collect2: error: ld returned 1 exit status Makefile:497: recipe for target 'blib/arch/auto/Net/SSLeay/SSLeay.so' failed make: *** [blib/arch/auto/Net/SSLeay/SSLeay.so] Error 1 FAIL ! Installing Net::SSLeay::Handle failed. See /root/.cpanm/work/1540885611.15537/build.log for details. Retry with --force to force install it. build.log contains same information as this output. As I'm not familiar with the process I'm humbly asking for help or advice - I'm not sure if problem is global or with my configuration. I can supply any other necessary information if needed. Best regards, Karel Vychodsky --

Message body is not shown because it is too large.

Subject: [rt.cpan.org #127527]
Date: Wed, 14 Nov 2018 10:44:39 -0800
To: <bug-Net-SSLeay [...] rt.cpan.org>
From: "Hermann Calabria" <hermann [...] jovial.org>
Hi, I am getting exactly the same error as Karel. I’m running on Ubuntu 18.04 LTS with Perlbrew 0.84. Relevant output from build: rm -f blib/arch/auto/Net/SSLeay/SSLeay.so LD_RUN_PATH="/usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu" cc -shared -O2 -L /usr -L/usr/lib -L/usr/local/lib -fstack-protector-strong SSLeay.o -o blib/arch /auto/Net/SSLeay/SSLeay.so \ -L/usr -L/usr/lib -lssl -lcrypto -lz \ /usr/bin/ld: cannot find -lz collect2: error: ld returned 1 exit status Makefile:496: recipe for target 'blib/arch/auto/Net/SSLeay/SSLeay.so' failed make: *** [blib/arch/auto/Net/SSLeay/SSLeay.so] Error 1 I’ve tried Perl 5.26.2 and 5.28.0 with same error. I’ve also tried several prior versions of Net::SSLeay as well as pre-release (1.86_xx). Same error. Short of reverting to system Perl and installing libnet-ssleay-perl (1.84-1build1) directly from Ubuntu -- which does install perfectly -- I have no idea what to do next. Thanks in advance for any help!
Subject: Solved: [rt.cpan.org #127527]
Date: Wed, 14 Nov 2018 11:37:53 -0800
To: <bug-Net-SSLeay [...] rt.cpan.org>
From: "Hermann Calabria" <hermann [...] jovial.org>
Hi all, an update. I have a solution to share! The problem is that OpenSSL must be compiled using same setup as Perl and Perlbrew. The developers harp on this throughout the documentation, but alas, us application developers are trained to cpanm install Foo::Bar and have it “just work”. It’s not that simple for modules such as Net::SSLeay that depend on OpenSSL. So here’s a recipe confirmed to work on Ubuntu 18.04 LTS, Perlbrew 0.84, Perl 5.26.2: 1. Install package dependencies: sudo apt install build-essential checkinstall zlib1g-dev -y 2. Create a subdirectory for OpenSSL under Perlbrew: mkdir ~/perl5/perlbrew/openssl 3. Download & extract latest LTS OpenSSL into above directory. To determine latest LTS OpenSSL, go to https://openssl.org/source/ and find the latest stable version. As of this writing, the current one is openssl-1.1.1.tar.gz: cd ~/perl5/perlbrew/openssl wget https://www.openssl.org/source/openssl-1.1.1.tar.gz [replace with latest LTS version] tar -xf openssl-1.1.1.tar.gz cd openssl-1.1.1 4. Install and compile. Starting at above directory: ./config shared --prefix=$PERLBREW_ROOT/openssl make make test 5. Install Net::SSLeay using cpanm: cpanm install Net::SSLeay
On Wed Nov 14 19:39:29 2018, hermann@jovial.org wrote: Show quoted text
> So here’s a recipe confirmed to work on Ubuntu 18.04 LTS, Perlbrew > 0.84, Perl 5.26.2: > > 1. Install package dependencies: > sudo apt install build-essential checkinstall zlib1g-dev -y > > 2. Create a subdirectory for OpenSSL under Perlbrew: > mkdir ~/perl5/perlbrew/openssl > > 3. Download & extract latest LTS OpenSSL into above directory. To > determine latest LTS OpenSSL, go to https://openssl.org/source/ and > find the latest stable version. As of this writing, the current one > is openssl-1.1.1.tar.gz: > > cd ~/perl5/perlbrew/openssl > wget https://www.openssl.org/source/openssl-1.1.1.tar.gz [replace > with latest LTS version] > tar -xf openssl-1.1.1.tar.gz > cd openssl-1.1.1 > > 4. Install and compile. Starting at above directory: > ./config shared --prefix=$PERLBREW_ROOT/openssl > make > make test > > 5. Install Net::SSLeay using cpanm: > cpanm install Net::SSLeay
The only part of this that's necessary is the installation of the zlib headers (zlib1g-dev) in step 1: that's what ld is complaining about when it says "cannot find -lz". The documentation ought to be clearer on that point, and it's something we'll fix when we've finished implementing support for OpenSSL 1.1.1 and worked through the backlog of patches on RT.