php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16139 Compile failure with MySQL 4.0.1
Submitted: 2002-03-18 06:03 UTC Modified: 2002-03-19 20:32 UTC
From: mk at ambora dot de Assigned:
Status: Closed Package: MySQL related
PHP Version: 4.0CVS-2002-03-18 OS: linux 2.4.17
Private report: No CVE-ID: None
 [2002-03-18 06:03 UTC] mk at ambora dot de
I tried to compile latest CVS  with MySQL 4.0.1, but I'm getting the error below when linking:

ext/mysql/php_mysql.lo: In function `zif_mysql_create_db':
ext/mysql/php_mysql.lo(.text+0x16ac): undefined reference to
`mysql_create_db'
ext/mysql/php_mysql.lo: In function `zif_mysql_drop_db':
ext/mysql/php_mysql.lo(.text+0x185c): undefined reference to
`mysql_drop_db'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1

This is quite understandable: the above functions are from the 3.23.x branch and are deprecated in 4.0.1. Compiling with MySQL 4.0.1 DID work with CVS two weeks ago...someone must have 'improved' the build process.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-18 09:10 UTC] sniper@php.net
How did you install Mysql? Do you happen to have two
versions of it installed in your system?

 [2002-03-18 09:38 UTC] mk at ambora dot de
No, i just have MySQL 4.0.1 installed. As i wrote before, compiling did work with cvs from 02/27/02....I havn't changed anything in my setup since then. As i could see from the list, Sebastian Bergmann had similar problems some days ago...

I still have the 'working' checkout and still can compile it with MySQL 4.0.1...but that doesn't solve the problem with latest cvs...I think this must be some problem with MYSQL_VERSION_ID
 [2002-03-18 09:40 UTC] mfischer@php.net
Can you paste a unidifed diff between the two mysql directories from the different checkouts? Better yet just post it to php-dev@ because patches pasted here tend to get mangled badly ...
 [2002-03-18 10:09 UTC] mk at ambora dot de
I've did a diff between these two versions, but there was no significant difference that could  lead to these failures...

Meanwhile, I'm suspiciuos of the built system: It seems that it doesn't find the right location of mysql.h.

Consider these lines in php_mysql.c:

#if HAVE_MYSQL_MYSQL_H
# include <mysql/mysql.h>
#else
# include <mysql.h>
#endif

I just made that read 

# include <mysql/mysql.h>

and compilation went fine.

I'll try today's snapshot instead of checking out via cvs...maybe my automake (1.5) has some problems...
 [2002-03-18 10:24 UTC] mk at ambora dot de
...no, I've got the same problems with today's snapshot...
 [2002-03-19 20:32 UTC] sniper@php.net
Fixed in CVS.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Oct 18 03:01:27 2024 UTC