LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 10-26-2009, 09:30 PM   #1
plebby1
LQ Newbie
 
Registered: Oct 2009
Posts: 6

Rep: Reputation: 0
Unhappy php configure --with-mysql problem


Well I've searched high and low without luck for an answer to this before posting, so here I go...

I have the latest mysql mac os x binary installed and working in /usr/local/mysql.

I am running Mac OS X 10.5.8 on MacBookPro. httpd-2.2.14.

I am trying to configure php-5.3.0 from source like this:

Code:
MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load"
./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-apxs2=/usr/sbin/apxs --with-config-file-path=/etc --sysconfdir=/private/etc --with-openssl --with-zlib=/usr --with-zlib-dir=/usr --with-bz2 --enable-cli --with-gd --with-png-dir=/usr/local --with-xpm-dir=/usr/X11R6 --enable-gd-native-ttf --with-jpeg-dir=/usr/local/lib/ --with-curl=/usr  --enable-exif --enable-ftp --enable-mbstring --enable-mbregex --enable-sockets --with-ldap=/usr --with-kerberos=/usr --with-mime-magic=/etc/apache2/magic --without-sqlite --with-mcrypt --with-iconv --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql --with-mysql-sock=/private/var/mysql/mysql.sock --with-freetype-dir=/usr/local/lib --enable-shared --with-xsl --enable-pcntl --enable-sysvsem --enable-sysvmsg --enable-sysvshm --with-ffmpeg
And my error during ./configure is:

Code:
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... /private/var/mysql/mysql.sock
checking for MySQL UNIX socket location... /private/var/mysql/mysql.sock
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more information.
And config.log says:

Code:
configure:75712: checking for MySQL UNIX socket location
configure:75721: result: /private/var/mysql/mysql.sock
configure:75916: checking for mysql_close in -lmysqlclient
configure:75951: cc -o conftest -I/usr/include  -gstabs -fvisibility=hidden -Wno-deprecated-declarations -Wall -fno-strict-aliasing  -no-cpp-precomp -Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib -liconv -L/usr/lib  -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib conftest.c -lmysqlclient  -lmcrypt -lltdl -lldap -llber -liconv -liconv -lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lssl -lcrypto -lavformat -lavcodec -lcurl -lbz2 -lz -lssl -lcrypto -lm  -lxml2 -lz -licucore -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcurl -lssl -lcrypto -lz -lxml2 -lz -licucore -lm >&5
ld warning: in /usr/local/mysql/lib/libmysqlclient.dylib, file is not of required architecture
Undefined symbols:
  "_mysql_close", referenced from:
      _main in ccI5hkYP.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
configure:75957: $? = 1
configure: failed program was:
**AND**

Code:
| #define PHP_MYSQL_UNIX_SOCK_ADDR "/private/var/mysql/mysql.sock"
| /* end confdefs.h.  */
| 
| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char mysql_close ();
| int
| main ()
| {
| return mysql_close ();
|   ;
|   return 0;
| }
configure:75976: result: no
configure:76186: checking for mysql_error in -lmysqlclient
configure:76221: cc -o conftest -I/usr/include  -gstabs -fvisibility=hidden -Wno-deprecated-declarations -Wall -fno-strict-aliasing  -no-cpp-precomp -Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib -liconv -L/usr/lib  -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib -Wl,-rpath,/usr -L/usr conftest.c -lmysqlclient  -lz -lmcrypt -lltdl -lldap -llber -liconv -liconv -lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lssl -lcrypto -lavformat -lavcodec -lcurl -lbz2 -lz -lssl -lcrypto -lm  -lxml2 -lz -licucore -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lcurl -lssl -lcrypto -lz -lxml2 -lz -licucore -lm >&5
ld warning: in /usr/local/mysql/lib/libmysqlclient.dylib, file is not of required architecture
Undefined symbols:
  "_mysql_error", referenced from:
      _main in ccB7XjON.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
configure:76227: $? = 1
configure: failed program was:
Anybody have any ideas?
 
Old 10-26-2009, 10:04 PM   #2
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 611

Rep: Reputation: 221Reputation: 221Reputation: 221
Did you build this mysql binary from source? Sometimes when building php I will just use --with-mysql=/path/to/mysql/source/tree . . . this seems to work.
 
Old 10-26-2009, 10:10 PM   #3
plebby1
LQ Newbie
 
Registered: Oct 2009
Posts: 6

Original Poster
Rep: Reputation: 0
I built it from a dmg from mysql.com:

mysql-5.1.40-osx10.5-x86_64.dmg

does anyone know what -lmysqlclient refers to? it seems to be looking for the mysql_close() and mysql_error() functions or something... but, I really have no clue
 
Old 10-27-2009, 01:19 AM   #4
plebby1
LQ Newbie
 
Registered: Oct 2009
Posts: 6

Original Poster
Rep: Reputation: 0
for ref i was able to configure with a mysql x86 package, but the x86_64 no work for me still...
 
  


Reply



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
configure php with mysql sunlinux Linux - Software 1 02-07-2008 10:57 AM
PHP 5 configure error with mysql kamran_pro Linux - Software 7 08-15-2007 08:00 AM
PHP ./configure command dilema (for mysql) tuka Linux - Newbie 2 11-03-2003 09:26 PM
How do i configure RH-9, apache 2.0, php and mysql rolling_titan Linux - General 4 10-18-2003 06:56 AM

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

All times are GMT -5. The time now is 07:23 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