Stop Microsoft

Miscellaneous => Technical Support => Topic started by: worker201 on 16 July 2010, 05:20

Title: PHP build chokes, part 2
Post by: worker201 on 16 July 2010, 05:20
Now I'm doing this on Snow Leopard, which is even more fun.

My configure command:
Code: [Select]
$ sudo ./configure --with-apxs2=/usr/sbin/apxs --with-pear --prefix=/usr/local/php5 --with-libxml-dir=/usr/local --enable-exif --with-openssl=/usr/local/ssl --with-zlib --with-zlib-dir=/usr/local --with-bz2=/opt/local --with-curl=/usr/local --with-jpeg-dir=/opt/local --with-png-dir=/usr/local --with-freetype-dir=/usr/local --with-openssl-dir=/usr/local/ssl/include/openssl --with-gettext=/usr/local --with-mysql=/usr/local/mysql --with-pgsql=/Library/PostgreSQL/8.4/bin --enable-soap --enable-shared --enable-static --with-iconv=shared,/usr/local
bzip2 and libjpeg were installed using MacPorts, but libxml2, openssl, zlib, curl, libpng, freetype, gettext, libiconv, mysql, and postgresql were installed and configured by hand.  The reason is that gettext and libiconv are circularly dependent, and installing either via MacPorts causes no end of problems.  So I had to install them and any libraries that depend on them by hand.

PHP builds fine, but then it doesn't work.
Code: [Select]
$ sudo apachectl configtest
httpd: Syntax error on line 115 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/libphp5.so into server: dlopen(/usr/libexec/apache2/libphp5.so, 10): Library not loaded: /usr/local/lib/libcurl.4.dylib\n  Referenced from: /usr/libexec/apache2/libphp5.so\n  Reason: Incompatible library version: libphp5.so requires version 7.0.0 or later, but libcurl.4.dylib provides version 6.0.0

But that can't possibly be true.  I installed curl-7.21.0:
Code: [Select]
$ otool -L /usr/local/lib/libcurl.4.dylib
/usr/local/lib/libcurl.4.dylib:
/usr/local/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 7.0.0)

Interestingly, I had this exact same problem with libiconv at first, but after changing the library flags in the makefile (see my other php chokes thread), that problem disappeared.

If anyone has any suggestions, please help.  This has got to be solvable.
Title: Re: PHP build chokes, part 2
Post by: piratePenguin on 16 July 2010, 17:31
http://www.gnegg.ch/tag/snow-leopard/ (http://www.gnegg.ch/tag/snow-leopard/) ?

Are you sure there are no appropriate builds you can get?

If all else fails, just fucking visualize it.

(btw, php w/o postgresql? - shucks. Does php also not do modules? That is crap too.)
Title: Re: PHP build chokes, part 2
Post by: worker201 on 16 July 2010, 22:00
So, it looks like this is the same problem I talked about in my other post.  There's another version of libcurl.4.dylib in /usr/bin, which is the broken version that comes with Snow Leopard.  For reasons completely unknown, PHP prefers to use that one, as opposed to the one I installed myself, even though I specified the location in the configure.

In an attempt to fix it, I installed a new libcurl over the old one.  Which should work, but it means that I will probably have to do it all over again if I install any system or security updates.
Title: Re: PHP build chokes, part 2
Post by: piratePenguin on 16 July 2010, 22:13
Lol, I said visualize instead of virtualize. I don't know why you don't just virtualize a good gnu/linux server setup if os x is making life so difficult, especially if you're just lookin for a server to play around with from time to time. If your computer is any faster than my piece of trash, this will never be slow.
Title: Re: PHP build chokes, part 2
Post by: worker201 on 18 July 2010, 01:29
There's no reason why this can't work.  It's a matter of perserverance.  I've got PHP working just fine on my Fedora machine.
Title: Re: PHP build chokes, part 2
Post by: Kintaro on 19 July 2010, 23:39
I will solve this problem for you for $10. I will build it for you for $15.

EDIT: this is easy, READ THE ERROR MESSAGE YOU FUCKING RETARD.

You need a newer version of curl. Just use Windows you worthless cunt.

You now owe me $20 for technical support, Worthless201.