Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 56917 - mod_php with USE="imap" doesn't load under apache
Summary: mod_php with USE="imap" doesn't load under apache
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: PPC Linux
: High critical (vote)
Assignee: PPC Porters
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 56963
  Show dependency tree
 
Reported: 2004-07-13 09:24 UTC by Tobias McNulty
Modified: 2005-07-03 19:34 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias McNulty 2004-07-13 09:24:44 UTC
See below.  I tried remerging and got the same results.  4.3.4-r4 has been unmerged.  When I remove -D PHP4 from conf.d/apache2, apache runs fine.

Reproducible: Always
Steps to Reproduce:
1. emerge mod_php
2. /etc/init.d/apache2 restart
Actual Results:  
 * Stopping apache2...            [ ok ]
 * Starting apache2...            [ !! ]

Expected Results:  
 * Stopping apache2...            [ ok ]
 * Starting apache2...            [ ok ]

tail /var/log/apache2/error_log:

[Tue Jul 13 09:21:01 2004] [notice] caught SIGTERM, shutting down
Syntax error on line 5 of /usr/lib/apache2/conf/modules.d/70_mod_php.conf:
Cannot load /usr/lib/apache2/extramodules/libphp4.so into server:
/usr/lib/apache2/extramodules/libphp4.so: R_PPC_REL24 relocation at 0x0dba7f40
for symbol `RAND_seed' out of range


emerge info:

Portage 2.0.50-r9 (default-ppc-2004.1, gcc-3.2.3, glibc-2.3.2-r9, 2.4.26-ppc-r2)
=================================================================
System uname: 2.4.26-ppc-r2 ppc 7400, altivec supported
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="ppc"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=7400 -maltivec -mabi=altivec -pipe"
CHOST="powerpc-unknown-linux-gnu"
COMPILER="gcc3"
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/env.d"
CXXFLAGS="-O2 -mcpu=7400 -maltivec -mabi=altivec -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache"
GENTOO_MIRRORS="gentoo.oregonstate.edu"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="altivec apache2 berkdb cups dvd esd foomaticdb gd gdbm gif gpm imap imlib
jpeg libwww mbox mitshm motif mozilla mysql ncurses nls oggvorbis opengl oss pam
png ppc python readline sasl sdl slang ssl tcpd truetype xml xml2 xv"
Comment 1 Tobias McNulty 2004-07-13 09:59:12 UTC
I masked 4.3.7-r1 and remerged 4.3.4-r4, same problem.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-07-13 10:17:45 UTC
go and trace down the RAND_seed symbol on your system and compile it with -fPIC.
Comment 3 Tobias McNulty 2004-07-15 08:28:37 UTC
I tried the previously-working version of apache (2.0.49-r3) with both versions of PHP, same problem.  I also tried remerging openssl, which I think defines RAND_seed, same problem.  I just updated to mod_php 4.3.8, same problem.

My system is current except I'm using:
sys-libs/glibc-2.3.2-r9
sys-devel/gcc-3.2.3-r4

Since the current snapshots are known broken.  Please advise - I'm stuck on a production machine with no PHP.
Comment 4 SpanKY gentoo-dev 2004-07-15 08:57:45 UTC
RAND_seed comes from openssl i believe ...
Comment 5 Tobias McNulty 2004-07-15 09:01:22 UTC
Yes I think so too - any idea why it might be failing on that symbol?
Toby
Comment 6 Tobias McNulty 2004-07-15 13:03:25 UTC
mod_php works fine when I set USE="-imap"

Toby
Comment 7 Tobias McNulty 2004-07-15 13:13:42 UTC
The problem is that net-libs/c-client is not installed, and it is blocked by virtual/imap-c-client (provided by net-mail/uw-imap).  How can I get the symbols supplied by c-client without removing uw-imap?  Is it simply a matter of telling php with imap to link to the uw-imap-provided c-client?

Toby
Comment 8 Tobias McNulty 2004-07-15 13:35:39 UTC
I rebuild uw-imap (the c-client provider) with USE="pic" (position independent code), in hope of fixing:

R_PPC_REL24 relocation at 0x0dba7f40 for symbol `RAND_seed' out of range

but no luck.  So perhaps PHP/ppc needs to be fixed to link against the PIC code in uw-imap?
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-07-15 13:49:44 UTC
net-libs/c-client  is a stripped down uw-imap, to provide the imap library and headers ONLY.
if you don't use uw-imap at all, unmerge it and merge c-client instead.
i've definetly made sure the PIC stuff is in c-client.

try to build openssl, c-client, php, mod_php all in sequence with USE="ssl imap pic"
Comment 10 Tobias McNulty 2004-07-15 14:07:44 UTC
I would, but I use uw-imap as my local imapd.  uw-imap is built with pic, shouldn't that work?  mod_php/imap did work fine before, when I was using the plain c-client (before I swapped it with uw-imap).
Comment 11 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-07-15 14:53:39 UTC
i've added an r3 of uw-imap, with some of the c-client pic stuff ported over.
please try:
USE="ssl pic imap" emerge openssl uw-imap php mod_php
Comment 12 Tobias McNulty 2004-07-15 15:19:57 UTC
After emerge sync I don't see net-mail/uw-imap-2002e-r3, even in ~ppc.  Where can I find it?  I'm rebuilding anyway with the latest stable ebuild (r1).  Let me know if I need something else, or if this'll use your latest changes.
Comment 13 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-07-15 15:28:02 UTC
you'll have to wait for r3 to reach the mirrors. should take 30-90 minutes depending how busy the various mirror systems are.
Comment 14 Tobias McNulty 2004-07-16 06:45:25 UTC
I merged uw-imap-2002e-r3 and then rebuilt mod_php - it worked. Thanks!

It doesn't look like any of those packages USE 'pic' anymore, but it didn't seem to matter.
Comment 15 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-07-16 20:49:07 UTC
yeah, PIC support is forced in at the right place for c-client/uw-imap.
Comment 16 Tobias McNulty 2005-01-04 13:38:48 UTC
When will this fix be integrated into the main branch?  I just tried merging uw-imap-2004 with mod_php-4.3.10 and got the same thing.

Thanks,
Toby
Comment 17 Tobias McNulty 2005-01-04 13:50:32 UTC
FYI I've been using net-mail/uw-imap-2002e-r3 for 6 months now with absolute stability.  Whatever change was made I trust can be added to the main branch; it's rock solid.
Comment 18 Lars Weiler (RETIRED) gentoo-dev 2005-01-09 01:11:16 UTC
net-mail/uw-imap-2004a is stable on ppc.  Could we close this bug or is there still a problem?
Comment 19 Tobias McNulty 2005-01-09 07:20:14 UTC
Maybe it's marked as stable, but it has the same bug as its "stable" predecessor, net-mail/uw-imap-2002e-r1 (that's why I reopened this bug).  The fix I need is:

  15 Jul 2004; Robin H. Johnson <robbat2@gentoo.org> :
  bug #56917, pic stuff.

(from the ChangeLog)
Comment 20 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2005-02-14 00:12:36 UTC
ppc: the amd64 guys did some fixes for c-client and uw-imap.
take a look at them and see if they solve this for you.
Comment 21 Joe Jezak (RETIRED) gentoo-dev 2005-07-02 11:46:34 UTC
This seems fixed for me.  Please reopen the bug if you're still having problems.
Comment 22 Tobias McNulty 2005-07-03 19:34:40 UTC
Yes now that uw-imap-2002e-r3 is marked stable this but is no longer relevant (r3 is the working version 
I moved to in January).