Desire: Apache 2, mod perl 2 so I can run bugzilla on an x86 machine. Result: Apache cannot start when I add -D PERL to my APACHE2_OPTS. Expected Result: Apache should start so everybody can go home happy. Thoughts: mod_perl and perl conflicting? mod_perl-1.99.11 exhibited the same behaviour as 2.0.1-r1 Data: [I--] [ ] net-www/apache-2.0.55-r1 (2) [I--] [ ] dev-lang/perl-5.8.7-r3 (0) [I--] [ ] www-apache/mod_perl-2.0.1-r2 (1) I added mod_perl-2* into package.keywords. Using apache2 with the appropriate mod_perl for apache2 results in not being able to start apache with the following message: /etc/init.d/apache2 start * Apache2 has detected a syntax error in your configuration files: Syntax error on line 3 of /etc/apache2/modules.d/75_mod_perl.conf: Cannot load /usr/lib/apache2/modules/mod_perl.so into server: /usr/lib/apache2/modules/mod_perl.so: undefined symbol: Perl_Ipatchlevel_ptr ldd /usr/lib/apache2/modules/mod_perl.so linux-gate.so.1 => (0xffffe000) libperl.so.1 => /usr/lib/libperl.so.1 (0xb7eb6000) libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7ea5000) libnsl.so.1 => /lib/libnsl.so.1 (0xb7e91000) libdl.so.2 => /lib/libdl.so.2 (0xb7e8e000) libm.so.6 => /lib/tls/libm.so.6 (0xb7e6d000) libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7e40000) libutil.so.1 => /lib/libutil.so.1 (0xb7e3d000) libc.so.6 => /lib/tls/libc.so.6 (0xb7d2e000) /lib/ld-linux.so.2 (0x80000000) emerge --info Portage 2.0.54 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.14-hardened-r5 i686) ================================================================= System uname: 2.6.14-hardened-r5 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz Gentoo Base System version 1.6.14 dev-lang/python: 2.3.4, 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer" DISTDIR="/mnt/distfiles" FEATURES="autoconfig buildpkg ccache distlocks fixpackages sandbox sfperms strict" GENTOO_MIRRORS="http://adelie.polymtl.ca/ ftp://cs.ubishops.ca/pub/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://mirror.iat.sfu.ca/gentoo-portage" USE="x86 acpi apache2 berkdb bzip2 crypt dba expat gd gdbm gif imap innodb ipv6 ithreads jpeg ldap mmx mpm-worker mysql mysqli ncurses nls no-htdocs nptl pam pcre perl php png python readline session slp snmp srvdir sse ssl tcpd threads truetype usb userlocales utf8 vhosts xml xml2 zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS emerge --info Portage 2.0.54 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.14-hardened-r5 i686) ================================================================= System uname: 2.6.14-hardened-r5 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz Gentoo Base System version 1.6.14 dev-lang/python: 2.3.4, 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer" DISTDIR="/mnt/distfiles" FEATURES="autoconfig buildpkg ccache distlocks fixpackages sandbox sfperms strict" GENTOO_MIRRORS="http://adelie.polymtl.ca/ ftp://cs.ubishops.ca/pub/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://mirror.iat.sfu.ca/gentoo-portage" USE="x86 acpi apache2 berkdb bzip2 crypt dba expat gd gdbm gif imap innodb ipv6 ithreads jpeg ldap mmx mpm-worker mysql mysqli ncurses nls no-htdocs nptl pam pcre perl php png python readline session slp snmp srvdir sse ssl tcpd threads truetype usb userlocales utf8 vhosts xml xml2 zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
i'll need to backport my perl first to test this...2.0.1 was tested against 5.8.6 and 5.8.7 originally without exhibiting this bug though. Out of curiousity, can you also toss in the version of sys-devel/libperl you have installed?
[I--] [ ] sys-devel/libperl-5.8.7 (1)
On a vserver less than an hour old: Calculating dependencies... done! [ebuild R ] sys-devel/libperl-5.8.7 [ebuild R ] dev-lang/perl-5.8.7-r3 [ebuild R ] www-apache/mod_perl-2.0.1-r2 [ebuild R ] net-www/apache-2.0.55-r1 ps -ef | grep apach root 619 1 0 21:52 ? 00:00:00 /usr/sbin/apache2 -D DEFAULT_VHOST -D PERL -d /usr/lib/apache2 -f /etc/apache2/httpd.conf -k start loaded just fine, only difference between now and when emerge finished was that I added -D PERL to the end of the conf.d/apache2 options line. So... granting a difference between amd64 and x86, which should account for library path diffs, here is what I see: ldd /usr/lib64/apache2/modules/mod_perl.so libperl.so.1 => /usr/lib/libperl.so.1 (0x00002aaaaabf1000) libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00002aaaaae14000) libnsl.so.1 => /lib/libnsl.so.1 (0x00002aaaaaf29000) libdl.so.2 => /lib/libdl.so.2 (0x00002aaaab03f000) libm.so.6 => /lib/tls/libm.so.6 (0x00002aaaab143000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x00002aaaab2c9000) libutil.so.1 => /lib/libutil.so.1 (0x00002aaaab3fd000) libc.so.6 => /lib/tls/libc.so.6 (0x00002aaaab501000) /lib64/ld-linux-x86-64.so.2 (0x0000555555554000) fwiw, same ldd on my x86 with perl-5.8.8 and mod_perl-2.0.2 $ ldd /usr/lib/apache2/modules/mod_perl.so linux-gate.so.1 => (0xffffe000) libperl.so.1 => /usr/lib/libperl.so.1 (0xb7df4000) libpthread.so.0 => /lib/libpthread.so.0 (0xb7da2000) libnsl.so.1 => /lib/libnsl.so.1 (0xb7d8d000) libdl.so.2 => /lib/libdl.so.2 (0xb7d89000) libm.so.6 => /lib/libm.so.6 (0xb7d66000) libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7d38000) libutil.so.1 => /lib/libutil.so.1 (0xb7d33000) libc.so.6 => /lib/libc.so.6 (0xb7c1c000) /lib/ld-linux.so.2 (0x80000000) Now that we've done that (so you know I'm not completely daft): why -j4? Do you have 3 cpu's? 'cause parallelizing jobs can cause weirdness sometimes. other than that, nothing strikes me as significant (aside from the 4 installs i've done this week working vs. this failure on your end :)
*** This bug has been marked as a duplicate of 88512 ***
I don't believe this is a duplicate of bug 88512, but it may be (though that bug is very confused) http://gentoo-wiki.com/HOWTO_Apache2_with_perl provides a solution for this error though (some quick googling brought me here...) Common Problems Note: If you receive an error about Perl_Ipatchlevel_ptr, it's probably because you just added ithreads to your make.conf file. Re-emerge libperl.
Definitely not a duplicate of bug 88512. But I have managed to fix the problem. Yes, it is a perl issue. Now that I know there is something called libperl (from your pervious comment), I noticed that libperl had -ithreads, and perl had ithreads, so I thought this might be an issue. (I turned down make opts to -j2) Emerging libperl with USE=ithreads causes the following issue with vim! vim /etc/make.conf vim: symbol lookup error: vim: undefined symbol: PL_markstack_ptr Disastrous results trying to start apache. So I went an emerged libperl and perl with USE=-ithreads Surprise, vim works again. Since I took off threading in perl, I had to take it off in apache. USE now is at -ithreads & -threads & -mpm-worker With -D PERL, apache takes about 5-10 minutes to start, but it does start so I'm ok with this. Configuring apache vhost to exec cgi etc. and loading a cgi file shows mod_perl does work! I needed all this fun for installing bugzilla, which now is working! For future reference, I would recommend anybody that wants to use a threaded version of mod_perl to not, under any circumstances continue on this path, for there is nothing but pain and suffering trying to get a threaded perl working with apache.
Michael Stewart, is right, I did just add ithreads. Anyways, the solution is not to use threads at all.
bah, my apologies, i jumped the gun on that. and yea - ithreads is evil. but people like it and complain that it isn't a default (ACK) so its there. If you rebuilt perl with ithreads (and now libperl) you may want to seriously consider running libperl with a reallyall since anything you installed under perl pre-threads (perl threads mind you, not posix) would have installed in /i686/, but threaded perl is looking at /i686-threads/. Or vice versa....bah....glad this wasn't nearly as painful as it could have been, sorry too have messed that up on you.
(In reply to comment #8) > running libperl with a reallyall since anything you installed under perl perl-cleaner that is