Edit report at http://bugs.php.net/bug.php?id=49078&edit=1

 ID:                 49078
 Comment by:         de at engeljournal dot com
 Reported by:        kdprice at baylou dot com
 Summary:            Make Failed sapi/cli/php Error 1
 Status:             No Feedback
 Type:               Bug
 Package:            Compile Failure
 Operating System:   CentOS 5
 PHP Version:        5.3SVN-2009-07-27 (snap)
 Block user comment: N
 Private report:     N

 New Comment:

I get the same problem.



I start with



./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-sockets
--enable-

soap --with-gd --with-zlib --with-jpeg-dir=/usr --with-curl
--with-png-dir=/usr 

--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd



make && make install



Expected result = success

-----------------

Actual result



ext/mysql/.libs/php_mysql.o: In function `_free_mysql_result':

php_mysql.c:(.text+0x1c): undefined reference to `mysql_free_result'

ext/mysql/.libs/php_mysql.o: In function `php_mysql_select_db':

php_mysql.c:(.text+0xb8): undefined reference to `mysql_eof'

php_mysql.c:(.text+0xe0): undefined reference to `mysql_fetch_row'

php_mysql.c:(.text+0x10c): undefined reference to `mysql_select_db'

ext/mysql/.libs/php_mysql.o: In function `_close_mysql_link':

php_mysql.c:(.text+0x15b): undefined reference to `mysql_close'

ext/mysql/.libs/php_mysql.o: In function `_close_mysql_plink':

php_mysql.c:(.text+0x1bc): undefined reference to `mysql_close'

ext/mysql/.libs/php_mysql.o: In function `zm_startup_mysql':

php_mysql.c:(.text+0x45a): undefined reference to `mysql_server_init'

ext/mysql/.libs/php_mysql.o: In function `zm_shutdown_mysql':

php_mysql.c:(.text+0x486): undefined reference to `mysql_server_end'

ext/mysql/.libs/php_mysql.o: In function `zm_info_mysql':

php_mysql.c:(.text+0x5f2): undefined reference to
`mysql_get_client_info'

ext/mysql/.libs/php_mysql.o: In function `php_mysql_do_connect':

php_mysql.c:(.text+0x725): undefined reference to
`mysql_get_client_version'

php_mysql.c:(.text+0x736): undefined reference to
`mysql_get_client_version'

php_mysql.c:(.text+0xcd0): undefined reference to `mysql_init'

php_mysql.c:(.text+0xcff): undefined reference to `mysql_options'

php_mysql.c:(.text+0xd46): undefined reference to `mysql_real_connect'

php_mysql.c:(.text+0xd73): undefined reference to `mysql_error'

php_mysql.c:(.text+0xdb0): undefined reference to `mysql_errno'

php_mysql.c:(.text+0xe10): undefined reference to `mysql_options'

php_mysql.c:(.text+0xf4f): undefined reference to `mysql_ping'

php_mysql.c:(.text+0xf63): undefined reference to `mysql_errno'

php_mysql.c:(.text+0xfb5): undefined reference to `mysql_real_connect'

php_mysql.c:(.text+0x104d): undefined reference to `mysql_options'

php_mysql.c:(.text+0x1254): undefined reference to `mysql_init'

php_mysql.c:(.text+0x12fc): undefined reference to `mysql_options'

php_mysql.c:(.text+0x1343): undefined reference to `mysql_real_connect'

php_mysql.c:(.text+0x1370): undefined reference to `mysql_error'

php_mysql.c:(.text+0x13ad): undefined reference to `mysql_errno'

php_mysql.c:(.text+0x140d): undefined reference to `mysql_options'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_close':

php_mysql.c:(.text+0x172a): undefined reference to `mysql_eof'

php_mysql.c:(.text+0x1752): undefined reference to `mysql_fetch_row'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_get_client_info':

php_mysql.c:(.text+0x194a): undefined reference to
`mysql_get_client_info'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_get_host_info':

php_mysql.c:(.text+0x1aad): undefined reference to
`mysql_get_host_info'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_get_proto_info':

php_mysql.c:(.text+0x1c15): undefined reference to
`mysql_get_proto_info'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_get_server_info':

php_mysql.c:(.text+0x1d2b): undefined reference to
`mysql_get_server_info'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_info':

php_mysql.c:(.text+0x1e8e): undefined reference to `mysql_info'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_thread_id':

php_mysql.c:(.text+0x2017): undefined reference to `mysql_thread_id'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_stat':

php_mysql.c:(.text+0x215e): undefined reference to `mysql_eof'

