Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 14385 - mod_perl--1.99.07 compile fails
Summary: mod_perl--1.99.07 compile fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-22 12:38 UTC by Oo.et.oO
Modified: 2003-02-04 19:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix for getting a successful compile for mod_perl-1.99.07 (mod_perl-1.99.07-apr-poll-fix.patch,539 bytes, patch)
2003-01-24 13:52 UTC, Haroon Rafique
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oo.et.oO 2003-01-22 12:38:37 UTC
as one can see i modified the ebuild and changed 
MP_AP_PREFIX = /usr/include/apache2
 (was just /usr)  because it wasn't finding the apache include files.  i also
had to add a symlink called include in the apache2 include dir back to itself.

in both cases the compile fails in the same place.  

there is a thread in the forums about this now:
http://forums.gentoo.org/viewtopic.php?t=25049&highlight=modperl+apache2

[root@byzantine:/home/erock]# ACCEPT_KEYWORDS="~x86" emerge mod_perl
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-perl/mod_perl-1.99.07 to /
>>> md5 ;-) mod_perl-1.99_07.tar.bz2
>>> Unpacking source...
>>> Unpacking mod_perl-1.99_07.tar.bz2
>>> Source unpacked.
Reading Makefile.PL args from @ARGV
   MP_TRACE = 1
   MP_DEBUG = 1
   MP_AP_PREFIX = /usr/include/apache2
   MP_USE_DSO = 1
   MP_INST_APACHE2 = 1
   MP_APXS = /usr/sbin/apxs2
Configuring Apache/2.0.44 mod_perl/1.99_07 Perl/v5.8.0
Checking if your kit is complete...
Looks good
    generating script t/TEST
Checking if your kit is complete...
Looks good
Writing Makefile for Apache::Test
    generating script t/TEST
Checking if your kit is complete...
Looks good
Writing Makefile for ModPerl::Registry
Writing Makefile for APR::Base64
Writing Makefile for APR::Brigade
Writing Makefile for APR::Bucket
Writing Makefile for APR::Date
(snip)
Writing Makefile for mod_perl
*** mod_perl dso library will be built as mod_perl.so
*** You'll need to add the following to httpd.conf:
***  LoadModule perl_module modules/mod_perl.so

*** Apache Perl modules will be installed relative to Apache2/
*** Don't forget to:
*** - configure 'PerlModule Apache2' in httpd.conf
*** - or 'use Apache2 ();' in a startup script
cd "src/modules/perl" && make -f Makefile.modperl
make[1]: Entering directory
`/var/tmp/portage/mod_perl-1.99.07/work/mod_perl-1.99_07/src/modules/perl'
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
(snip...)
gcc -c 
-I/var/tmp/portage/mod_perl-1.99.07/work/mod_perl-1.99_07/src/modules/perl
-I/var/tmp/portage/mod_perl-1.99.07/work/mod_perl-1.99_07/xs
-I/usr/include/apache2 -DPERL5 -fno-strict-aliasing  -I/usr/include/gdbm
-DMOD_PERL -g -DMP_DEBUG -DMP_TRACE    -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\"
-fpic "-I/usr/lib/perl5/5.8.0/i686-linux/CORE"   Global.c
rm -f ../../../blib/arch/Apache2/auto/ModPerl/Global/Global.so
LD_RUN_PATH="" gcc  -shared -L/usr/local/lib Global.o  -o
../../../blib/arch/Apache2/auto/ModPerl/Global/Global.so     
chmod 755 ../../../blib/arch/Apache2/auto/ModPerl/Global/Global.so
make[3]: Leaving directory
`/var/tmp/portage/mod_perl-1.99.07/work/mod_perl-1.99_07/WrapXS/ModPerl/Global'
make[3]: Entering directory
`/var/tmp/portage/mod_perl-1.99.07/work/mod_perl-1.99_07/WrapXS/ModPerl/Util'
/usr/bin/perl /usr/lib/perl5/5.8.0/ExtUtils/xsubpp  -typemap
/usr/lib/perl5/5.8.0/ExtUtils/typemap -typemap
/var/tmp/portage/mod_perl-1.99.07/work/mod_perl-1.99_07/xs/typemap  Util.xs >
Util.xsc && mv Util.xsc Util.c
cp Util.pm ../../../blib/lib/Apache2/ModPerl/Util.pm
Running Mkbootstrap for ModPerl::Util ()
gcc -c 
-I/var/tmp/portage/mod_perl-1.99.07/work/mod_perl-1.99_07/src/modules/perl
-I/var/tmp/portage/mod_perl-1.99.07/work/mod_perl-1.99_07/xs
-I/usr/include/apache2 -DPERL5 -fno-strict-aliasing  -I/usr/include/gdbm
-DMOD_PERL -g -DMP_DEBUG -DMP_TRACE    -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\"
-fpic "-I/usr/lib/perl5/5.8.0/i686-linux/CORE"   Util.c
chmod 644 Util.bs
cp Util.bs ../../../blib/arch/Apache2/auto/ModPerl/Util/Util.bs
chmod 644 ../../../blib/arch/Apache2/auto/ModPerl/Util/Util.bs
rm -f ../../../blib/arch/Apache2/auto/ModPerl/Util/Util.so
LD_RUN_PATH="" gcc  -shared -L/usr/local/lib Util.o  -o
../../../blib/arch/Apache2/auto/ModPerl/Util/Util.so     
chmod 755 ../../../blib/arch/Apache2/auto/ModPerl/Util/Util.so
make[3]: Leaving directory
`/var/tmp/portage/mod_perl-1.99.07/work/mod_perl-1.99_07/WrapXS/ModPerl/Util'
make[2]: Leaving directory
`/var/tmp/portage/mod_perl-1.99.07/work/mod_perl-1.99_07/WrapXS/ModPerl'
make[1]: Leaving directory
`/var/tmp/portage/mod_perl-1.99.07/work/mod_perl-1.99_07/WrapXS'

