Skip Menu |

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

Report information
The Basics
Id: 54103
Status: resolved
Priority: 0/
Queue: Crypt-SSLeay

People
Owner: nanis [...] runu.moc.invalid
Requestors: sergstesh [...] yahoo.com
Cc:
AdminCc:

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



Subject: Crypt::SSLeay fails to build
Date: Thu, 28 Jan 2010 16:36:50 -0800 (PST)
To: bug-Crypt-SSLeay [...] rt.cpan.org
From: Sergei Steshenko <sergstesh [...] yahoo.com>
Hello, I tried to build Crypt::SSLeay using self-built perl-5.10.1 and self-built openssl-0.9.8l and the build fails - I know it's because of wrong include statements in 'crypt_ssleay_version.h' file. Please see below an excerpt from the screen session: " No installed SSL libraries found in any of the following places. /local /local/ssl /opt/ssl /usr /usr/local /usr/local/ssl /usr/local/openssl You will have to either specify a directory location at the following prompt, or rerun the Makefile.PL program and use the --lib switch to specify the path. If the path in question is considered standard on your platform, please consider filing a bug report in order to have it taken into account in a subsequent version of Crypt::SSLeay. Which SSL install path do you want to use? /home/sergei/AFSWD/install/openssl-0.9.8l BUILD INFORMATION ================================================ ssl library: OpenSSL 0.9.8 in /home/sergei/AFSWD/install/openssl-0.9.8l ssl header: openssl/ssl.h libraries: -L/home/sergei/AFSWD/install/openssl-0.9.8l/lib -lssl -lcrypto -lgcc include dir: -I/home/sergei/AFSWD/install/openssl-0.9.8l/include/openssl ================================================ Checking if your kit is complete... Looks good Note (probably harmless): No library found for -lgcc Writing Makefile for Crypt::SSLeay The test suite can attempt to connect to public servers to ensure that the code is working properly. If you are behind a strict firewall or have no network connectivity, these tests may fail (through no fault of the code). Do you want to run the live tests (y/N) ? [N] y cp lib/Crypt/SSLeay/X509.pm blib/lib/Crypt/SSLeay/X509.pm cp lib/Net/SSL.pm blib/lib/Net/SSL.pm cp SSLeay.pm blib/lib/Crypt/SSLeay.pm cp lib/Crypt/SSLeay/Conn.pm blib/lib/Crypt/SSLeay/Conn.pm cp lib/Crypt/SSLeay/CTX.pm blib/lib/Crypt/SSLeay/CTX.pm cp lib/Crypt/SSLeay/MainContext.pm blib/lib/Crypt/SSLeay/MainContext.pm cp lib/Crypt/SSLeay/Err.pm blib/lib/Crypt/SSLeay/Err.pm /home/sergei/my_perl-5.10.1/bin/perl /home/sergei/my_perl-5.10.1/lib/5.10.1/ExtUtils/xsubpp -typemap /home/sergei/my_perl-5.10.1/lib/5.10.1/ExtUtils/typemap -typemap typemap SSLeay.xs > SSLeay.xsc && mv SSLeay.xsc SSLeay.c /home/sergei/AFSWD/install/gcc-4.4.2/binsh/gcc -c -I/home/sergei/AFSWD/install/openssl-0.9.8l/include/openssl -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"0.57\" -DXS_VERSION=\"0.57\" -fPIC "-I/home/sergei/my_perl-5.10.1/lib/5.10.1/i686-linux-thread-multi/CORE" SSLeay.c In file included from SSLeay.xs:25: crypt_ssleay_version.h:1:25: error: openssl/ssl.h: No such file or directory crypt_ssleay_version.h:2:28: error: openssl/crypto.h: No such file or directory crypt_ssleay_version.h:3:25: error: openssl/err.h: No such file or directory crypt_ssleay_version.h:4:26: error: openssl/rand.h: No such file or directory crypt_ssleay_version.h:5:28: error: openssl/pkcs12.h: No such file or directory ... ". Please note that, on the one hand, in response to my entry of /home/sergei/AFSWD/install/openssl-0.9.8l build mechanism correctly guessed include and lib directories: " ssl library: OpenSSL 0.9.8 in /home/sergei/AFSWD/install/openssl-0.9.8l ssl header: openssl/ssl.h libraries: -L/home/sergei/AFSWD/install/openssl-0.9.8l/lib -lssl -lcrypto -lgcc include dir: -I/home/sergei/AFSWD/install/openssl-0.9.8l/include/openssl ", on the other hand, 'crypt_ssleay_version.h' file has a wrong/redundant 'openssl' subdirectory in 'openssl/ssl.h' entry and the like. 'openssl' uses pkg-config, so include paths should solely be based on its info. e.g.: " cat /home/sergei/AFSWD/install/openssl-0.9.8l/lib/pkgconfig/openssl.pc prefix=/mnt/sdb8/sergei/AFSWD_debug/20091207/openssl-0.9.8l exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: OpenSSL Description: Secure Sockets Layer and cryptography libraries and tools Version: 0.9.8l Requires: Libs: -L${libdir} -lssl -lcrypto -ldl Cflags: -I${includedir} ". N.B. /home/sergei/AFSWD/install is a symbolic link to /home/sergei/AFSWD/install . Regards, Sergei.
Subject: Re: [rt.cpan.org #54103] AutoReply: Crypt::SSLeay fails to build
Date: Fri, 29 Jan 2010 08:39:43 -0800 (PST)
To: bug-Crypt-SSLeay [...] rt.cpan.org
From: Sergei Steshenko <sergstesh [...] yahoo.com>
Actually, after rereading 'openssl' documentation, I came to the conclusion that include dir: -I/home/sergei/AFSWD/install/openssl-0.9.8l/include/openssl is wrong, it should have been just include dir: -I/home/sergei/AFSWD/install/openssl-0.9.8l/include . This conclusion comes from 'openssl-0.9.8l/INSTALL' file: " 251 * WRITING applications 252 253 To write an application that is able to handle both the new 254 and the old directory layout, so that it can still be compiled 255 with library versions up to OpenSSL 0.9.2b without bothering 256 the user, you can proceed as follows: 257 258 - Always use the new filename of OpenSSL header files, 259 e.g. #include <openssl/ssl.h>. " and from looking again into 'openssl-0.9.8l/lib/pkgconfig/openssl.pc' file: " cat -n /mnt/sdb8/sergei/AFSWD_debug/install/openssl-0.9.8l/lib/pkgconfig/openssl.pc 1 prefix=/mnt/sdb8/sergei/AFSWD_debug/install/openssl-0.9.8l 2 exec_prefix=${prefix} 3 libdir=${exec_prefix}/lib 4 includedir=${prefix}/include 5 6 Name: OpenSSL 7 Description: Secure Sockets Layer and cryptography libraries and tools 8 Version: 0.9.8l 9 Requires: 10 Libs: -L${libdir} -lssl -lcrypto -ldl 11 Cflags: -I${includedir} " - line #4 clearly shows include path _without_ the 'openssl' component, as it should be, and build mechanism guess with 'openssl' component is wrong. Regards, Sergei.
Hello: Thank you for your report. I just verified this. I was at first unable to replicate it but I realized the include files in /usr/include/openssl were being picked because <openssl/crypto.h> was not being found in /home/sinan/testing/openssl/include due to the fact that -I/home/sinan/testing/openssl was being passed to gcc instead of -I/home/sinan/testing which is the correct include path as you point out. In a couple of days, I am going to release a development version which I hope will fix this issue. -- Sinan On Fri Jan 29 11:40:41 2010, sergstesh wrote: Show quoted text
> Actually, after rereading 'openssl' documentation, I came to the > conclusion > that > > include dir: > -I/home/sergei/AFSWD/install/openssl-0.9.8l/include/openssl > > is wrong, it should have been just > > include dir: -I/home/sergei/AFSWD/install/openssl-0.9.8l/include > . > > This conclusion comes from 'openssl-0.9.8l/INSTALL' file: > > " > 251 * WRITING applications > 252 > 253 To write an application that is able to handle both the > new > 254 and the old directory layout, so that it can still be > compiled > 255 with library versions up to OpenSSL 0.9.2b without > bothering > 256 the user, you can proceed as follows: > 257 > 258 - Always use the new filename of OpenSSL header files, > 259 e.g. #include <openssl/ssl.h>. > " > > and from looking again into 'openssl-0.9.8l/lib/pkgconfig/openssl.pc' > file: > > " > cat -n /mnt/sdb8/sergei/AFSWD_debug/install/openssl- > 0.9.8l/lib/pkgconfig/openssl.pc > 1 prefix=/mnt/sdb8/sergei/AFSWD_debug/install/openssl-0.9.8l > 2 exec_prefix=${prefix} > 3 libdir=${exec_prefix}/lib > 4 includedir=${prefix}/include > 5 > 6 Name: OpenSSL > 7 Description: Secure Sockets Layer and cryptography libraries > and tools > 8 Version: 0.9.8l > 9 Requires: > 10 Libs: -L${libdir} -lssl -lcrypto -ldl > 11 Cflags: -I${includedir} > " > > - line #4 clearly shows include path _without_ the 'openssl' > component, as > it should be, and build mechanism guess with 'openssl' component is > wrong. > > Regards, > Sergei. > > > > >
Hello: I modified Makefile.PL in a way I hope fixes this and other related bugs. Would you mind checking if it works? http://search.cpan.org/~nanis/Crypt-SSLeay-0.57_03/ Thank you. -- Sinan On Fri Jan 29 11:40:41 2010, sergstesh wrote: Show quoted text
> Actually, after rereading 'openssl' documentation, I came to the > conclusion > that > > include dir: > -I/home/sergei/AFSWD/install/openssl-0.9.8l/include/openssl > > is wrong, it should have been just > > include dir: -I/home/sergei/AFSWD/install/openssl-0.9.8l/include > . > > This conclusion comes from 'openssl-0.9.8l/INSTALL' file: > > " > 251 * WRITING applications > 252 > 253 To write an application that is able to handle both the > new > 254 and the old directory layout, so that it can still be > compiled > 255 with library versions up to OpenSSL 0.9.2b without > bothering > 256 the user, you can proceed as follows: > 257 > 258 - Always use the new filename of OpenSSL header files, > 259 e.g. #include <openssl/ssl.h>. > " > > and from looking again into 'openssl-0.9.8l/lib/pkgconfig/openssl.pc' > file: > > " > cat -n /mnt/sdb8/sergei/AFSWD_debug/install/openssl- > 0.9.8l/lib/pkgconfig/openssl.pc > 1 prefix=/mnt/sdb8/sergei/AFSWD_debug/install/openssl-0.9.8l > 2 exec_prefix=${prefix} > 3 libdir=${exec_prefix}/lib > 4 includedir=${prefix}/include > 5 > 6 Name: OpenSSL > 7 Description: Secure Sockets Layer and cryptography libraries > and tools > 8 Version: 0.9.8l > 9 Requires: > 10 Libs: -L${libdir} -lssl -lcrypto -ldl > 11 Cflags: -I${includedir} > " > > - line #4 clearly shows include path _without_ the 'openssl' > component, as > it should be, and build mechanism guess with 'openssl' component is > wrong. > > Regards, > Sergei. > > > > >