| View previous topic :: View next topic |
| Author |
Message |
Mad_Jester Tux's lil' helper


Joined: 08 Jan 2004 Posts: 85
|
Posted: Mon Mar 07, 2005 7:55 pm Post subject: Apache2 and mod_perl not working together |
|
|
I have come across a strange annoyance with portage in relation to apache2 and the mod_perl builds. The current stable version of apache is 2. However, the stable version of mod_perl is for apache 1, and will attempt to install apache 1 as a dependancy. This seems like a strange oversight, and was slightly confusing at first. I can see how someone could get stuck trying to get perl working with apache. Is there a reason for this inconsistency? I avoid installing unstable packages onto my production servers for obvious reasons, and I don't think I would have figured this out without going in and looking at the ebuilds manually. If you were to install apache, and then attempt to install perl support you would end up without perl support in apache2 and with an entirely seperate instance of apache installed. To get both in the stable tree, you would have to know that you needed to install apache, reset your ACCEPT_KEYWORDS, install mod_perl, and then set the ACCEPT_KEYWORDS back. I think it is precisely these kinds of problems with portage that discourage people from using gentoo as a production server platform. Is there something I am missing here people?
Last edited by Mad_Jester on Mon Mar 07, 2005 9:43 pm; edited 1 time in total |
|
| Back to top |
|
 |
Mad_Jester Tux's lil' helper


