Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 21870 - mod_php build problem with GD,gif,png,jpg
Summary: mod_php build problem with GD,gif,png,jpg
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: High normal
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
: 24125 (view as bug list)
Depends on: 16825
Blocks:
  Show dependency tree
 
Reported: 2003-05-28 21:53 UTC by Alexander Chan
Modified: 2006-02-04 06:03 UTC (History)
3 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 Alexander Chan 2003-05-28 21:53:27 UTC
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

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-05-29 00:56:43 UTC
Could you recompile png, jpg, GD with those CFLAGS options?
namely -DPIC -fPIC
And then try mod_php again.
Comment 2 Alexander Chan 2003-05-29 07:26:04 UTC
I have compiled libpng , jpeg , giflib  with -fPIC -DPIC options. it still does not work. the error was same as before.
Comment 3 Mark Guertin 2003-06-09 11:55:35 UTC
-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
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-06-30 03:00:41 UTC
Any updates on this?
Comment 5 Luca Barbato gentoo-dev 2003-07-08 18:34:35 UTC
*** Bug 24125 has been marked as a duplicate of this bug. ***
Comment 6 Pieter Van den Abeele (RETIRED) gentoo-dev 2003-07-15 02:27:15 UTC
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.

Pieter


   
Comment 7 Pieter Van den Abeele (RETIRED) gentoo-dev 2003-07-15 02:43:46 UTC
double checked:

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)
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-07-15 14:29:55 UTC
add depend on me putting a snapshot into the tree.
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-08-11 03:48:41 UTC
pvdabeel: does the latest PHP rc snapshot fix this for your platform?
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-08-11 19:05:40 UTC
See the _rc3 ebuild now in portage for PPC.
Comment 11 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-09-25 18:32:28 UTC
closing again
Comment 12 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-09-25 18:32:36 UTC
closing again