PDA

View Full Version : Compiling PHP 5.2.17



erickmlr
February 11th, 2012, 10:15 PM
I'm trying to compile PHP 5.2.17 on Ubuntu 11.10 x64 (to use it side-by-side with 5.3), with no success. What I've done:

1. Downloaded source from php.net, unpacked it
2. Run...

./configure --prefix=/usr/local/php-5.2.17 --with-config-file-path=/usr/local/php-5.2.17/etc --disable-ipv6 --with-zlib --enable-bcmath --with-bz2 --with-curl --enable-exif --enable-ftp --with-gd --with-ttf --enable-gd-native-ttf --with-imap-ssl --enable-mbstring --with-mhash --with-mysql --with-mysqli --enable-pcntl --with-pdo-mysql --with-pdo-sqlite --enable-shmop --enable-soap --enable-sockets --enable-sqlite-utf8 --with-xmlrpc --with-xsl --with-pear --enable-fastcgi --with-openssl --disable-cli --with-jpeg-dir --with-png-dir

and got the result:

configure: error: libjpeg.(a|so) not found.

What I've tried so far:

. install libjpeg-dev (all versions);
. download and build libjpeg, and defined the path on --with-jpeg-dir;
. updatedb, 'locate' for libjpeg.so, and defined on --with-jpeg-dir all the paths found;

On the x32 versions it compiles normally, and on Fedora Core 16 it compiled normally on both architectures.

Any tip or help?

SeijiSensei
February 12th, 2012, 02:23 PM
When you built libjpeg was it installed to /usr/local/lib? Did you run ldconfig after it was installed? I would think giving the path explicitly to configure should be enough, but try running ldconfig just in case.

00trav
March 1st, 2012, 11:37 PM
I just ran into the same problem for both libjpeg and libpng.

I believe the problem is that the .so's for those libraries are no longer in the same place. I found both in /usr/lib/x86_64-linux-gnu/ (actually found more symlinks pointing libjpeg.so to libjpeg.so.62.0.0 - but there was at least a libjpeg.so to link to)

I was able to fix my problem by just placing symlinks in the /usr/lib folder pointing to each of the libjpeg.so and libpng.so libraries found in the x86_64-linux-gnu/ directory.

dhiaeddine
April 15th, 2013, 06:35 PM
http://blog.angeloff.name/post/2012/06/18/ubuntu-12-04-precise-php-5-2/