Hi Patrick, thanks for you reply and apologies for not providing more info. I am building native on x86_64. I tried both—PHP 5.2.14 and 5.3.3. I used the config options you provided (differences to mine were basically disabling --disable-shared and --with-pic). Still, a bundle is the product of the make process (checked w/ otool -hV).
Maybe I am missing a config option or an LDFLAG for Virtuoso to convince its config test to use a bundle? I have attached my gzipped config.log file. The relevant part is: configure:23919: checking libphp5 library usability configure:23970: gcc -o conftest -O -arch x86_64 -mmacosx-version-min=10.6 -I/Users/norman/Projects/Builds/php-5.2.14/port/include/php/main -I/Users/norman/Projects/Builds/php-5.2.14/port/include/php/Zend -I/Users/norman/Projects/Builds/php-5.2.14/port/include/php/TSRM -I/Users/norman/Projects/Builds/php-5.2.14/port/include/php -O -arch x86_64 -mmacosx-version-min=10.6 conftest.c -L/Users/norman/Projects/Builds/php-5.2.14/port/lib -lphp5 >&5 ld: in /Users/norman/Projects/Builds/php-5.2.14/port/lib/libphp5.so, can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) collect2: ld returned 1 exit status My Virtuoso configure options were: export CFLAGS="-O -arch x86_64 -mmacosx-version-min=10.6" \ export CCFLAGS="-O -arch x86_64 -mmacosx-version-min=10.6" \ export CXXFLAGS="-O -arch x86_64 -mmacosx-version-min=10.6" \ export LDFLAGS="-O -arch x86_64 -mmacosx-version-min=10.6" ./configure \ --prefix=/opt/local/virtuoso-php-hosting-6.1.2 \ --with-readline=/opt/local/lib \ --enable-fct-vad \ --enable-conductor-vad \ --enable-ods-vad \ --enable-php5=/Users/norman/Projects/Builds/php-5.2.14/port Any more ideas? Regards, Norman
config.log.gz
Description: GNU Zip compressed data
On 28.10.2010, at 23:12, Patrick van Kleef wrote: > 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 > > –––– Norman Heino Semantic Web Researcher/Developer at AKSW Research Group <http://aksw.org/> University of Leipzig WebID: http://id.feedface.de/me
