I tried to emerge mod_php with GD, png , jpg and apache failed to start.
i even tried to compile it with the following gcc options
-mcpu=750 -O2 -DPIC -fPIC -fsigned-char -mpowerpc-gfxopt -pipe
the error i received in starting apache is the following
Syntax error on line 58 of /etc/apache/conf/apache.conf:
Cannot load /etc/apache/extramodules/libphp4.so into server:
/etc/apache/extramodules/libphp4.so: R_PPC_REL24 relocation at 0x0dbddfd8 for
symbol `end_atoi' out of range
the version of apache was 1.3.27-r3
mod_php was 4.3.1
Steps to Reproduce:
Could you recompile png, jpg, GD with those CFLAGS options?
namely -DPIC -fPIC
And then try mod_php again.
I have compiled libpng , jpeg , giflib with -fPIC -DPIC options. it still does not work. the error was same as before.
-mcpu=750 -O2 -DPIC -fPIC -fsigned-char -mpowerpc-gfxopt -pipe is the problem here
if you are using gcc 3.x based stuff you should change this to:
-mcpu=750 -O2 -pipe
the other options force bad things onto compile time options (like all the *pic options
should _never_ _never_ be forced gloablly). you will likely have to do a lot of
recompiling if you forced these options. Also the powerpc-gfxopt is an optimizatioon for a
special (embedded) ppc chip and should not be used for powermac ppc's
it was also found that forcing -fsigned-char can cause issues in some places. The best
reccomendation I can make here is to let gcc 3.2.x make the choices for you, it does a
MUCH MUCH better job of it than any previous gcc versions did, and also specifyin the
mcpu option enables quite a few of these things for you automaticlly
Any updates on this?
*** Bug 24125 has been marked as a duplicate of this bug. ***
robbat2, php has some upstream issues anyway, would it be possible to make a cvs snapshot and have ppc try that.
maybe this fixes this issue too.
I'm going to look at make.conf - as suggested by mark - to see if it needs to be changed.
CFLAGS settings used in the latest /etc/make.conf are correct
mark used the incorrect settings in his own ppc stage script. Have changed those.
-mcpu=74XX -O2 -pipe -maltivec -mabi=altivec is the G4 setting
-mcpu=750 -O3 -pipe is the G3 setting
none is the generic ppc setting
the -mpowerpc-gfxopt setting is overridden by mcpu and is only used to manually instruct the compiler (if no mcpu) what type of system instructions it needs to generate (POWER or RS/6000)
One nice instruction I found reading through the gcc manpage is -mpowerpc64 wich allows one to build for ppc64 (gcc defaults to -mno-powerpc64)
add depend on me putting a snapshot into the tree.
pvdabeel: does the latest PHP rc snapshot fix this for your platform?
See the _rc3 ebuild now in portage for PPC.