For Programmers: Free Programming Magazines  


Home > Archive > PHP Installation > December 2007 > AIX 5.3 configure error undefined symbol .mysql_close and .mysql_error









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author AIX 5.3 configure error undefined symbol .mysql_close and .mysql_error
Bart McPherson

2007-11-30, 7:03 pm

I'm trying to build PHP 5.2.5 on AIX 5.3 (for Sun One web server 6.1 sp8)
Here's the config statement I'm using.
.../configure --with-nsapi=/usr/local/WebServer --with-mysql=/usr/local/mysql
\
--with-openssl=/opt/freeware --enable-force-cgi-redirect \
--with-gettext --with-libxml-dir=/opt/freeware/lib \
--with-gd=/opt/freeware --enable-gd-native-ttf --with-jpeg-dir=/opt/freeware
\
--with-freetype-dir=/opt/freeware --with-zlib

I have also tried the following with the same results.
CPPFLAGS=-I/opt/freeware/include LDFLAGS=-L/usr/local/mysql/lib \
.../configure --with-nsapi=/usr/local/WebServer --with-mysql=/usr/local/mysql
\
--with-openssl=/opt/freeware --enable-force-cgi-redirect \
--with-gettext --with-libxml-dir=/opt/freeware/lib \
--with-gd=/opt/freeware --enable-gd-native-ttf --with-jpeg-dir=/opt/freeware
\
--with-freetype-dir=/opt/freeware --with-zlib
.....
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
checking for mysql_close in -lmysqlclient_r... no
checking for mysql_error in -lmysqlclient_r... no
configure: error: mysql configure failed. Please check config.log for more
information.

Here is the end of the config.log
configure:59308: checking for MySQL support
configure:59355: checking for specified location of the MySQL UNIX socket
configure:59413: checking for MySQL UNIX socket location
configure:59604: checking for mysql_close in -lmysqlclient_r
configure:59623: gcc -o
conftest -I/usr/include -g -O2 -pthread -I/opt/freeware/include -D_THREAD_SAFE
-L/usr/local/mysql/lib -L/usr/local/mys
ql/lib -L/usr/lib -L/usr/local/mysql/lib -L/opt/freeware/lib -L/opt/freeware/lib
conftest.c -lmysqlclient_r -lintl -lgd -lfreetype -ljpeg -lz
-lssl -lcrypto -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm 1>&5
ld: 0711-317 ERROR: Undefined symbol: .mysql_close
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: ld returned 8 exit status
configure: failed program was:
#line 59612 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_close();

int main() {
mysql_close()
; return 0; }
configure:59846: checking for mysql_error in -lmysqlclient_r
configure:59865: gcc -o
conftest -I/usr/include -g -O2 -pthread -I/opt/freeware/include -D_THREAD_SAFE
-L/usr/local/mysql/lib -L/usr/local/mys
ql/lib -L/usr/lib -L/usr/local/mysql/lib -L/opt/freeware/lib -L/opt/freeware/lib
-L/usr -L/usr conftest.c -lmysqlclient_r -lz -lintl -lgd -lf
reetype -ljpeg -lz -lssl -lcrypto -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv
-lm 1>&5
ld: 0711-317 ERROR: Undefined symbol: .mysql_error
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: ld returned 8 exit status
configure: failed program was:
#line 59854 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_error();

int main() {
mysql_error()
; return 0; }

Any ideas?
Thanks in advance.
Bart McPherson

2007-12-05, 7:03 pm

For future AIX users trying to compile PHP with MySQL.
The 64-bit version of MySQL does not currently work. The 32-bit version
will allow configure to complete successfully.

""Bart McPherson"" <b.mcpherson@csuohio.edu> wrote in message
news:6E.49.16143.A4240574@pb1.pair.com...
> I'm trying to build PHP 5.2.5 on AIX 5.3 (for Sun One web server 6.1 sp8)
> Here's the config statement I'm using.
> ../configure --with-nsapi=/usr/local/WebServer --with-mysql=/usr/local/mysql
> \
> --with-openssl=/opt/freeware --enable-force-cgi-redirect \
> --with-gettext --with-libxml-dir=/opt/freeware/lib \
> --with-gd=/opt/freeware --enable-gd-native-ttf --with-jpeg-dir=/opt/freeware
> \
> --with-freetype-dir=/opt/freeware --with-zlib
>
> I have also tried the following with the same results.
> CPPFLAGS=-I/opt/freeware/include LDFLAGS=-L/usr/local/mysql/lib \
> ../configure --with-nsapi=/usr/local/WebServer --with-mysql=/usr/local/mysql
> \
> --with-openssl=/opt/freeware --enable-force-cgi-redirect \
> --with-gettext --with-libxml-dir=/opt/freeware/lib \
> --with-gd=/opt/freeware --enable-gd-native-ttf --with-jpeg-dir=/opt/freeware
> \
> --with-freetype-dir=/opt/freeware --with-zlib
> ....
> checking for MySQL support... yes
> checking for specified location of the MySQL UNIX socket... no
> checking for MySQL UNIX socket location... no
> checking for mysql_close in -lmysqlclient_r... no
> checking for mysql_error in -lmysqlclient_r... no
> configure: error: mysql configure failed. Please check config.log for more
> information.
>
> Here is the end of the config.log
> configure:59308: checking for MySQL support
> configure:59355: checking for specified location of the MySQL UNIX socket
> configure:59413: checking for MySQL UNIX socket location
> configure:59604: checking for mysql_close in -lmysqlclient_r
> configure:59623: gcc -o
> conftest -I/usr/include -g -O2 -pthread -I/opt/freeware/include -D_THREAD_SAFE
> -L/usr/local/mysql/lib -L/usr/local/mys
> ql/lib -L/usr/lib -L/usr/local/mysql/lib -L/opt/freeware/lib -L/opt/freeware/lib
> conftest.c -lmysqlclient_r -lintl -lgd -lfreetype -ljpeg -lz
> -lssl -lcrypto -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv -lm 1>&5
> ld: 0711-317 ERROR: Undefined symbol: .mysql_close
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
> information.
> collect2: ld returned 8 exit status
> configure: failed program was:
> #line 59612 "configure"
> #include "confdefs.h"
> /* Override any gcc2 internal prototype to avoid an error. */
> /* We use char because int might match the return type of a gcc2
> builtin and then its argument prototype would still apply. */
> char mysql_close();
>
> int main() {
> mysql_close()
> ; return 0; }
> configure:59846: checking for mysql_error in -lmysqlclient_r
> configure:59865: gcc -o
> conftest -I/usr/include -g -O2 -pthread -I/opt/freeware/include -D_THREAD_SAFE
> -L/usr/local/mysql/lib -L/usr/local/mys
> ql/lib -L/usr/lib -L/usr/local/mysql/lib -L/opt/freeware/lib -L/opt/freeware/lib
> -L/usr -L/usr conftest.c -lmysqlclient_r -lz -lintl -lgd -lf
> reetype -ljpeg -lz -lssl -lcrypto -lm -lxml2 -lz -liconv -lm -lxml2 -lz -liconv
> -lm 1>&5
> ld: 0711-317 ERROR: Undefined symbol: .mysql_error
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
> information.
> collect2: ld returned 8 exit status
> configure: failed program was:
> #line 59854 "configure"
> #include "confdefs.h"
> /* Override any gcc2 internal prototype to avoid an error. */
> /* We use char because int might match the return type of a gcc2
> builtin and then its argument prototype would still apply. */
> char mysql_error();
>
> int main() {
> mysql_error()
> ; return 0; }
>
> Any ideas?
> Thanks in advance.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com