php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37363 PDO_MYSQL does not build if no other mysql extension is enabled
Submitted: 2006-05-08 08:35 UTC Modified: 2006-06-01 15:15 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: fpazzatura at email dot it Assigned: wez (profile)
Status: Closed Package: PDO related
PHP Version: 5.1.5CVS OS: Ubuntu Linux (Breezy Badger)
Private report: No CVE-ID: None
 [2006-05-08 08:35 UTC] fpazzatura at email dot it
Description:
------------
my config flags

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --disable-cgi --with-config-file-path=/etc --enable-libcc --disable-short-tags --without-pcre-regex --with-zlib --with-bz2 --with-gd --with-ming --with-pdo-mysql --without-pdo-sqlite --without-sqlite --disable-tokenizer --without-pear

already with apache2 and no cli (the error with loading in apache2)

There's the error:

ext/pdo_mysql/pdo_mysql.o: In function `zm_info_pdo_mysql':
pdo_mysql.c:(.text+0x109): undefined reference to `mysql_get_client_info'
ext/pdo_mysql/mysql_driver.o: In function `_pdo_mysql_error':
mysql_driver.c:(.text+0xd6): undefined reference to `mysql_stmt_errno'
mysql_driver.c:(.text+0x11f): undefined reference to `mysql_error'
mysql_driver.c:(.text+0x145): undefined reference to `mysql_stmt_sqlstate'
mysql_driver.c:(.text+0x196): undefined reference to `mysql_errno'
mysql_driver.c:(.text+0x24a): undefined reference to `mysql_sqlstate'
mysql_driver.c:(.text+0x266): undefined reference to `mysql_error'
ext/pdo_mysql/mysql_driver.o: In function `mysql_handle_closer':
mysql_driver.c:(.text+0x37a): undefined reference to `mysql_close'
ext/pdo_mysql/mysql_driver.o: In function `mysql_handle_doer':
mysql_driver.c:(.text+0x402): undefined reference to `mysql_real_query'
mysql_driver.c:(.text+0x410): undefined reference to `mysql_affected_rows'
ext/pdo_mysql/mysql_driver.o: In function `pdo_mysql_last_insert_id':
mysql_driver.c:(.text+0x491): undefined reference to `mysql_insert_id'
ext/pdo_mysql/mysql_driver.o: In function `mysql_handle_quoter':
mysql_driver.c:(.text+0x518): undefined reference to `mysql_real_escape_string'
ext/pdo_mysql/mysql_driver.o: In function `pdo_mysql_get_attribute':
mysql_driver.c:(.text+0x5ee): undefined reference to `mysql_stat'
mysql_driver.c:(.text+0x63f): undefined reference to `mysql_get_host_info'
mysql_driver.c:(.text+0x651): undefined reference to `mysql_get_client_info'
mysql_driver.c:(.text+0x68b): undefined reference to `mysql_get_server_info'
ext/pdo_mysql/mysql_driver.o: In function `pdo_mysql_set_attribute':
mysql_driver.c:(.text+0x79c): undefined reference to `mysql_real_query'
mysql_driver.c:(.text+0x82e): undefined reference to `mysql_affected_rows'
ext/pdo_mysql/mysql_driver.o: In function `mysql_handle_begin':
mysql_driver.c:(.text+0x892): undefined reference to `mysql_real_query'
mysql_driver.c:(.text+0x8d6): undefined reference to `mysql_affected_rows'
ext/pdo_mysql/mysql_driver.o: In function `mysql_handle_commit':
mysql_driver.c:(.text+0x932): undefined reference to `mysql_real_query'
mysql_driver.c:(.text+0x976): undefined reference to `mysql_affected_rows'
ext/pdo_mysql/mysql_driver.o: In function `mysql_handle_rollback':
mysql_driver.c:(.text+0x9d2): undefined reference to `mysql_real_query'
mysql_driver.c:(.text+0xa16): undefined reference to `mysql_affected_rows'
ext/pdo_mysql/mysql_driver.o: In function `mysql_handle_preparer':
mysql_driver.c:(.text+0xacd): undefined reference to `mysql_get_server_version'
mysql_driver.c:(.text+0xb1f): undefined reference to `mysql_stmt_init'
mysql_driver.c:(.text+0xb3e): undefined reference to `mysql_stmt_prepare'
mysql_driver.c:(.text+0xb61): undefined reference to `mysql_stmt_param_count'
mysql_driver.c:(.text+0xc47): undefined reference to `mysql_errno'
ext/pdo_mysql/mysql_driver.o: In function `pdo_mysql_handle_factory':
mysql_driver.c:(.text+0xde5): undefined reference to `mysql_init'
mysql_driver.c:(.text+0x122f): undefined reference to `mysql_options'
mysql_driver.c:(.text+0x12c3): undefined reference to `mysql_options'
mysql_driver.c:(.text+0x133f): undefined reference to `mysql_options'
mysql_driver.c:(.text+0x13c3): undefined reference to `mysql_options'
mysql_driver.c:(.text+0x149e): undefined reference to `mysql_options'
mysql_driver.c:(.text+0x1574): undefined reference to `mysql_real_connect'
mysql_driver.c:(.text+0x1606): undefined reference to `mysql_real_query'
mysql_driver.c:(.text+0x164d): undefined reference to `mysql_affected_rows'
ext/pdo_mysql/mysql_statement.o: In function `pdo_mysql_stmt_dtor':
mysql_statement.c:(.text+0x19): undefined reference to `mysql_free_result'
mysql_statement.c:(.text+0x52): undefined reference to `mysql_stmt_close'
mysql_statement.c:(.text+0xba): undefined reference to `mysql_more_results'
mysql_statement.c:(.text+0xca): undefined reference to `mysql_next_result'
mysql_statement.c:(.text+0xda): undefined reference to `mysql_store_result'
mysql_statement.c:(.text+0xe6): undefined reference to `mysql_free_result'
mysql_statement.c:(.text+0xf2): undefined reference to `mysql_more_results'
ext/pdo_mysql/mysql_statement.o: In function `pdo_mysql_stmt_execute':
mysql_statement.c:(.text+0x186): undefined reference to `mysql_stmt_bind_param'
mysql_statement.c:(.text+0x195): undefined reference to `mysql_stmt_execute'
mysql_statement.c:(.text+0x1b3): undefined reference to `mysql_stmt_affected_rows'
mysql_statement.c:(.text+0x22b): undefined reference to `mysql_free_result'
mysql_statement.c:(.text+0x252): undefined reference to `mysql_real_query'
mysql_statement.c:(.text+0x264): undefined reference to `mysql_affected_rows'
mysql_statement.c:(.text+0x289): undefined reference to `mysql_use_result'
mysql_statement.c:(.text+0x2ad): undefined reference to `mysql_num_fields'
mysql_statement.c:(.text+0x2bf): undefined reference to `mysql_fetch_fields'
mysql_statement.c:(.text+0x324): undefined reference to `mysql_stmt_result_metadata'
mysql_statement.c:(.text+0x357): undefined reference to `mysql_fetch_fields'
mysql_statement.c:(.text+0x399): undefined reference to `mysql_num_fields'
mysql_statement.c:(.text+0x44b): undefined reference to `mysql_store_result'
mysql_statement.c:(.text+0x513): undefined reference to `mysql_stmt_bind_result'mysql_statement.c:(.text+0x534): undefined reference to `mysql_stmt_store_result'
mysql_statement.c:(.text+0x5f9): undefined reference to `mysql_stmt_attr_set'
ext/pdo_mysql/mysql_statement.o: In function `pdo_mysql_stmt_next_rowset':
mysql_statement.c:(.text+0x6a7): undefined reference to `mysql_stmt_free_result'mysql_statement.c:(.text+0x6b6): undefined reference to `mysql_free_result'
mysql_statement.c:(.text+0x6c8): undefined reference to `mysql_next_result'
mysql_statement.c:(.text+0x719): undefined reference to `mysql_affected_rows'
mysql_statement.c:(.text+0x735): undefined reference to `mysql_use_result'
mysql_statement.c:(.text+0x74b): undefined reference to `mysql_num_fields'
mysql_statement.c:(.text+0x75d): undefined reference to `mysql_fetch_fields'
mysql_statement.c:(.text+0x787): undefined reference to `mysql_store_result'
ext/pdo_mysql/mysql_statement.o: In function `pdo_mysql_stmt_fetch':
mysql_statement.c:(.text+0xa7d): undefined reference to `mysql_stmt_fetch'
mysql_statement.c:(.text+0xacb): undefined reference to `mysql_fetch_row'
mysql_statement.c:(.text+0xadd): undefined reference to `mysql_fetch_lengths'
mysql_statement.c:(.text+0xaff): undefined reference to `mysql_errno'
ext/pdo_mysql/mysql_statement.o: In function `pdo_mysql_stmt_cursor_closer':
mysql_statement.c:(.text+0x10e6): undefined reference to `mysql_stmt_free_result'
mysql_statement.c:(.text+0x1102): undefined reference to `mysql_free_result'
mysql_statement.c:(.text+0x1118): undefined reference to `mysql_more_results'
mysql_statement.c:(.text+0x1128): undefined reference to `mysql_next_result'
mysql_statement.c:(.text+0x1138): undefined reference to `mysql_store_result'
mysql_statement.c:(.text+0x1144): undefined reference to `mysql_free_result'
mysql_statement.c:(.text+0x1150): undefined reference to `mysql_more_results'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-08 13:20 UTC] iliaa@php.net
When version of MySQL library are you compiling pdo_mysql 
against?
 [2006-05-08 14:23 UTC] fpazzatura at email dot it
The version of my libmysql package is 4.1.12, the my compiler is gcc 4.0.1

With same libraries and compiler, PHP 5.1.3 compiles greetly...
 [2006-05-09 12:18 UTC] wez@php.net
What does mysql_config output on your system?
 [2006-05-09 13:27 UTC] fpazzatura at email dot it
There's the installation for mysql 4.1

My mysqkl_config output is:

Options:
        --cflags         [-I/usr/include/mysql -DBIG_JOINS=1]
        --include        [-I/usr/include/mysql]
        --libs           [-L/usr/lib -lmysqlclient -lz -lcrypt -lnsl -lm]
        --libs_r         [-L/usr/lib -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread]
        --socket         [/var/run/mysqld/mysqld.sock]
        --port           [3306]
        --version        [4.1.12]
        --libmysqld-libs [-L/usr/lib -lmysqld -lpthread -lcrypt -lnsl -lm -lpthread -lwrap -lrt]
 [2006-05-09 21:57 UTC] iliaa@php.net
Can you check if you have other MySQL libraries/headers on 
your system?
 [2006-05-09 23:03 UTC] fpazzatura at email dot it
I have libmysql12 (4.0.24) without headers, and libmysql14 (4.1.12) with headers. I've compiled this version to run with mysql-server-4.1 (4.1.12). The version of Ubuntu Breezy.
 [2006-05-15 21:59 UTC] tony2001@php.net
Please try to leave only ONE version of libmysql installed.
Having multiple versions of the same library most likely won't work very well.
 [2006-05-16 11:27 UTC] fpazzatura at email dot it
I have removed the older version, but it doesn't compile...

The PVP 5.1.3 compiles cleanly.

There's not an Ubuntu problem, i mean...
 [2006-05-16 12:56 UTC] milanm at datax dot biz
I have the same problem with mysql 4.1.14 and PHP 5.1.4 on Linux.
 [2006-05-17 14:09 UTC] mike@php.net
This is exactly the problem I reported to Wez about two weeks ago. A subtile change in PDO-MySQLs config.m4 is causing -lmysqlclient to be not included in PHPs LDFLAGS. It works fine if you add another mysql extension to your build.

 [2006-06-01 15:15 UTC] mike@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fixed in 5.2
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC