Compiling SpeedyCGI 2.22 on Fedora Core 9 with perl 5.10.0 stop reporting errors compiling speedy_perl.c:
[root@travweb2 CGI-SpeedyCGI-2.22]# perl Makefile.PL
Optional mod_speedycgi support.
Mod_speedycgi increases performance under Apache by avoiding the fork/exec
overhead associated with each request under normal SpeedyCGI. However, it
requires a working copy of "apxs" in your path, Apache with mod_so
support, and additional Apache configuration.
Compile mod_speedycgi (default no)?
Checking if your kit is complete...
Looks good
Writing Makefile for src
Writing Makefile for speedy_backend
Writing Makefile for speedy
Writing Makefile for CGI::SpeedyCGI
[root@travweb2 CGI-SpeedyCGI-2.22]# make
cd src && make
make[1]: Entering directory `/usr/local/CGI-SpeedyCGI-2.22/src'
/usr/bin/perl -w optdefs.pl /usr/bin
Writing speedy_optdefs.c
Writing speedy_optdefs.h
Writing mod_speedycgi_cmds.c
Writing mod_speedycgi2_cmds.c
Writing SpeedyCGI.pm
make[1]: Leaving directory `/usr/local/CGI-SpeedyCGI-2.22/src'
cp src/SpeedyCGI.pm blib/lib/CGI/SpeedyCGI.pm
make[1]: Entering directory `/usr/local/CGI-SpeedyCGI-2.22/src'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/local/CGI-SpeedyCGI-2.22/src'
make[1]: Entering directory `/usr/local/CGI-SpeedyCGI-2.22/speedy_backend'
rm -f speedy_backend_main.c
cp ../src/speedy_backend_main.c speedy_backend_main.c
gcc -c -I../src -I. -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O -DVERSION=\"2.22\" -DXS_VERSION=\"2.22\" -fPIC "-I/usr/lib/perl5/5.10.0/i386-linux-thread-multi/CORE" -DSPEEDY_PROGNAME=\"speedy_backend\" -DSPEEDY_VERSION=\"2.22\" -DSPEEDY_BACKEND speedy_backend_main.c
rm -f speedy_perl.c
cp ../src/speedy_perl.c speedy_perl.c
gcc -c -I../src -I. -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O -DVERSION=\"2.22\" -DXS_VERSION=\"2.22\" -fPIC "-I/usr/lib/perl5/5.10.0/i386-linux-thread-multi/CORE" -DSPEEDY_PROGNAME=\"speedy_backend\" -DSPEEDY_VERSION=\"2.22\" -DSPEEDY_BACKEND speedy_perl.c
speedy_perl.c: In function ‘find_scr’:
speedy_perl.c:258: error: expected expression before ‘SpeedyScript’
speedy_perl.c: In function ‘get_string’:
speedy_perl.c:449: error: expected expression before ‘char’
speedy_perl.c: In function ‘cwd_new’:
speedy_perl.c:484: error: expected expression before ‘SpeedyCwd’
speedy_perl.c: In function ‘onerun’:
speedy_perl.c:808: warning: comparison between pointer and integer
speedy_perl.c:809: warning: comparison between pointer and integer
speedy_perl.c:810: warning: comparison between pointer and integer
speedy_perl.c: In function ‘speedy_perl_init’:
speedy_perl.c:918: warning: passing argument 2 of ‘perl_parse’ from incompatible pointer type
make[1]: *** [speedy_perl.o] Error 1
make[1]: Leaving directory `/usr/local/CGI-SpeedyCGI-2.22/speedy_backend'
make: *** [subdirs] Error 2
[root@travweb2 CGI-SpeedyCGI-2.22]#
I get the same problem. Solaris 8 using self-compiled perl 5.10.0:
user@admin:/admin/src/builds/perl-modules/CGI-SpeedyCGI/CGI-SpeedyCGI-2.22$ /opt/perl/bin/perl Makefile.PL
Optional mod_speedycgi support.
Mod_speedycgi increases performance under Apache by avoiding the fork/exec
overhead associated with each request under normal SpeedyCGI. However, it
requires a working copy of "apxs" in your path, Apache with mod_so
support, and additional Apache configuration.
Compile mod_speedycgi (default no)?
Checking if your kit is complete...
Looks good
Writing Makefile for src
Writing Makefile for speedy_backend
Writing Makefile for speedy
Writing Makefile for CGI::SpeedyCGI
user@admin:/admin/src/builds/perl-modules/CGI-SpeedyCGI/CGI-SpeedyCGI-2.22$ make
cd src && make
/opt/perl/bin/perl -w optdefs.pl /opt/perl/bin
Writing speedy_optdefs.c
Writing speedy_optdefs.h
Writing mod_speedycgi_cmds.c
Writing mod_speedycgi2_cmds.c
Writing SpeedyCGI.pm
cp src/SpeedyCGI.pm blib/lib/CGI/SpeedyCGI.pm
rm -f speedy_backend_main.c
cp ../src/speedy_backend_main.c speedy_backend_main.c
gcc -c -I../src -I. -fno-strict-aliasing -pipe -I/opt/perl/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2.22\" -DXS_VERSION=\"2.22\" -fPIC "-I/opt/perl/lib/5.10.0/sun4-solaris/CORE" -DSPEEDY_PROGNAME=\"speedy_backend\" -DSPEEDY_VERSION=\"2.22\" -DSPEEDY_BACKEND speedy_backend_main.c
rm -f speedy_perl.c
cp ../src/speedy_perl.c speedy_perl.c
gcc -c -I../src -I. -fno-strict-aliasing -pipe -I/opt/perl/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2.22\" -DXS_VERSION=\"2.22\" -fPIC "-I/opt/perl/lib/5.10.0/sun4-solaris/CORE" -DSPEEDY_PROGNAME=\"speedy_backend\" -DSPEEDY_VERSION=\"2.22\" -DSPEEDY_BACKEND speedy_perl.c
speedy_perl.c: In function 'find_scr':
speedy_perl.c:258: error: expected expression before 'SpeedyScript'
speedy_perl.c: In function 'get_string':
speedy_perl.c:449: error: expected expression before 'char'
speedy_perl.c: In function 'cwd_new':
speedy_perl.c:484: error: expected expression before 'SpeedyCwd'
speedy_perl.c: In function 'onerun':
speedy_perl.c:808: warning: comparison between pointer and integer
speedy_perl.c:809: warning: comparison between pointer and integer
speedy_perl.c:810: warning: comparison between pointer and integer
*** Error code 1
make: Fatal error: Command failed for target `speedy_perl.o'
Current working directory /admin/src/builds/perl-modules/CGI-SpeedyCGI/CGI-SpeedyCGI-2.22/speedy_backend
*** Error code 1
make: Fatal error: Command failed for target `subdirs'
Hope this helps someone:
/src/speedy_backend_main.h:
-#define speedy_new(s,n,t) New(123,s,n,t)
+#define speedy_new(s,n,t) Newx(s,n,t)
mgades - wonderful solution, worked for me!