php_mysql.c:(.text+0x2186): undefined reference to `mysql_fetch_row'

php_mysql.c:(.text+0x21ae): undefined reference to `mysql_stat'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_client_encoding':

php_mysql.c:(.text+0x2332): undefined reference to
`mysql_character_set_name'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_set_charset':

php_mysql.c:(.text+0x24a1): undefined reference to
`mysql_set_character_set'

ext/mysql/.libs/php_mysql.o: In function `php_mysql_do_query_general':

php_mysql.c:(.text+0x25b4): undefined reference to `mysql_eof'

php_mysql.c:(.text+0x25dc): undefined reference to `mysql_fetch_row'

php_mysql.c:(.text+0x2614): undefined reference to
`mysql_set_server_option'

php_mysql.c:(.text+0x2683): undefined reference to `mysql_real_query'

php_mysql.c:(.text+0x2698): undefined reference to `mysql_errno'

php_mysql.c:(.text+0x26a8): undefined reference to `mysql_error'

php_mysql.c:(.text+0x26ec): undefined reference to `mysql_use_result'

php_mysql.c:(.text+0x2807): undefined reference to `mysql_fetch_row'

php_mysql.c:(.text+0x281f): undefined reference to `mysql_free_result'

php_mysql.c:(.text+0x2835): undefined reference to `mysql_real_query'

php_mysql.c:(.text+0x2851): undefined reference to `mysql_errno'

php_mysql.c:(.text+0x2861): undefined reference to `mysql_error'

php_mysql.c:(.text+0x28ab): undefined reference to `mysql_use_result'

php_mysql.c:(.text+0x28bd): undefined reference to `mysql_store_result'

php_mysql.c:(.text+0x28d4): undefined reference to `mysql_field_count'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_list_dbs':

php_mysql.c:(.text+0x2d11): undefined reference to `mysql_eof'

php_mysql.c:(.text+0x2d39): undefined reference to `mysql_fetch_row'

php_mysql.c:(.text+0x2d66): undefined reference to `mysql_list_dbs'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_list_tables':

php_mysql.c:(.text+0x2f28): undefined reference to `mysql_eof'

php_mysql.c:(.text+0x2f50): undefined reference to `mysql_fetch_row'

php_mysql.c:(.text+0x2f7d): undefined reference to `mysql_list_tables'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_list_fields':

php_mysql.c:(.text+0x3158): undefined reference to `mysql_eof'

php_mysql.c:(.text+0x3180): undefined reference to `mysql_fetch_row'

php_mysql.c:(.text+0x31b1): undefined reference to `mysql_list_fields'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_list_processes':

php_mysql.c:(.text+0x333c): undefined reference to `mysql_eof'

php_mysql.c:(.text+0x3364): undefined reference to `mysql_fetch_row'

php_mysql.c:(.text+0x338c): undefined reference to
`mysql_list_processes'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_error':

php_mysql.c:(.text+0x352f): undefined reference to `mysql_error'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_errno':

php_mysql.c:(.text+0x3690): undefined reference to `mysql_errno'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_affected_rows':

php_mysql.c:(.text+0x37a3): undefined reference to
`mysql_affected_rows'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_escape_string':

php_mysql.c:(.text+0x3828): undefined reference to
`mysql_escape_string'

ext/mysql/.libs/php_mysql.o: In function
`zif_mysql_real_escape_string':

php_mysql.c:(.text+0x399e): undefined reference to
`mysql_real_escape_string'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_insert_id':

php_mysql.c:(.text+0x3af1): undefined reference to `mysql_insert_id'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_result':

php_mysql.c:(.text+0x3be5): undefined reference to `mysql_num_rows'

php_mysql.c:(.text+0x3c51): undefined reference to `mysql_data_seek'

php_mysql.c:(.text+0x3d0e): undefined reference to `mysql_field_seek'

php_mysql.c:(.text+0x3d55): undefined reference to `mysql_fetch_field'

php_mysql.c:(.text+0x3f65): undefined reference to `mysql_num_fields'

php_mysql.c:(.text+0x3fac): undefined reference to `mysql_fetch_row'

php_mysql.c:(.text+0x3fc0): undefined reference to
`mysql_fetch_lengths'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_num_rows':

php_mysql.c:(.text+0x41aa): undefined reference to `mysql_num_rows'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_num_fields':

php_mysql.c:(.text+0x424d): undefined reference to `mysql_num_fields'

ext/mysql/.libs/php_mysql.o: In function `php_mysql_fetch_hash':

php_mysql.c:(.text+0x444e): undefined reference to `mysql_fetch_row'

