Compiling PHP on RHEL 5 64 bit
I'm having a hard time trying to configure/compile PHP for 64 bit.
This is the configure options that I'm using: Code:
./configure --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --datadir=/usr/share --libdir=lib64 --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --disable-debug --disable-rpath --enable-inline-optimization --with-bz2 --with-db4=/usr --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --with-gd --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-regex=system --with-xmlrpc=shared --with-zlib --with-layout=GNU --enable-bcmath --enable-exif --enable-ftp --enable-sockets --enable-sysvsem --enable-sysvshm --enable-wddx --with-pear=/usr/share/pear --with-mysql=shared,/usr --with-snmp=shared,/usr --enable-ucd-snmp-hack --enable-bcmath --enable-shmop --enable-calendar --enable-mbstring=shared --enable-mbregex --with-apxs2=/usr/local/apache2/bin/apxs --with-xsl --enable-mbstring --with-pspell Code:
checking for MING support... no Code:
/usr/bin/ld: skipping incompatible /usr/lib/libgmp.so when searching for -lgmp Can anyone help? Thanks |
I finally managed to do it after fiddling with some configure options.
For anyone else who is trying to do the same, I had to add --libdir=/usr/lib64 and --with-libdir=lib64 If you're using aspell like I am then you also need to add /usr/local/lib to /etc/ld.so.conf and run ldconfig before trying to compile php |
libmysqlclient has been bundled sometimes named as libmysqlclient10 (for whatever reason), but lately it seems to have abandoned entirely. I have wasted a lot of time lately by trying to install libmysqlclient and libmysqlclient10 from precompiled packages also on a 64-bit server - it didn't work out in the end for what I needed it.
Unfortunately compiling entirely from source is no option in my case, but it's good to know what to do, just in case. Thanks for posting the solution! Linux Archive |
I think you only get libmysqlclient10 etc if you use the compat RPM's from MySQL which have the older clients bundled.
|
Thanks buddy, it worked like a charm for "./configuration'.
Though, now "make" command is providing the error below (may be related to the same Mysql Library issue) - ext/mysql/.libs/php_mysql.o(.text+0x1d01): In function `zif_mysql_set_charset': /root/install.php.5.3.2/php-5.3.2/ext/mysql/php_mysql.c:1219: undefined reference to `mysql_set_character_set' ext/mysql/.libs/php_mysql.o(.text+0x1f21): In function `php_mysql_do_query_general': /root/install.php.5.3.2/php-5.3.2/ext/mysql/php_mysql.c:1309: undefined reference to `mysql_set_server_option' collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1 |
All times are GMT -5. The time now is 02:14 AM. |