linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* php compilation fix
@ 2000-08-09  0:29 Michael A. Peters
  2000-08-09  1:48 ` Daniel Jacobowitz
  2000-08-09  5:45 ` Edwin Tam
  0 siblings, 2 replies; 5+ messages in thread
From: Michael A. Peters @ 2000-08-09  0:29 UTC (permalink / raw)
  To: edwintam, linuxppc-dev


I created a patch that makes the changes suggest to php-4.0.1pl2/main/main.c

replace
args = orig_args;
by:
memcpy(args, orig_args, sizeof(orig_args));

in lines 370 & 435

php-4 now builds beautifully on PowerPC, but mod_php-gd does not. Well, it
builds- but apache won't start with gd.so selected in the php.ini file.

Interestingly enough- on Red Hat 6.2 when I build php-4.0.1pl2 without the
patch, mod_php-gd loads beautifully but with the same patch needed to even
build php on PPC, mod_php-gd is broken.

Something about the fix breaks the compilation of gd.so
Well, it compiles, it just doesn't load.
All other modules I currently build load after patch.

This is how I build gd.so:

# Build PHP modules.
build_ext() {
gcc -fPIC -shared $RPM_OPT_FLAGS -DHAVE_CONFIG_H -I.\
        -I. -I`/usr/sbin/apxs -q INCLUDEDIR` -I./Zend \
        -I/usr/include/freetype -I/usr/include/$1 \
        -I./ext/$1 -I./ext/$1/lib$1 -I./main\
        -I./ext/xml/expat/xmltok -I./ext/xml/expat/xmlparse \
        -DHAVE_CONFIG_H `grep ^CPPFLAGS Zend/Makefile | cut -f2- -d=` \
        $4 $2 -o $1.so $3 -lc

build_ext gd "ext/gd/gd.c ext/gd/gdttf.c ext/gd/gdcache.c ext/gd/gdt1.c" \
        "-lpng -lgd -lttf -lt1 -lc" "-DHAVE_GD_PNG  -DHAVE_LIBGD \
        -DHAVE_LIBJPEG -DHAVE_LIBPNG -DHAVE_GDIMAGECOLORRESOLVE \
        -DHAVE_LIBT1 -DHAVE_LIBTTF -DHAVE_LIBGD13 -DCOMPILE_DL_GD"

Any ideas? I'd like to include mod_php-gd if at all possible...

The src rpm I use can be found at

http://staging.omnilinux.com/~mpeters/php-4.0.1pl2-2.src.rpm

please keep in mind that this spec file is still under major work- although
(with the exception of mod_php-gd) everyhing that's not commented out currently
builds spledidly and works on x86 and ppc, and mod_php-gd works on x86 w/o the
patch.

--
Michael A. Peters
http://www.omnilinux.com/

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-08-09 17:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-08-09  0:29 php compilation fix Michael A. Peters
2000-08-09  1:48 ` Daniel Jacobowitz
2000-08-09  5:45 ` Edwin Tam
2000-08-09 15:16   ` David Edelsohn
2000-08-09 17:38   ` Michael A. Peters

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).