ID:               29860
 User updated by:  rjanson at msn dot com
 Reported By:      rjanson at msn dot com
 Status:           Open
 Bug Type:         Compile Failure
 Operating System: Redhat 9
 PHP Version:      5.0.1
 New Comment:

I installed mysql via the RPMs provided on the MySQL site.

I unsinstalled the MySQL-shared-compat-4.1.4-0 rpm and tried building
agin with the same result.

These are the RPMs I have installed currently:

MySQL-devel-4.1.4-0
MySQL-client-4.1.4-0
MySQL-Max-4.1.4-0
MySQL-bench-4.1.3-1
MySQL-server-4.1.4-0
MySQL-shared-4.1.4-0

Is it possible something with the RPMs is causing the failure?


Previous Comments:
------------------------------------------------------------------------

[2004-09-13 19:38:30] nathansquires at pacbell dot net

I had the same linking problem with php 5.0.1 and mysql 4.1.4a-gamma. I
was able to compile with mysql and mysqli by rebuilding mysql with
shared libraries (i.e. don't use --without-shared or
--*flags=--all-static). If you only have static mysql libraries, trying
to build php with mysql and mysqli will cause this error.

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

[2004-09-08 08:18:54] rjanson at msn dot com

I should have mentioned before that I have tried the configuration you
suggest as well. In between each failed 'make' I have done a 'make
clean' to be sure I am not using any leftover configuration options. No
matter what path I use for mysql and mysqli, if the configuration
passes, the make fails.

I've seen this issue mentioned in various places, but never a
resolution.

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

[2004-09-07 07:52:34] [EMAIL PROTECTED]

When using the mysqli extension together with the mysql extension
you have to use the same libraries and include files. mysqli
extension requires the location of mysql_config file, mysql
extension requires the path of your mysql installation.

If you installed MySQL 4.1 for example with prefix /usr/local/mysql-4.1
your configure settings should be
--with-mysql=/usr/local/mysql-4.1
--with-mysqli=/usr/local/mysql-4.1/bin/mysql_config



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

[2004-09-04 19:28:16] pbriggs at clinitech dot net

Same thing is happening to me using RedHat Enterprise 3.  Unless I can
get both mysql and mysqli to live with each other, I can't port my apps
over to mysqli.

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

[2004-08-27 08:08:46] rjanson at msn dot com

Description:
------------
I cannot compile php 5.0.1 (nor 5.0.0) with mysql and mysqli
extensions. I can compile with either/or. At this point I need both. I
am using mysql 4.1.3

Configure runs with no issues.

Reproduce code:
---------------
My configure options: 
./configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin
--sbindir=/usr/sbin --sysconfdir=etc --datadir=/usr/share
--includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec
--localstatedir=/var --sharedstatedir=/usr/com
--enable-inline-optimization --with-exec-dir=/usr/bin --with-layout=GNU
--enable-magic-quotes --with-pear=/usr/share/pear
--with-mysql=/usr/bin/mysql_config --with-mysqli=/usr/bin/mysqli_config
--enable-versioning --with-apxs2=/usr/sbin/apxs --enable-sockets
--with-zlib-dir=/usr/local --with-gd --with-ldap --without-sqlite

Expected result:
----------------
I expect PHP to compile with no errors, and to support both Mysql and
Mysqli extensions.

Actual result:
--------------
I get several lines similar to the following:

: multiple definition of `net_realloc'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x100): first defined
here
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x180): In function
`net_clear':
: multiple definition of `net_clear'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x180): first defined
here
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x1f0): In function
`net_flush':
: multiple definition of `net_flush'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x1f0): first defined
here
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x580): In function
`net_real_write':
: multiple definition of `net_real_write'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x580): first defined
here
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x240): In function
`my_net_write':
: multiple definition of `my_net_write'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x240): first defined
here
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x320): In function
`net_write_command':
: multiple definition of `net_write_command'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x320): first defined
here
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x9c0): In function
`my_net_read':
: multiple definition of `my_net_read'
/usr/lib/mysql/libmysqlclient.a(net.o)(.text+0x9c0): first defined
here
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1


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


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

Reply via email to