LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-23-2008, 04:18 PM   #1
Noodles25
LQ Newbie
 
Registered: Apr 2007
Posts: 18

Rep: Reputation: 0
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
The configure crashes out with:
Code:
checking for MING support... no
checking for mSQL support... no
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes, shared
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!
In the config.log file it doesn't mention anything about MySQL having problems, but I do get quite a few messages like this:

Code:
/usr/bin/ld: skipping incompatible /usr/lib/libgmp.so when searching for -lgmp
/usr/bin/ld: skipping incompatible /usr/lib/libgmp.a when searching for -lgmp
/usr/bin/ld: skipping incompatible /usr/lib/libfreetype.so when searching for -lfreetype
/usr/bin/ld: skipping incompatible /usr/lib/libpng.so when searching for -lpng
/usr/bin/ld: skipping incompatible /usr/lib/libpng.a when searching for -lpng
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libjpeg.so when searching for -ljpeg
/usr/bin/ld: skipping incompatible /usr/lib/libdb-4.3.so when searching for -ldb-4.3
/usr/bin/ld: skipping incompatible /usr/lib/libdb-4.3.a when searching for -ldb-4.3
/usr/bin/ld: skipping incompatible /usr/lib/libcurl.so when searching for -lcurl
/usr/bin/ld: skipping incompatible /usr/lib/libcurl.a when searching for -lcurl
/usr/bin/ld: skipping incompatible /usr/lib/libbz2.so when searching for -lbz2
/usr/bin/ld: skipping incompatible /usr/lib/libbz2.a when searching for -lbz2
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libxml2.so when searching for -lxml2
I can't understand why it's looking in /usr/lib/ for these libraries when I've specified --libdir=lib64 (also tried --libdir=/usr/lib64).

Can anyone help?
Thanks
 
Old 11-23-2008, 09:11 PM   #2
Noodles25
LQ Newbie
 
Registered: Apr 2007
Posts: 18

Original Poster
Rep: Reputation: 0
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
 
Old 11-24-2008, 06:57 PM   #3
salter
Member
 
Registered: Oct 2008
Posts: 100

Rep: Reputation: 15
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

Last edited by salter; 12-20-2008 at 12:01 PM.
 
Old 11-24-2008, 07:02 PM   #4
Noodles25
LQ Newbie
 
Registered: Apr 2007
Posts: 18

Original Poster
Rep: Reputation: 0
I think you only get libmysqlclient10 etc if you use the compat RPM's from MySQL which have the older clients bundled.
 
Old 05-13-2010, 05:06 PM   #5
theamitverma
LQ Newbie
 
Registered: May 2010
Posts: 1

Rep: Reputation: 0
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
 
  


Reply

Tags
bit, php, rhel


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling 64 bit kernel in 32 bit linux MadnessASAP Linux - Hardware 6 05-04-2009 11:47 AM
Possible to have virtual machine in RHEL 5.1 run RHEL 4.0-1 ES (64-bit) maryjane Linux - Newbie 1 10-20-2008 12:04 PM
compiling 32 bit application on 64 bit linux(x86_64) uttam_h Linux - Software 16 07-19-2008 02:33 PM
compiling in 32-bit mode on 64-bit Linux germanymontrealexpat Linux - Software 2 05-26-2006 07:39 AM
Compiling 32-bit binary in a 64-bit environment Kaj Linux - Software 1 12-13-2004 09:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration