Subject: | Build fails with Perl < 5.8.8 |
gcc -c -I/usr/include -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g
-pipe -m32 -march=i386 -mtune=pentium4 -DVERSION=\"1.46\"
-DXS_VERSION=\"1.46\" -fPIC
"-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" SSLeay.c
SSLeay.xs: In function `pem_password_cb_invoke':
SSLeay.xs:912: error: `n_a' undeclared (first use in this function)
SSLeay.xs:912: error: (Each undeclared identifier is reported only once
SSLeay.xs:912: error: for each function it appears in.)
make: *** [SSLeay.o] Error 1
This is because, prior to Perl 5.8.8, the POPpx macro required an STRLEN
variable n_a in scope. See:
http://www.nntp.perl.org/group/perl.perl5.porters/2006/03/msg110764.html
and the follow-up message from Nicholas Clark. Attached POPpx patch
fixes this.
Whilst trying to figure out this issue, I tried running ppport.h and it
suggested a further change (see attached newRV_noinc patch), though I
think that would only affect unfortunate souls trying to build with
Perls older than 5.4.
Subject: | Net-SSLeay-1.46-newRV_noinc.patch |
--- SSLeay.xs
+++ SSLeay.xs
@@ -131,6 +131,7 @@
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
+#define NEED_newRV_noinc
#define NEED_sv_2pv_flags
#include "ppport.h"
#ifdef __cplusplus
Subject: | Net-SSLeay-1.46-POPpx.patch |
POPpx requires a variable STRLEN n_a in scope prior to Perl 5.8.8
http://www.nntp.perl.org/group/perl.perl5.porters/2006/03/msg110764.html
--- SSLeay.xs
+++ SSLeay.xs
@@ -886,6 +886,7 @@
char *str;
int count = -1, str_len = 0;
simple_cb_data_t* cb = (simple_cb_data_t*)data;
+ STRLEN n_a;
PR1("STARTED: pem_password_cb_invoke\n");
if (cb->func && SvOK(cb->func)) {