php_mysql.c:(.text+0x4462): undefined reference to
`mysql_fetch_lengths'

php_mysql.c:(.text+0x44aa): undefined reference to `mysql_field_seek'

php_mysql.c:(.text+0x44b3): undefined reference to `mysql_fetch_field'

php_mysql.c:(.text+0x46d4): undefined reference to `mysql_fetch_field'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_data_seek':

php_mysql.c:(.text+0x4ba9): undefined reference to `mysql_num_rows'

php_mysql.c:(.text+0x4c03): undefined reference to `mysql_data_seek'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_fetch_lengths':

php_mysql.c:(.text+0x4cab): undefined reference to
`mysql_fetch_lengths'

php_mysql.c:(.text+0x4ce2): undefined reference to `mysql_num_fields'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_fetch_field':

php_mysql.c:(.text+0x4f92): undefined reference to `mysql_num_fields'

php_mysql.c:(.text+0x4fe0): undefined reference to `mysql_field_seek'

php_mysql.c:(.text+0x4fe9): undefined reference to `mysql_fetch_field'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_field_seek':

php_mysql.c:(.text+0x5342): undefined reference to `mysql_num_fields'

php_mysql.c:(.text+0x539b): undefined reference to `mysql_field_seek'

ext/mysql/.libs/php_mysql.o: In function `php_mysql_field_info':

php_mysql.c:(.text+0x547d): undefined reference to `mysql_num_fields'

php_mysql.c:(.text+0x54df): undefined reference to `mysql_field_seek'

php_mysql.c:(.text+0x54e8): undefined reference to `mysql_fetch_field'

ext/mysql/.libs/php_mysql.o: In function `zif_mysql_ping':

php_mysql.c:(.text+0x5f0d): undefined reference to `mysql_eof'

php_mysql.c:(.text+0x5f35): undefined reference to `mysql_fetch_row'

php_mysql.c:(.text+0x5f65): undefined reference to `mysql_ping'

collect2: ld returned 1 exit status


Previous Comments:
------------------------------------------------------------------------
[2010-10-11 04:40:15] codebudo at gmail dot com

Same problem with php5.3.3 on OS X 10.6. (Darwin bugs.local 10.4.0
Darwin Kernel 

Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010;
root:xnu-1504.7.4~1/RELEASE_I386 

i386)



"-lresolv" was already in my EXTRA_LIB, but I still can't compile.  This
is my 

EXTRA_LIB:





EXTRA_LIBS = -lresolv -lmysqlclient -liconv -liconv -lpng -lz -lcurl -lz
-lm -

lxml2 -lz -licucore -lm -lssl -lcrypto -lz -lcurl -lxml2 -lz -licucore
-lm -

lxml2 -lz -licucore -lm -lxml2 -lz -licucore -lm -lxml2 -lz -licucore
-lm -lxml2 

-lz -licucore -lm -lxml2 -lz -licucore -lm





My configure line:



./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql
--with-gd --

with-zlib --with-mcrypt-dir=/opt/local/include --with-png --with-jpeg
--enable-

exif --with-xml --with-apxs2=/usr/local/apache/bin/apxs --with-curl
--with-

openssl --enable-soap --with-iconv

------------------------------------------------------------------------
[2010-08-16 22:57:47] flood at itnews-bg dot com

Actually, I just managed to get it working.

After adding "-lresolv" to the "EXTRA_LIBS" line of "Makefile" it
compiled successfully. 



The line that worked for me was:

EXTRA_LIBS = -lresolv -lcrypt -lcrypt -lpq -lrt -lm -ldl -lnsl -lxml2
-lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz
-lm -lxml2 -lz -lm -lcrypt



Hope this helps somebody.

Sorry for the double post.

------------------------------------------------------------------------
[2010-08-16 22:49:28] flood at itnews-bg dot com

Have the same problem. 

I'm trying to compile php 5.3.3 on Slackware 12.2 and I can't get it to
work.

This is the line I'm using

./configure --with-apxs2=/usr/local/apache-2.2.15/bin/apxs
--with-pgsql=/usr/local/pgsql/



The problem comes somewhere in "--with-pgsql". If I remove that line it
builds with no problems.

------------------------------------------------------------------------
[2010-07-12 13:27:23] smileyrecords at gmail dot com

same problem php 5.3.3rc2

------------------------------------------------------------------------
[2009-10-30 19:48:31] rofc at rofc dot com dot ar

Same problem here with FC5 on a x86_64 server.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=49078


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=49078&edit=1

Reply via email to