Joined: 08 Jan 2004 Posts: 85
|
Posted: Mon Mar 07, 2005 8:01 pm Post subject: Error |
|
|
I forgot to include the original problem I was surfing the forums for. When I attempt to install mod_perl in the unstable tree for apache 2, I get the following error:
Configuring Apache/2.0.52 mod_perl/1.99_11 Perl/v5.8.5
*** configuration file /usr/lib/apache2/conf/modules.d/*.conf does not exist
!!! Using Perl 5.8.5 w/o ithreads and 'worker' mpm httpd.
!!! Failed requirements:
!!! - Perl built with ithreads (build perl with -Dusethreads)
*** configuration file /usr/lib/apache2/conf/modules.d/*.conf does not exist
!!! ERROR: dev-perl/mod_perl-1.99.11 failed.
!!! Function src_compile, Line 74, Exitcode 1
Is this a problem with my perl installation? My perl installation was not installed using the ithreads flag. |
|
| Back to top |
|
 |
Mad_Jester Tux's lil' helper


Joined: 08 Jan 2004 Posts: 85
|
Posted: Mon Mar 07, 2005 8:31 pm Post subject: Perl |
|
|
I was able to get mod_perl installed by compiling perl with ithreads (this seems contrary to the above error, which seems to be complaining about the existence of ithreads, does this make sense?), but apache wouldn't restart using the -D perl flag. It fails with the following error:
* Apache2 has detected a syntax error in your configuration files:
Syntax error on line 3 of /usr/lib/apache2/conf/modules.d/75_mod_perl.conf:
Cannot load /usr/lib/apache2/extramodules/mod_perl.so into server: /usr/lib/apache2/extramodules/mod_perl.so: undefined symbol: Perl_Ipatchlevel_ptr |
|
| Back to top |
|
 |
Mad_Jester Tux's lil' helper


Joined: 08 Jan 2004 Posts: 85
|
Posted: Mon Mar 07, 2005 11:29 pm Post subject: Perhaps solved |
|
|
| I may have this one fixed if anyone else is having the same problem. Re-emerging libperl, perl, and mod_perl with ithreads flag enabled allowed apache 2 to start with the -D PERL flag. Perl still isn't working, but that may be my configuration at this point. |
|
| Back to top |
|
 |
_troll_ Bodhisattva


Joined: 04 Feb 2004 Posts: 1971 Location: Warszawa, Poland
|
Posted: Sat Mar 12, 2005 2:05 am Post subject: |
|
|
Are you using new apache from portage (like 2.0.53)? If so - than there is no extramodules directory anymore... it has changed. Put ypur module into /usr/lib/apache2/modules - it helps me start php. Now I'm recompiling perl with ithreads... hope this will not blow up my home-server
Regards,
Przemek _________________ Życie jest jak pudełko czekoladek....
Nigdy nie wiesz na co trafisz" by mother of Forrest Gump |
|
| Back to top |
|
 |
ozbird Apprentice


Joined: 21 Oct 2003 Posts: 185
|
Posted: Thu May 12, 2005 11:35 pm Post subject: Wrong conf directory location? |
|
|
I noticed similar errors when I installed mod_perl-1.99.11 with apache-2.0.54-r5.
It complains it can't find /usr/lib/apache2/conf/modules.d/*.conf and /usr/lib/apache2/conf/vhosts.d/*.conf - it should be looking in /etc/apache2/modules.d/ and /etc/apache2/vhosts.d/ instead? |
|
| Back to top |
|
 |
gcasillo l33t


Joined: 23 Sep 2003 Posts: 739 Location: Cincinnati, Ohio, USA
|
Posted: Tue May 17, 2005 2:37 pm Post subject: |
|
|
| _troll_ wrote: | Are you using new apache from portage (like 2.0.53)? If so - than there is no extramodules directory anymore... it has changed. Put ypur module into /usr/lib/apache2/modules - it helps me start php. Now I'm recompiling perl with ithreads... hope this will not blow up my home-server
Regards,
Przemek |
mod_perl-1.99.17-r1 puts mod_perl.so in /usr/lib/apache2-extramodules. I tried moving it to /usr/lib/apache2/modules, and changing my config files, but no dice. How do I get mod_perl working?
| Code: | cheetah conf.d # HEAD localhost
200 OK
Connection: close
Date: Tue, 17 May 2005 14:32:16 GMT
Accept-Ranges: bytes
ETag: "b0f31-5a3-1969b600"
Server: Apache/2.0.54 (Gentoo/Linux)
Content-Length: 1443
Content-Type: text/html; charset=ISO-8859-1
Last-Modified: Tue, 17 May 2005 14:22:16 GMT
Client-Date: Tue, 17 May 2005 14:32:16 GMT
Client-Peer: 127.0.0.1:80
Client-Response-Num: 1 |
| Code: | cheetah conf.d # cat /etc/conf.d/apache2
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-src/apache/dist/2.0/init/apache2.confd,v 1.1 2005/01/08 03:58:40 vericgar Exp $
# Config file for /etc/init.d/apache2
# An example from /etc/apache2/modules.d/40_mod_ssl.conf:
#
# <IfDefine SSL>
# <IfModule !mod_ssl.c>
# LoadModule ssl_module extramodules/mod_ssl.so
# </IfModule>
# </IfDefine>
#
# This means that the mod_ssl.so DSO module is only loaded
# into the server when you pass "-D SSL" at startup. To
# enable WebDAV, add "-D DAV -D DAV_FS". If you installed
# mod_php then add "-D PHP4". For more options, please
# read the files in the /etc/apache2/modules.d directory.
APACHE2_OPTS="-D PERL"
# Extended options for advanced uses of Apache ONLY
# You don't need to edit these unless you are doing crazy Apache stuff
# As not having them set correctly, or feeding in an incorrect configuration
# via them will result in Apache failing to start
# YOU HAVE BEEN WARNED.
# ServerRoot setting
SERVERROOT=/usr/lib/apache2
# MPM to use
# to get available MPMs:
# for i in `ls /usr/sbin/apache2.*`; do echo `basename ${i/apache2./}`;done
#MPM=prefork
# Configuration file location
# - If this does NOT start with a '/', then it is treated relative to
# $SERVERROOT by Apache
#CONFIGFILE=conf/httpd.conf
# Location to log startup errors to
# They are normally dumped to your terminal.
#STARTUPERRORLOG="/var/log/apache2/startuperror.log" |
| Code: | cheetah conf.d # cat /etc/apache2/conf/modules.d/75_mod_perl.conf
<IfDefine PERL>
<IfModule !mod_perl.c>
LoadModule perl_module modules/mod_perl.so
</IfModule>
</IfDefine>
<IfModule mod_perl.c>
#PerlTrace all
PerlRequire "/etc/apache2/conf/modules.d/apache2-mod_perl-startup.pl"
</ifModule> |
| Code: | cheetah conf.d # emerge info
Portage 2.0.51.22 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.5-r0, 2.6.11-gentoo-r9 i686)
=================================================================
System uname: 2.6.11-gentoo-r9 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System version 1.6.12
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [enabled]
dev-lang/python: 2.3.5
sys-apps/sandbox: 1.2.8
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.5
sys-devel/binutils: 2.15.92.0.2-r9
sys-devel/libtool: 1.5.16
virtual/os-headers: 2.6.11
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O3 -pipe -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="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distcc distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://gentoo.mirrors.tds.net/gentoo"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 a52 aac acpi alsa apache2 audiofile avi bash-completion berkdb bzlib cdr crypt divx4linux encode ffmpeg flac freetds gdbm ithreads libg++ libwww mad mjpeg mmx mp3 mpeg mssql ncurses nls nptl nptlonly ogg oggvorbis perl php python readline samba sndfile speex sse sse2 ssl tcpd theora threads vorbis xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY |
|
|
| Back to top |
|
 |
gcasillo l33t


Joined: 23 Sep 2003 Posts: 739 Location: Cincinnati, Ohio, USA
|
Posted: Tue May 17, 2005 2:45 pm Post subject: |
|
|
Okay, I found out that mod_perl-1.99.17-r1 puts its config file in /etc/apache2/conf/modules.d/75_mod_perl.conf. Moved it to /etc/apache2/modules.d, and I am a little further.
| Code: | cheetah modules.d # /etc/init.d/apache2 start
* Caching service dependencies ... [ ok ]
* Apache2 has detected a syntax error in your configuration files:
Syntax error on line 3 of /usr/lib/apache2/conf/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 |
Anyone know what that means? |
|
| Back to top |
|
 |
gcasillo l33t


Joined: 23 Sep 2003 Posts: 739 Location: Cincinnati, Ohio, USA
|
|
| Back to top |
|
 |
labrador Guru


Joined: 04 Oct 2003 Posts: 316
|
Posted: Tue May 17, 2005 4:06 pm Post subject: you need mod_perl 2 |
|
|
I believe mod_perl 1 does not work with apache 2 and also mod_perl 2 does not work
with apache 1.3
These pairs work:
mod_perl 1 apache 1.3
mod_perl 2 apache 2.0
You need mod_perl 2, or else drop back to apache 1.3 |
|
| Back to top |
|
 |
taskara Advocate

Joined: 10 Apr 2002 Posts: 3763 Location: Australia
|
Posted: Thu Feb 02, 2006 2:43 am Post subject: |
|
|
gcasillo, that link doesn't seem to work anymore any chance you can post what you did to fix it?
I'm having the same issue.
Cheers,
Chris _________________ Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer! |
|
| Back to top |
|
 |
dec n00b

Joined: 18 Jul 2003 Posts: 63
|
Posted: Thu May 18, 2006 12:43 am Post subject: |
|
|
Hi all,
If you're receiving that undefined symbol error, its probably because one of libperl, perl, apache or mod_perl was compiled without the same threading option as the others.
Set the 'ithreads' and 'threads' USE flags either on or off for all of those packages and recompile them.
Hope this helps,
Tom |
|
| Back to top |
|
 |
Zillode n00b

Joined: 19 May 2006 Posts: 54
|
Posted: Tue Jun 26, 2007 10:01 pm Post subject: |
|
|
thanks for the tip dec, I needed to reemerge libperl with ithread!
* sys-devel/libperl
Latest version available: 5.8.8-r1
Latest version installed: 5.8.8-r1
* www-apache/mod_perl
Latest version available: 2.0.3-r1
Latest version installed: 2.0.3-r1
* dev-lang/perl
Latest version available: 5.8.8-r2
Latest version installed: 5.8.8-r2 |
|
| Back to top |
|
 |
|