Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31297 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51959 invoked by uid 1010); 27 Jul 2007 10:23:15 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 51944 invoked from network); 27 Jul 2007 10:23:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jul 2007 10:23:15 -0000 Authentication-Results: pb1.pair.com header.from=thetaphi@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=thetaphi@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 80.190.230.99 as permitted sender) X-PHP-List-Original-Sender: thetaphi@php.net X-Host-Fingerprint: 80.190.230.99 www.troja.net Linux 2.5 (sometimes 2.4) (4) Received: from [80.190.230.99] ([80.190.230.99:38764] helo=mail.troja.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CF/31-42465-397C9A64 for ; Fri, 27 Jul 2007 06:23:15 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.troja.net (Postfix) with ESMTP id 5BA972DBC5; Fri, 27 Jul 2007 12:23:12 +0200 (CEST) Received: from mail.troja.net ([127.0.0.1]) by localhost (cyca.troja.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 32127-06; Fri, 27 Jul 2007 12:23:07 +0200 (CEST) Received: from VEGA (unknown [134.102.249.76]) (using SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.troja.net (Postfix) with ESMTP id B2D522DB9D; Fri, 27 Jul 2007 12:23:07 +0200 (CEST) To: "'Antony Dovgal'" , References: <1185527744.6559.6.camel@kleinweby-laptop> <46A9BEC4.5040803@zend.com> Date: Fri, 27 Jul 2007 12:23:17 +0200 Message-ID: <000001c7d038$264a54a0$4cf96686@VEGA> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <46A9BEC4.5040803@zend.com> Thread-Index: AcfQMx4VeZHVQSOnQm6E6XEBAkk0pgABB/Ag X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 X-Virus-Scanned: amavisd-new at troja.net Subject: RE: [PHP-DEV] php5 as universal binary (Mac OS X) From: thetaphi@php.net ("Uwe Schindler") The simpliest would be to create a patch that is included *after* the configure-generated .h file. I do not exactly now, in which PHP/Zend specific .h file the configure generated php_config.h one is included, but that would be the place to place the following macro: #if defined(MACOSX) (I do not know the exact macro for detecting osx) # undef WORDS_BIGENDIAN # define WORDS_BIGENDIAN __BIG_ENDIAN__ #endif Just an idea. Or just update to a newer autoconf version that can detect this (I know newer ones do this correctly). But this is not possible for PHP. ----- Uwe Schindler thetaphi@php.net - http://www.php.net NSAPI SAPI developer Bremen, Germany > -----Original Message----- > From: Antony Dovgal [mailto:antony@zend.com] > Sent: Friday, July 27, 2007 11:46 AM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] php5 as universal binary (Mac OS X) > > Intel Mac is little-endian, PPC Mac is big-endian. > Endiannes is detected during configure run, that's why the binary works > fine on Intel Mac, but not on PPC. > > To make it work on both you either need to build separate binaries on PPC > and Intel, and > then merge them (IIRC that was possible), or you need to patch PHP > sources. > In my case patching PHP sources was the easiest solution, so I replaced > WORDS_BIGENDIAN macro (defined by configure) with __BIG_ENDIAN__ (defined > by Mac GCC in compile time). > > If anyone have any suggestions on how to improve universal binary support > so that > it would not require patching, I'd gladly listen to them. > > On 27.07.2007 13:15, Christian Speich wrote: > > hello, > > > > I have asked in the gernal php list and they say I should be ask here: > > > > I have an problem with php5 as universal binary on Mac OsX. > > > > The universal binary was build on an intel mac and it works good... on > > an intel mac ;) > > > > When a friend it try on an ppc mac he had some problems. > > > > For example phpsqliteadmin say this error: > > Fatal error: Balloc() allocation exceeds list boundary > > in /Applications/xampp/xamppfiles/phpsqliteadmin/SPSQLite.class.php on > > line 998 > > > > And phpmyadmin loads and loads and loads and loads... > > > > BUT my php4 universal binary works perfect on intel and ppc macs... :/ > > > > My configure for php5 look like this: > > > > PREFIX=/Applications/xampp/xamppfiles > > SYSCONFDIR=/Applications/xampp/etc > > > > export LD_RUN_PATH="$PREFIX/lib" > > export LD_LIBRARY_PATH="$PREFIX/lib" > > export CFLAGS="-I$PREFIX/include -L$PREFIX/lib > > -isysroot /Developer/SDKs/MacOSX10.4u.sdk" > > export CPPFLAGS="-I$PREFIX/include" > > export CXXFLAGS="-I$PREFIX/include -L$PREFIX/lib" > > export LDFLAGS="-L$PREFIX/lib -I$PREFIX/include" > > export SOFLAGS="-L$PREFIX/lib" > > > > CFLAGS="$CFLAGS -arch i386 -arch ppc" ./configure --prefix=$PREFIX > > --program-suffix=-5.2.3 --libdir=$PREFIX/lib/php/php5 --includedir= > > $PREFIX/include/php/php5 --with-apxs2=$PREFIX/bin/apxs > > --with-config-file-path=$SYSCONFDIR --with-mysql=$PREFIX --disable-debug > > --enable-bcmath --enable-calendar --enable-ctype --enable-dbase > > --enable-discard-path --enable-exif --enable-filepro > > --enable-force-cgi-redirect --enable-ftp --enable-gd-imgstrttf > > --enable-gd-native-ttf --with-ttf --enable-magic-quotes > > --enable-memory-limit --enable-safe-mode --enable-shmop > > --enable-sigchild --enable-sysvsem --enable-sysvshm --enable-track-vars > > --enable-trans-sid --enable-wddx --enable-yp --with-ftp --with-ncurses= > > $PREFIX --with-gdbm=$PREFIX --with-jpeg-dir=$PREFIX --with-png-dir= > > $PREFIX --with-freetype-dir=$PREFIX --without-xpm --with-zlib=yes > > --with-zlib-dir=$PREFIX --with-openssl=$PREFIX --with-expat-dir=$PREFIX > > --enable-xslt=$PREFIX --with-xsl=$PREFIX --with-dom=$PREFIX --with-ldap= > > $PREFIX --with-gd=$PREFIX --with-mysql-sock=$PREFIX/var/mysql/mysql.sock > > --with-mcrypt=$PREFIX --with-mhash=$PREFIX --enable-sockets > > --with-curl=$PREFIX --enable-mbregex --enable-zend-multibyte --with-zip= > > $PREFIX --enable-exif --with-sqlite --with-libxml-dir=$PREFIX > > --enable-soap --enable-pcntl --enable-dbx --with-mysqli= > > $PREFIX/bin/mysql_config --with-bz2=$PREFIX --with-pear= > > $PREFIX/lib/php/pear --with-mssql=$PREFIX --with-imap-dir=$PREFIX > > --with-imap=$PREFIX --enable-mbstring=all --with-pgsql=shared,/usr > > --with-gettext=$PREFIX > > > > I don't think thats this are errors from the php-scripts, I think thats > > an problem with php. > > > > I hope you can help me to resolve this problem > > > > thanks, > > kleinweby > > > > > -- > Wbr, > Antony Dovgal > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php