Hi Folks,
I'm trying to build Embperl with Apache 2.2.0, mod_perl 2.0.2, perl 5.8.5 on RHEL AS 4 without much success. I've tried the latest svn checkout, which is failing on make with the error pasted below. I found Andargor's patch in the mailing list and am about to try applying it, but is there a better way to be approaching this?
Thanks, Mattgcc -c -I/usr/local/wsg/httpd-2.2.0-1/include -I/usr/local/wsg/httpd-2.2.0-1/regex -I/usr/local/wsg/httpd-2.2.0-1/os/unix -I/usr/include/libxml2 -I/usr/include/libxml2 -I/home/mbockol/wsg-src/builds/em bperl/xs -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm -I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE -DMOD_PERL -DMP_COMPAT_1X -DLINUX= 2 -D_LARGEFILE64_SOURCE -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -DVERSION=\"2.1.1_dev\" -DXS_VERSION=\"2.1.1_dev\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" -DAPACHE -DAPACHE2
-DEP2 -DLIBXSLT -o epapfilter.o epapfilter.c epapfilter.c: In function `ProviderApOutFilter_Callback': epapfilter.c:210: error: syntax error before '{' token epapfilter.c:213: error: `__s1_len' undeclared (first use in this function) epapfilter.c:213: error: (Each undeclared identifier is reported only once epapfilter.c:213: error: for each function it appears in.) epapfilter.c:213: error: `__s2_len' undeclared (first use in this function) epapfilter.c: At top level: epapfilter.c:213: error: syntax error before ')' token epapfilter.c:219: error: `b' undeclared here (not in a function) epapfilter.c:219: error: `data' undeclared here (not in a function) epapfilter.c:219: error: `len' undeclared here (not in a function) epapfilter.c:219: warning: data definition has no type or storage class epapfilter.c:220: error: syntax error before "if" epapfilter.c:223: error: syntax error before '->' token epapfilter.c:223: error: conflicting types for 'EMBPERL2_LogErrorParam' ep.h:227: error: previous declaration of 'EMBPERL2_LogErrorParam' was here epapfilter.c:223: error: conflicting types for 'EMBPERL2_LogErrorParam' ep.h:227: error: previous declaration of 'EMBPERL2_LogErrorParam' was here epapfilter.c:223: warning: data definition has no type or storage class epapfilter.c:231: error: syntax error before '->' token epapfilter.c:231: error: conflicting types for 'Perl_sv_catpvn_flags'/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/proto.h:1285: error: previous declaration of 'Perl_sv_catpvn_flags' was here
epapfilter.c:231: error: conflicting types for 'Perl_sv_catpvn_flags'/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/proto.h:1285: error: previous declaration of 'Perl_sv_catpvn_flags' was here
epapfilter.c:231: warning: data definition has no type or storage classepapfilter.c:235: warning: parameter names (without types) in function declaration
epapfilter.c:235: warning: data definition has no type or storage class epapfilter.c:237: error: syntax error before "return" make: *** [epapfilter.o] Error 1 Andargor The Wise wrote:
I had trouble compiling Embperl 2.1.0 with mod_perl 2.0.2 and Apache 2.2. I had found a previous patch for Apache 2.1 and I added some things. The patch I used is below. I searched, but could not find and further patches addressing this. Also, I hopefully did not miss any installation steps to compile Embperl 2.1.0 with these versions, which would have made such a patch irrelevant. Note on the patch: the "taint" test (#155) fails even with the patch. I did not know how to fix it. So run make test TESTARGS="-i". Hope this helps someone, Andargor diff --recursive --unified=3 Embperl-2.1.0/epapfilter.c Embperl-2.1.0-andargor/epapfilter.c --- Embperl-2.1.0/epapfilter.c 2005-10-25 18:17:14.000000000 -0400 +++ Embperl-2.1.0-andargor/epapfilter.c 2005-12-21 23:33:40.000000000 -0500 @@ -206,8 +206,9 @@ epTHX_- APR_BRIGADE_FOREACH(b, bb) - {+ for (b = APR_BRIGADE_FIRST(bb); + b != APR_BRIGADE_SENTINEL(bb); + b = APR_BUCKET_NEXT(b)) { /* APR_BUCKET_IS_EOS(b) does give undefined symbol, when running outside of Apache */ /* if (APR_BUCKET_IS_EOS(b)) */ if (strcmp (b -> type -> name, "EOS") == 0) diff --recursive --unified=3 Embperl-2.1.0/mod_embperl.c Embperl-2.1.0-andargor/mod_embperl.c --- Embperl-2.1.0/mod_embperl.c 2005-10-25 18:17:14.000000000 -0400 +++ Embperl-2.1.0-andargor/mod_embperl.c 2005-12-21 23:38:16.000000000 -0500 @@ -570,11 +570,11 @@ embperl_ApacheInitUnload (p) ; #ifdef APACHE2 - apr_pool_sub_make(&subpool, p, NULL); + apr_pool_create_ex(&subpool, p, NULL, NULL); #else subpool = ap_make_sub_pool(p); #endif - cfg = (tApacheDirConfig *) ap_pcalloc(subpool, sizeof(tApacheDirConfig)); + cfg = (tApacheDirConfig *) apr_pcalloc(subpool, sizeof(tApacheDirConfig)); #if 0 #ifdef APACHE2 @@ -602,7 +602,7 @@ static void *embperl_create_server_config(apr_pool_t * p, server_rec *s) { - tApacheDirConfig *cfg = (tApacheDirConfig *) ap_pcalloc(p, sizeof(tApacheDirConfig)); + tApacheDirConfig *cfg = (tApacheDirConfig *) apr_pcalloc(p, sizeof(tApacheDirConfig)); bApDebug |= ap_exists_config_define("EMBPERL_APDEBUG") ; @@ -726,11 +726,11 @@ #endif #ifdef APACHE2 - apr_pool_sub_make(&subpool, p, NULL); + apr_pool_create_ex(&subpool, p, NULL, NULL); #else subpool = ap_make_sub_pool(p); #endif - mrg = (tApacheDirConfig *)ap_palloc (subpool, sizeof(tApacheDirConfig)); + mrg = (tApacheDirConfig *)apr_palloc (subpool, sizeof(tApacheDirConfig)); if (bApDebug) ap_log_error (APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO, APLOG_STATUSCODE NULL, "EmbperlDebug: merge_dir/server_config base=0x%p add=0x%p mrg=0x%p\n", basev, addv, mrg) ; @@ -826,7 +826,7 @@ const char * embperl_Apache_Config_##STRUCT##NAME (cmd_parms *cmd, /* tApacheDirConfig */ void * pDirCfg, const char* arg) \ { \ apr_pool_t * p = cmd -> pool ; \ - ((tApacheDirConfig *)pDirCfg) -> STRUCT.NAME = ap_pstrdup(p, arg) ; \ + ((tApacheDirConfig *)pDirCfg) -> STRUCT.NAME = apr_pstrdup(p, arg) ; \ ((tApacheDirConfig *)pDirCfg) -> set_##STRUCT##NAME = 1 ; \ if (bApDebug) \ ap_log_error (APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO, APLOG_STATUSCODE NULL, "EmbperlDebug: Set "#CFGNAME" (type="#TYPE";STR) = %s\n", arg) ; \ @@ -842,7 +842,7 @@ if (!embperl_CalcExpires(arg, buf, 0)) \ LogErrorParam (NULL, rcTimeFormatErr, "EMBPERL_"#CFGNAME, arg) ; \ else \ - ((tApacheDirConfig *)pDirCfg) -> STRUCT.NAME = ap_pstrdup(p, buf) ; \ + ((tApacheDirConfig *)pDirCfg) -> STRUCT.NAME = apr_pstrdup(p, buf) ; \ ((tApacheDirConfig *)pDirCfg) -> set_##STRUCT##NAME = 1 ; \ if (bApDebug) \ ap_log_error (APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO, APLOG_STATUSCODE NULL, "EmbperlDebug: Set "#CFGNAME" (type="#TYPE";STR) = %s\n", arg) ; \ @@ -875,7 +875,7 @@ #define EPCFG_SAVE(STRUCT,TYPE,NAME,CFGNAME) \ const char * embperl_Apache_Config_##STRUCT##NAME (cmd_parms *cmd, /* tApacheDirConfig */ void * pDirCfg, const char* arg) \ { \ - ((tApacheDirConfig *)pDirCfg) -> save_##STRUCT##NAME = ap_pstrdup(cmd -> pool, arg) ; \ + ((tApacheDirConfig *)pDirCfg) -> save_##STRUCT##NAME = apr_pstrdup(cmd -> pool, arg) ; \ ((tApacheDirConfig *)pDirCfg) -> set_##STRUCT##NAME = 1 ; \ if (bApDebug) \ ap_log_error (APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO, APLOG_STATUSCODE NULL, "EmbperlDebug: Set "#CFGNAME" (type="#TYPE") = %s (save for later conversion to Perl data)\n", arg) ; \ @@ -1162,7 +1162,7 @@ pParam -> sUri = r -> uri ; pParam -> sPathInfo = r -> path_info ;pParam -> sQueryInfo = r -> args ; - if ((p = ep_pstrdup (pPool, ap_table_get (r ->headers_in, "Accept-Language")))) + if ((p = ep_pstrdup (pPool, apr_table_get (r -> headers_in, "Accept-Language")))) { while (isspace(*p)) p++ ; @@ -1172,7 +1172,7 @@ *p = '\0' ; } - ap_table_do (embperl_AddCookie, &s, r -> headers_in, "Cookie", NULL) ; + apr_table_do (embperl_AddCookie, &s, r -> headers_in, "Cookie", NULL) ; buf[0] = '\0' ; #ifdef APACHE2 diff --recursive --unified=3 Embperl-2.1.0/test/conf/httpd.conf.src Embperl-2.1.0-andargor/test/conf/httpd.conf.src --- Embperl-2.1.0/test/conf/httpd.conf.src 2005-11-02 18:00:30.000000000 -0500 +++ Embperl-2.1.0-andargor/test/conf/httpd.conf.src 2005-12-21 23:55:35.000000000 -0500 @@ -70,10 +70,13 @@ #-Tw EOD -print OFH "PerlTaintCheck On\n" if (!$ENV{NOTAINT}) ; +if (!$ENV{NOTAINT}) { + print OFH "PerlSwitches -w\n"; +} else { + print OFH "PerlSwitches -Tw\n"; +} print OFH <<EOD ; -PerlWarn On PerlSetEnv EMBPERL_SRC \"$EPPATH\" @@ -157,7 +160,7 @@ <Location /embperl/log> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI </Location> @@ -179,25 +182,25 @@ <Location /embperl> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI </Location> <Location /embperl/sub> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI </Location> <Location /embperl2> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI </Location> <Location /embperl/safe> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI EMBPERL_OPTIONS 4 </Location> @@ -226,7 +229,7 @@ <Location /embperl/opmask> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI EMBPERL_OPTIONS 12 EMBPERL_COMPARTMENT TEST @@ -235,7 +238,7 @@ <Location /embperl/rawinput> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI EMBPERL_OPTIONS 16 EMBPERL_INPUT_ESCMODE 0 @@ -243,45 +246,45 @@ <Location /embperl/nochdir> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI EMBPERL_OPTIONS 384 </Location> <Location /embperl/nph> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI EMBPERL_OPTIONS 64 </Location> <Location /embperl/stdout> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI #EMBPERL_OPTIONS 16384 EMBPERL_OPTIONS 16400 EMBPERL_ESCMODE 0 -PerlSetupEnv Off +PerlOptions -SetupEnv </Location> <Location /embperl/allform> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI EMBPERL_OPTIONS 8192 </Location> <Location /embperl/noerr> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI EMBPERL_OPTIONS 2 </Location> <Location /embperl/errdoc> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI EMBPERL_OPTIONS 262144 ErrorDocument 500 /html/errmsg.htm @@ -289,7 +292,7 @@ <Location /embperl/errdoc/epl> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI EMBPERL_OPTIONS 262144 ErrorDocument 500 /embperl/errmsg2.htm @@ -297,7 +300,7 @@ <Location /embperl/match> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI EMBPERL_URIMATCH \\.htm\$ </Location> @@ -308,7 +311,7 @@ -print OFH "PerlHandler ", $MP2?'ModPerl':'Apache', "::Registry\n" ; +print OFH "PerlResponseHandler ", $MP2?'ModPerl':'Apache', "::Registry\n" ; @@ -324,7 +327,7 @@ EMBPERL_OBJECT_FALLBACK epofallback.htm EMBPERL_URIMATCH \"\\.htm.?\$|\\.epl\$\" SetHandler perl-script-PerlHandler Embperl::Object +PerlResponseHandler Embperl::Object Options ExecCGI</Location> @@ -336,7 +339,7 @@ EMBPERL_OBJECT_FALLBACK epofallback.htm EMBPERL_URIMATCH \"\\.htm.?\$|\\.epl\$\" SetHandler perl-script-PerlHandler Embperl::Object +PerlResponseHandler Embperl::Object Options ExecCGI</Location> @@ -348,7 +351,7 @@ EMBPERL_OBJECT_FALLBACK epofallback.htm EMBPERL_URIMATCH \"\\.htm.?\$|\\.epl\$\" SetHandler perl-script-PerlHandler Embperl::Object +PerlResponseHandler Embperl::Object Options ExecCGI</Location> @@ -359,7 +362,7 @@ EMBPERL_OBJECT_FALLBACK epofallback.htm EMBPERL_URIMATCH \"\\.htm.?\$|\\.epl\$\" SetHandler perl-script-PerlHandler Embperl::Object +PerlResponseHandler Embperl::Object Options ExecCGIEMBPERL_OPTIONS 262144 ErrorDocument 500 /embperl/errmsg2.htm @@ -385,28 +388,28 @@ <Location /embperl/sidurl> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI EMBPERL_SESSION_MODE 0x20 </Location> <Location /embperl/uidurl> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI EMBPERL_SESSION_MODE 0x02 </Location> <Location /embperl/suidurl> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI EMBPERL_SESSION_MODE 0x22 </Location> <Location /embperlmail> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI EMBPERL_APPNAME MailApp EMBPERL_MAILHOST mail.i.ecos.de @@ -658,7 +661,7 @@ <Location /perl-status> SetHandler perl-script -PerlHandler Apache::Status +PerlResponseHandler Apache::Status PerlSetVar StatusOptionsAll On </Location> @@ -692,7 +695,7 @@ <Location /eg/x> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI FollowSymLinks EMBPERL_INPUT_ESCMODE 7 EMBPERL_OPTIONS 262288 @@ -710,7 +713,7 @@ EMBPERL_OBJECT_STOPDIR \"$EPPATH/eg/web\" EMBPERL_URIMATCH \"\\.htm.?\$|\\.epl\$|\\.xml\$|\\.pod\$|/$\" SetHandler perl-script-PerlHandler Embperl::Object +PerlResponseHandler Embperl::Object Options ExecCGI</Location> @@ -722,12 +725,12 @@ EMBPERL_URIMATCH \"\\.htm.?\$|\\.epl\$|\\.xml\$|\\.pod\$|/$\" EMBPERL_PATH \"$EPPATH/eg/web/conf;$EPPATH/eg/web\" sethandler perl-script -perlhandler Embperl +PerlResponseHandler Embperl </Location> <Location /eg/xml> SetHandler perl-script -PerlHandler Embperl +PerlResponseHandler Embperl Options ExecCGI EMBPERL_XSLTSTYLESHEET \"$EPPATH/eg/xml/pod.xsl\" EMBPERL_XSLTPROC libxslt @@ -751,7 +754,7 @@ <Location /kwiki> SetHandler perl-script PerlSetVar KwikiBaseDir $EPPATH/eg/kwiki - PerlHandler Kwiki::ModPerl + PerlResponseHandler Kwiki::ModPerl </Location> Alias /ckwiki $EPPATH/eg/kwiki diff --recursive --unified=3 Embperl-2.1.0/test/html/taint.htm Embperl-2.1.0-andargor/test/html/taint.htm --- Embperl-2.1.0/test/html/taint.htm 2005-10-25 18:17:06.000000000 -0400 +++ Embperl-2.1.0-andargor/test/html/taint.htm 2005-12-22 00:03:32.000000000 -0500 @@ -12,7 +12,7 @@ when running with -T option or PaintTaintCheck on <P> -[+ do { system ('echo blabla') ;} +] +[+ eval { do { system ('echo blabla') ;} } +] <P>Ok.<P> __________________________________________________ Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
smime.p7s
Description: S/MIME Cryptographic Signature