php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34129 make Error on libphp5.la
Submitted: 2005-08-14 17:22 UTC Modified: 2005-08-15 08:38 UTC
From: hk dot charles at gmail dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 5.0.4 OS: Debian GNU/Linux 3.1r0 (Sarge)
Private report: No CVE-ID: None
 [2005-08-14 17:22 UTC] hk dot charles at gmail dot com
Description:
------------
I installed a clean debian system and put all things on by tarballs.
when I trying to compile PHP, it said error and exit.

I wonder is it related to libz or mysql. but both of them seems working correctly and cooperate happily with depended software. 

I have searched on googles and relate bug database but there is no result same as mine one.

here is the configure option of php
CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer" \
./configure --prefix=/usr/local --with-apxs2=/usr/local/apache2/bin/apxs \
--with-openssl=/usr/local --with-zlib=/usr/local --with-gd=/usr/local --enable-ftp \
--enable-mbstring --with-mysql=/usr/local --with-mysqli=/usr/local/bin/mysql_config --with-ncurses=/usr/local

and the zlib (1.2.3) configure option
CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer" \
./configure --shared --prefix=/usr/local

and the mysql (4.1.13a) one
CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer -fno-exceptions" \
CXXFLAGS=""-march=pentium3 -O3 -pipe -static -fomit-frame-pointer -fno-exceptions \
-fno-rtti" \
./configure --prefix=/usr/local --enable-assembler \
--with-charset=utf8 --with-extra-charsets=complex --with-zlib

Finally, sorry for my poor English.

Expected result:
----------------
Make should run successfully

Actual result:
--------------
(start with repeating lines below but different functions)
/usr/local/lib/mysql/libz.a(zutil.o(.text+0x40): In function`zcalloc':
: multiple definition of `zcalloc'
/usr/local/lib/mysql/libz.a(zutil.o(.text+0x40): first defined here
/usr/local/lib/mysql/libz.a(zutil.o(.text+0x60): In function`zcfre':
: multiple definition of `zcfree'
/usr/local/lib/mysql/libz.a(zutil.o(.text+0x60): first defined here
collect2: ld returned 1 exit status
make: *** [libphp5.la] error 1

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-14 19:44 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-08-15 08:02 UTC] hk dot charles at gmail dot com
Thanks for the response, Tony
the latest snapshot seems works fine and fix the problem

On the other hand, I figured out what is going on
It is due to /usr/local/lib/mysql contains libz.a

./configure will search, found and use this file instead of libz.so to compile php5 and cause error. 

So the simplest solution is rename the file BEFORE configure the php, so the configure will not able to find them.
Then, rename it back after configure.
It works for me.

Thanks for the effort!
sorry for my poor English, again.
 [2005-08-15 08:38 UTC] sniper@php.net
There's no 'z' in neither ext/mysql or ext/mysqli so I doubt it being the reason. But as it works with latest cvs snapshot, I'm not gonna waste time investigating this anymore.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Aug 17 23:00:02 2025 UTC