ID: 14557 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Compile Failure Operating System: MacOS X (10.1.1) PHP Version: 4.1.0 New Comment:
Oops! One more thing! The full text of the tcsh script I'm using is available at http://leraz.dhs.org:8080/~squasar/ manual_php_compile.txt and a script which outputs a phpinfo() is available at http://leraz.dhs.org:8080/ ~squasar/info.php Previous Comments: ------------------------------------------------------------------------ [2001-12-17 01:04:07] [EMAIL PROTECTED] (Incidently, I want to note that most of the problems with the compile seem to stem from libtool, which evidently has no clue what the heck it's doing.) ------------------------------------------------------------------------ [2001-12-17 01:01:26] [EMAIL PROTECTED] The compile of PHP 4.1.0 (source tarball) fails miserably out-of-the-box on MacOS X 10.1.1. The CGI version seems mostly alright, but the Apache DSO is a dismal mess. I'm running the latest released Apache (1.3.22). Also, I'm working with the CC shipped by Apple for OS X (this failed even MORE miserably with my compiled version of GCC, which is expected since OS X isn't supported by GCC yet) After some 5 days of wrestling, writing manual compiles, and running make -n and libtool --dry-run to get some idea of what the compilation is doing, I finally got it to work properly via writing a tcsh script that manually compiles the files involved (My configure is "./configure --with- apxs=/usr/sbin/apxs --enable-ftp --enable-mbstring -- enable-mbstr-enc-trans --with-mysql=/usr/local --enable- sockets --with-tsrm-pthreads --enable-ctype --with-zlib -- prefix=/usr --sysconfdir=/etc --localstatedir=/var -- mandir=/usr/share/man"). Instead of filling this text box beyond its buffer with the entire script (which gets a bit long in the tooth, obviously), here's a summary of what options it uses: cc command when compiling normal source files: /usr/bin/cc -dynamic -fPIC -fno-common -traditional-cpp -O2 -I(all the various include dirs) -D(all the various defines) -c (source file).c -o (source file).lo ld command when combining the .lo files in a dir into a .a: /usr/bin/ld -r -o lib(dir name).a (all the objects from the dir) cc command for creating the final libphp4.so: /usr/bin/cc - bundle -bundle_loader /usr/sbin/httpd -flat_namespace - undefined warning -lm -lz -L/usr/local/lib/mysql - lmysqlclient -o libphp4.so (all the .a's compiled above) # for this one, note that the -L and -l for mysql only apply for compiling with a non-bundled libmysql Putting all this together into a tcsh script gave me a successful PHP compile, and adding the appropriate install command (/usr/sbin/apxs -S LIBEXECDIR="/usr/libexec/httpd" -i -a -n php4 libphp4.so) gave me a working Apache + PHP 4.1.0 + MySQL. My humble suggestion is that whoever maintains the autoconf script for PHP use this information to make a normal ./configure work under Darwin. (incidently, `uname -a` == Darwin hostname 5.1 Darwin Kernel Version 5.1: Tue Oct 30 00:06:34 PST 2001; root:xnu/ xnu-201.5.obj~1/RELEASE_PPC Power Macintosh powerpc). Thanks :) ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14557&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]