!!! ERROR: dev-perl/mod_perl-1.99.07 failed.
!!! Function src_compile, Line 29, Exitcode 2
!!! (no error message)
Comment 1 Haroon Rafique 2003-01-24 13:45:37 UTC
I traced the problem to src/modules/perl/modperl_constants.c which wasn't
finding some APR_POLL* declarations found in /usr/include/apache2/apr_poll.h.
Unfortunately, the modperl_constants.c file is a generated file generated by
lib/ModPerl/Code.pm.

I had to use the following kludge to add the extrac "#include <apr_poll.h>" line
into the modperl_constants.c file:
--- mod_perl-1.99_07/lib/ModPerl/Code.orig.pm   2003-01-24 14:35:29.000000000 -0
500
+++ mod_perl-1.99_07/lib/ModPerl/Code.pm        2003-01-24 14:36:40.000000000 -0
500
@@ -638,6 +638,9 @@
         push @preamble, "#ifndef $d\n#define $d\n";
         push @{ $self->{postamble}->{$name} }, "\n#endif /* $d */\n";
     }
+    elsif ($name =~ /modperl_constants\.c/) {
+        push @preamble, qq{\#include "mod_perl.h"\n\#include <apr_poll.h>\n\n};
+    }
     elsif ($name =~ /\.c/) {
         push @preamble, qq{\#include "mod_perl.h"\n\n};
     }


I will send the patch as an attachment in the following comment.

After doing this, it compiles and installs fine.
Comment 2 Haroon Rafique 2003-01-24 13:52:03 UTC
Created attachment 7605 [details, diff]
Fix for getting a successful compile for mod_perl-1.99.07
Comment 3 Haroon Rafique 2003-01-24 14:53:39 UTC
All of this has been fixed in 1.99.08 in the file
src/modules/perl/modperl_apache_includes.h:

*** modperl-2.0/src/modules/perl/modperl_apache_includes.h	2002/08/21 16:42:02	1.17
--- modperl-2.0/src/modules/perl/modperl_apache_includes.h	2003/01/10 23:26:03	1.19
***************
*** 19,24 ****
--- 19,31 ----
  #include "http_vhost.h"
  #include "ap_mpm.h"
  
+ #ifndef APR_POLLIN
+ /*
+  * apr_poll.h introduced around 2.0.40
+  * APR_POLL* constants moved here around 2.0.44
+  */
+ #include "apr_poll.h"
+ #endif
  #include "apr_lib.h"
  #include "apr_strings.h"
  #include "apr_uri.h"
Comment 4 Haroon Rafique 2003-01-24 14:54:56 UTC
BTW, 1.99_08 build out of the box by copying the 1.99_07 ebuild and bumping up
NEWP and updating the SRC_URI. I will submit a new bug request to add 1.99_08.
Comment 5 Haroon Rafique 2003-01-24 15:37:59 UTC
Added bug 14503
Comment 6 Donny Davies (RETIRED) gentoo-dev 2003-01-24 20:18:28 UTC
i just added the new one and deleted the old one.

thanks a bunch for your analysis/reports.