Bug 75158 - gcc fails to compile perl module Net::SSLeay
gcc fails to compile perl module Net::SSLeay
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: perl (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Warren Togami
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-04 17:54 EDT by Need Real Name
Modified: 2007-04-18 12:47 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-05-28 03:07:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 18:19 EDT, Need Real Name
no flags Details

  None (edit)
Description Need Real Name 2002-10-04 17:54:19 EDT
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
Comment 1 Jakub Jelinek 2002-10-04 18:00:38 EDT
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 18:19:05 EDT
Created attachment 78784 [details]
'gcc -save-temps' output per request of jakub@redhat.com
Comment 3 Jakub Jelinek 2002-10-04 18:29:37 EDT
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.
Comment 4 Need Real Name 2002-10-04 19:00:53 EDT
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

Comment 5 Chip Turner 2002-10-05 00:08:34 EDT
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 13:03:25 EDT
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 12:03:27 EDT
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
Comment 8 Warren Togami 2005-05-28 03:07:01 EDT
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.