Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 3876

Summary: apache fails to start when loading php
Product: Gentoo Linux Reporter: Jacob Perkins <source>
Component: Current packagesAssignee: Nicholas Jones (RETIRED) <carpaski>
Severity: normal CC: gentoo, jap1, jens, kch, mholzer, rolf.offermanns, rphillips, seemant, woodchip
Priority: High    
Version: 1.1a   
Hardware: x86   
OS: Linux   
Package list:
Runtime testing required: ---

Description Jacob Perkins 2002-06-18 23:08:29 UTC
error is:
cannot load /usr/lib/ undefined symbol:
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2002-06-19 03:37:42 UTC
I've seen something like this before way in the past but not with Apache &  
PHP. It was something I wrote. The fix was simple.  
Compiler? Version?  
Apache Version?  
PHP Version?  
USE variables from /etc/make.conf?  
I don't seem to have at all. 
Comment 2 Jacob Perkins 2002-06-19 09:01:11 UTC
After removing xml from my use vars, unmerging sablotron, remerging php, 
everything works fine.  Seems it could be an issue with sablotron and not php, 
so here's my version info.
gcc 3.1-r6, apache 1.3.24-r6, php 4.2.1-r1, sablotron was 0.90
Do you really want all my use vars when I've already determined it was xml?
Comment 3 Nicholas Jones (RETIRED) gentoo-dev 2002-06-23 19:10:10 UTC
Have you tried remerging 'sablot' and php after apache was built? Is this still
an issue for you?
Comment 4 Jacob Perkins 2002-06-24 00:51:11 UTC
yes, I believe I did try remerging both after apache, and the only fix was
emerging php without xml as a use
Comment 5 Roman Weber 2002-06-26 14:24:33 UTC
Hi Jacob, 
It looks like an gcc issue.

Search with google '__gxx_personality_v0'.

I don't know, how to resolve this at this time, but I will later look into it...


Comment 6 Roman Weber 2002-07-10 04:34:23 UTC
please wait until the new expat (Bug #4797) and sablotron (Bug #4798) packages
are in portage.
The try it again please.

Comment 7 Nicholas Jones (RETIRED) gentoo-dev 2002-07-17 06:54:45 UTC
Ok... They're in portage... Let's test this so I can close this bug.
Comment 8 Jens Ansorg 2002-07-17 13:14:25 UTC
just installed the new dev-php/mod_php-4.2.1-r5: 

 * Starting apache...
Syntax error on line 59 of /etc/apache/conf/apache.conf:
Cannot load /etc/apache/extramodules/ into server:
/usr/lib/ undefined symbol: __gxx_personality_v0                

this is with 

2.4.19-gentoo-r7 #3 Mon Jul 15 10:49:01 CEST 2002 i686 AuthenticAMD
gcc version 3.1
apache 1.3.26-r3
sablotron  0.95-r1

USE don't matter: only USE="xml" which I need to build XSLT Support (with sablotron)

Comment 9 Ryan Phillips (RETIRED) gentoo-dev 2002-07-17 16:02:38 UTC
looks like a bug in salbotron not linking g++, but with gcc... I'll see if I can
fix it when I get home.
Comment 10 Ryan Phillips (RETIRED) gentoo-dev 2002-07-17 16:05:43 UTC
many people having the same problem:

Can anyone confirm if the package works on gcc 3.1.1?
Comment 11 Jens Ansorg 2002-08-08 18:13:28 UTC
maybe this is of some help:

on the libtool list somebody suggested to use libtool HEAD. Unfortunately I have
no Idea how to do this
Comment 12 Roman Weber 2002-08-10 10:05:40 UTC
I've contacted the sablotron developer and he sends me another solution.
Can someone try this? (I'm in the army until 25. Oct and have not much time now)

Problem is, that the libsablot is an C++ library and is linked to PHP C code.
Since the resulting executable is linked by gcc (not g++) some standard
libraries are not linked.

You don't need to play with autoconf & Co., what you need it to tweak the
LDFLAGS environment during the PHP 'configure' phase and building.

You need to guess the compiler dependend library, usually something like -lgcc
or similar.

So try export LDFLAGS='-lgcc' and experiment. (-lstdc++ is a next candidate).

I'm really sorry for this inconvenience, but it's resulting from different
languages used. Not our guilt. I'm trying to tweak the best configuration
possible for a long time, but this issue remains.
Comment 13 John Sutherland 2002-08-13 13:33:53 UTC
After running into this bug myself w/ Apache and PHP, I tried the following: 
export LDFLAGS='-lstdc++' 
emerge sablotron 
emerge php 
After that, everything seem to work fine. 
Comment 14 Jens Ansorg 2002-08-13 15:26:24 UTC

setting the LDFLAG works

PHP runs fine with XSLT extention now

Comment 15 Jesus Gonzalez Alvarez 2002-08-14 13:54:14 UTC
Hi all,

I have a problem similar to yours but not the same. When I try to start apache
with PHP support i get a segmentation fault. If  I run php itlsef it give me a
segmentation fault so if probably a problem only concerned with php.

My configuration is:

gcc version 2.95.3 20010315 (release)
Server version: Apache/1.3.26 (Unix)
php: Latest version Available: 4.2.2

The first time I get the problem I did'nt have sablotron installed. I try to fix
that but it's still borken.

(gdb) exec-file php
(gdb) run
Starting program: /usr/bin/php php

Program received signal SIGSEGV, Segmentation fault.
0x4000926b in ?? ()

I can't give you more information because I don't know what to do ;)
Comment 16 Jacob Perkins 2002-08-14 14:49:49 UTC
I just got it working with the LDFLAGS too.
kch: are you using mod_php or php? For apache, you should be using mod_php
Comment 17 Jesus Gonzalez Alvarez 2002-08-15 02:08:24 UTC
First time I get the segmentation fault i had installed php and mod_php. Then 
I umerge both php  and php_mod and remove all configuration files.Then I did:

export LDFLAGS='-lstdc++'
emerge mod_php 

as Jacob Perkins said and try to run apache with php support. It fail again:

/etc/init.d/apache restart
 * Stopping apache...                                                     [ ok ]
* Starting apache...
/sbin/ line -30:  7806 Segmentation fault      start-stop-daemon
--quiet --start --startas /usr/sbin/apache --pidfile /var/run/ --
[ !! ]

Then I try to do it again but installing sablotron before than mod_php, but it's
the same.

Why don't it  work for me?
Comment 18 Ryan Phillips (RETIRED) gentoo-dev 2002-09-02 00:27:35 UTC
*** Bug 7187 has been marked as a duplicate of this bug. ***
Comment 19 Donny Davies (RETIRED) gentoo-dev 2002-09-02 00:34:17 UTC
FWIW, ive gotten this locally, and fixed it locally by adding
  export LDFLAGS=-lstdc++
immediately above the ./configure line in the sablotron ebuild.

mod_php doesnt need to be rebuilt, just sablotron.

this fix should be committed, any reason not to; anybody?
Comment 20 Jesus Gonzalez Alvarez 2002-09-07 12:55:04 UTC
Now it's working fine for me using Comment #19 From Donny Davies.

But just for curiosity... what is the relation between Sablotron and apache-php?
Comment 21 Ryan Shaw 2002-09-23 19:48:37 UTC
Please add this fix to the sablotron ebuild.
Comment 22 Ryan Phillips (RETIRED) gentoo-dev 2002-09-24 00:31:12 UTC
Comment 23 Ryan Phillips (RETIRED) gentoo-dev 2002-09-24 00:31:57 UTC
*** Bug 8080 has been marked as a duplicate of this bug. ***