From Bugzilla Helper: User-Agent: Mozilla/4.8 [en] (X11; U; Linux 2.4.18-ac3 i686) Description of problem: gcc fails to compile perl module Net::SSLeay Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. tar zxvf Net_SSLeay.pm-1.20.tar.gz 2. cd Net_SSLeay.pm-1.20 3. perl Makefile.PL 4. make Actual Results: make[1]: Entering directory `/tmp/Net_SSLeay.pm-1.20/Net-SSLeay-Handle-0.50' cp Handle.pm ../blib/lib/Net/SSLeay/Handle.pm Manifying ../blib/man3/Net::SSLeay::Handle.3pm make[1]: Leaving directory `/tmp/Net_SSLeay.pm-1.20/Net-SSLeay-Handle-0.50' /usr/bin/perl /usr/lib/perl5/5.8.0/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.0/ExtUtils/typemap -typemap typemap SSLeay.xs > SSLeay.xsc && mv SSLeay.xsc SSLeay.c gcc -c -I/usr/include -I/usr/inc32 -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O -DVERSION=\"1.20\" -DXS_VERSION=\"1.20\" -fPIC "-I/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE" SSLeay.c In file included from /usr/include/openssl/evp.h:89, from /usr/include/openssl/x509.h:67, from /usr/include/openssl/ssl.h:69, from SSLeay.xs:80: /usr/include/openssl/des.h:193: parse error before `&' make: *** [SSLeay.o] Error Expected Results: SSLeay.c compiles without errors Additional info: I used both gcc-3.2-7 && compat-gcc-7.3-2.96.110. I get the same error consistently
This doesn't look like a gcc bug but some header problem. Anyway, could you attach SSLeay.i (e.g. add -save-temps option to the above gcc command)?
Created attachment 78784 [details] 'gcc -save-temps' output per request of jakub
Look at the line in question: char *crypt_r(const char *buf, const char *salt, &(*Perl_Ireentrant_buffer_ptr(((PerlInterpreter *)pthread_getspecific((*Perl_Gthr_key_ptr(((void *)0)))))))->_crypt_struct); this is originally: #if !defined(PERL5) && !defined(__FreeBSD__) && !defined(NeXT) char *crypt(const char *buf,const char *salt); #endif but because of /usr/ilb/perl5/5.8.0/i386-linux-thread-multi/CORE/reentr.h:# define crypt(a, b) crypt_r(a, b, &PL_reentrant_buffer->_crypt_struct) it gets incorrectly prototyped. Whether PERL5 should be defined automatically or whether SSLeay should define it is unknown to me. Certainly it doesn't have anything to do with gcc.
Thanks for the info. Net::SSLeay is a fairly common perl module. You might consider packaging it in the future as part of the distribution. See also: http://packages.debian.org/unstable/interpreters/libnet-ssleay-perl.html
getting perl modules linked against openssl to compile properly generally requires moving the perl includes in front of the openssl includes. see the perl-Crypt-SSLeay srpm for a sample patch that does just this.
After recompiling/installing PERL 5.8.0 from http://www.perl.com/, I was able to install Net::SSLeay without any trouble.
I did the following and it compiled and installed fine. I am not a sure if this is the correct or not, but it works. 1. tar zxvf Net_SSLeay.pm-1.20.tar.gz 2. cd Net_SSLeay.pm-1.20 3. Edit line 162 of the Makefile.PL 4. Change DEFINE => '', # e.g., '-DHAVE_SOMETHING' to DEFINE => '-DPERL5', # e.g., '-DHAVE_SOMETHING' 5. ./Makefile.PL -t 6. make install
Closing due to lack of activity and likely fixed in modern perl. If this is still an issue in RHEL4, FC3 or FC4 please open a new bug with new test information and exact versions of packages.