Hi Norman,

I am having the same problem as described by David in an earlier post to this list (which I am quoting below). Is there a solution available meanwhile?

The problem basically is, that PHP SAPI is built as an .so file of type MH_BUNDLE but ld expects a MH_DYLIB. PHP uses its own (old) version of libtool I tried to symlink to /usr/bin/glibtool (delivered with the OS by Apple) but to no avail.


I'm am not having success in getting php hosting up on Mac OS 10.5.
Following the instructions here
http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VOSBldPHP

, I am getting a link error.
I can't figure out how to get a dylib out of the php build process.

configure:23970: /usr/bin/gcc-4.0 -o conftest -O2 -arch ppc -I/opt/
local/include -I/Users/virgin
ia/php53/include/php/main -I/Users/virginia/php53/include/php/Zend - I/
Users/virginia/php53/inclu
de/php/TSRM -I/Users/virginia/php53/include/php -L/opt/local/lib - arch
ppc conftest.c  -L/Users/
virginia/php53/lib -lphp5 >&5
ld: in /Users/virginia/php53/lib/libphp5.so, can't link with bundle
(MH_BUNDLE) only dylibs (MH_
DYLIB)
collect2: ld returned 1 exit status


any ideas on the proper build flags and where to add them to the build
process (acinclude.m4 maybe?)?

First of all Virtuoso PHP hosting only supports 5.2.X (lastest is 5.2.14) at this time.

I also use glibtool from 10.5 instead of the version of libtool supplied by the php package, since the latter does not understand some of the special flags on Mac OS X like -arch and -Framework.

Since you do not state which architecture you are building for (i386, ppc or x86_64) i will give you the PPC settings i have in my build script for PHP, but replacing ppc with i386 or x86_64 should be trivial. This script also refers to other external libraries normally not build on Mac OS X, so you may need to tweak it a little to get what you want.

Note that this script uses minimum version of 10.5 as i normally port it on 10.5, but the resulting library has been tested on 10.6. I have scheduled to do a native build on 10.6, so i will report if there are extra steps needed.

------- config.nice ------

#! /bin/sh
#
# Created by configure

CFLAGS='-O2 -arch ppc -mmacosx-version-min=10.5 -isysroot /Developer/ SDKs/MacOSX10.5.sdk' \ CXXFLAGS='-O2 -arch ppc -mmacosx-version-min=10.5 -isysroot /Developer/ SDKs/MacOSX10.5.sdk' \ LDFLAGS='-arch ppc -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/ MacOSX10.5.sdk' \
CC='gcc-4.2' \
CXX='g++-4.2' \
'./configure' \
'--prefix=/usr/local/PORT/ppc' \
'--disable-shared' \
'--with-pic' \
'--enable-static' \
'--enable-maintainer-zts' \
'--with-tsrm-pthreads' \
'--enable-embed=shared' \
'--with-config-file-path=.' \
'--with-iodbc=/usr/local/iODBC' \
'--with-gd=shared' \
'--with-freetype-dir=/usr/local/PORT/ppc' \
'--with-zlib' \
'--with-png-dir=/usr/local/PORT/ppc' \
'--with-jpeg-dir=/usr/local/PORT/ppc' \
'--enable-calendar' \
'--enable-ftp=shared' \
'--enable-mbstring=shared' \
'--enable-exif=shared' \
'--with-bz2=shared' \
'--with-curl=shared,/usr/local/PORT/ppc' \
'--with-gmp=shared,/usr/local/PORT/ppc' \
'--with-ldap=shared,/usr/local/PORT/ppc' \
'--with-openssl=shared,/usr/local/PORT/ppc' \
'--with-openssl-dir=/usr/local/PORT/ppc' \
'--with-sqlite=shared' \
'--with-xsl=shared,/usr/local/PORT/ppc' \
'--with-libxml-dir=/usr/local/PORT/ppc' \
'--with-tidy=shared,/usr/local/PORT/ppc' \
'--enable-pdo' \
'--with-pdo-odbc=generic,/usr/local/iODBC,iodbc,-L/usr/local/iODBC/ lib,-I/usr/local/iODBC/include' \
'--without-mysql' \
'--disable-ipv6' \
'--enable-bcmath=shared' \
'--enable-dba=shared' \
'--enable-dbase=shared' \
'--enable-dom=shared' \
'--enable-gd-native-ttf' \
'--enable-shmop=shared' \
'--enable-soap=shared' \
'--enable-sockets=shared' \
'--enable-sysvmsg=shared' \
'--enable-sysvsem=shared' \
'--enable-sysvshm=shared' \
'--enable-wddx=shared' \
'--enable-xmlreader=shared' \
'--enable-xmlwriter=shared' \
'--with-mime-magic=shared' \
'--with-xmlrpc=shared' \
'--with-xsl=shared,/usr/local/PORT/ppc' \
'--with-libxml-dir=/usr/local/PORT/ppc' \
'--with-gmp=shared,/usr/local/PORT/ppc' \
'--without-pear' \
"$@"


---- end of config.nice


Best regards,


Patrick



Reply via email to