ID: 47715
Updated by: [email protected]
Reported By: cyrille37 at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: MySQL related
Operating System: Linux
PHP Version: 5.2.9
New Comment:
Sounds like you're compiling and linking against different versions of
MySQL.
Is there a system MySQL in /usr/lib from an older version?
Previous Comments:
------------------------------------------------------------------------
[2009-03-19 11:15:15] cyrille37 at gmail dot com
I forgot to tell the Mysql version : 5.0.26
/home/mysql/bin/mysqld Ver 5.0.26-standard-log for pc-linux-gnu on
i686 (MySQL Community Edition - Standard (GPL))
------------------------------------------------------------------------
[2009-03-19 11:09:20] cyrille37 at gmail dot com
Description:
------------
While I try to make Apache1.3.41 and Php5.2.9 a error occured.
Php compilation works fine.
Apache compilation fails a link time :
php_mysql.c:405: undefined reference to `mysql_server_init'
php_mysql.c:426: undefined reference to `mysql_server_end'
php_mysql.c:1120: undefined reference to `mysql_set_character_set'
Reproduce code:
---------------
I've only got 'configure' options that I could send you if you need.
Expected result:
----------------
Successed compilation of Apache.
Actual result:
--------------
Apache compilation fail :
...
<=== src/modules
gcc -c -I./os/unix -I./include -DLINUX=22 -DHAVE_SET_DUMPABLE
-I/usr/include/db1 -DMOD_SSL=208131 -DEAPI -DNO_DL_NEEDED `./apaci`
modules.c
gcc -c -I./os/unix -I./include -DLINUX=22 -DHAVE_SET_DUMPABLE
-I/usr/include/db1 -DMOD_SSL=208131 -DEAPI -DNO_DL_NEEDED `./apaci`
buildmark.c
gcc -DLINUX=22 -DHAVE_SET_DUMPABLE -I/usr/include/db1 -DMOD_SSL=208131
-DEAPI -DNO_DL_NEEDED `./apaci` -L/usr/lib \
-o httpd buildmark.o modules.o modules/standard/libstandard.a
modules/ssl/libssl.a modules/php5/libphp5.a main/libmain.a
./os/unix/libos.a ap/libap.a -Wl,-rpath,/usr/local/lib
-Wl,-rpath,/home/mysql/lib -rdynamic -L/usr/local/lib -L/home/mysql/lib
-Lmodules/php5 -L../modules/php5 -L../../modules/php5 -lmodphp5
-rdynamic -L/usr/local/lib -L/home/mysql/lib -lcrypt -lexslt -lcrypt
-lrt -lmysqlclient -lmcrypt -lltdl -lpng -lz -ljpeg -lz -lssl -lcrypto
-lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm
-lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lxslt -lxml2 -lz
-lm -lcrypt -lm -lcrypt -lndbm -lssl -lcrypto -lexpat
modules/php5/libphp5.a(php_mysql.o): In function `zm_startup_mysql':
/usr/local/src/php-5.2.9/ext/mysql/php_mysql.c:405: undefined reference
to `mysql_server_init'
modules/php5/libphp5.a(php_mysql.o): In function `zm_shutdown_mysql':
/usr/local/src/php-5.2.9/ext/mysql/php_mysql.c:426: undefined reference
to `mysql_server_end'
modules/php5/libphp5.a(php_mysql.o): In function
`zif_mysql_set_charset':
/usr/local/src/php-5.2.9/ext/mysql/php_mysql.c:1120: undefined
reference to `mysql_set_character_set'
collect2: ld returned 1 exit status
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47715&edit=1