Bug 75158 - gcc fails to compile perl module Net::SSLeay
Summary: gcc fails to compile perl module Net::SSLeay
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: perl   
(Show other bugs)
Version: 8.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Warren Togami
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2002-10-04 21:54 UTC by Need Real Name
Modified: 2007-04-18 16:47 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-05-28 07:07:01 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
'gcc -save-temps' output per request of jakub@redhat.com (129.39 KB, application/octet-stream)
2002-10-04 22:19 UTC, Need Real Name
no flags Details

Description Need Real Name 2002-10-04 21:54:19 UTC
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:

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
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

Comment 1 Jakub Jelinek 2002-10-04 22:00:38 UTC
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)?

Comment 2 Need Real Name 2002-10-04 22:19:05 UTC
Created attachment 78784 [details]
'gcc -save-temps' output per request of jakub@redhat.com

Comment 3 Jakub Jelinek 2002-10-04 22:29:37 UTC
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);
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.

Comment 4 Need Real Name 2002-10-04 23:00:53 UTC
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:


Comment 5 Chip Turner 2002-10-05 04:08:34 UTC
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.

Comment 6 Louie Hannen 2002-10-09 17:03:25 UTC
After recompiling/installing PERL 5.8.0 from http://www.perl.com/, I was able 
to install Net::SSLeay without any trouble.

Comment 7 Need Real Name 2002-10-25 16:03:27 UTC
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'
    DEFINE      => '-DPERL5',     # e.g., '-DHAVE_SOMETHING'
5. ./Makefile.PL -t
6. make install

Comment 8 Warren Togami 2005-05-28 07:07:01 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.