Bug #7428 hash_reset changed from 94 to 89
Submitted: 20 Dec 2004 12:09 Modified: 11 Jan 2005 11:20
Reporter: Sasha Dolgy Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:4.1.x OS:Linux (Linux 2.4.21-9.ELsmp)
Assigned to: Konstantin Osipov CPU Architecture:Any

[20 Dec 2004 12:09] Sasha Dolgy
Description:
Am trying to compile myql into php with the imap c-client.  php doesn't like something when it tries linking everything together.  the php dev list has sent it back saying it's not a bug with their code.  

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

I've already created a bug report/request with the c-client developers.  Just wanting to make sure that it's something or nothing that can be done with mysql.  Everything works fine with mysql 4.0.x and lower versions.  just the 4.1.7/8 so far.  

How to repeat:
With php 5.0.2/3: 

'./configure' \
'--with-mysql' \
'--with-imap=/usr/local/imap-2004a' \
'--with-imap-ssl' \
"$@"

then a make will produce:

/usr/local/imap-2004a/lib/libc-client.a(misc.o)(.text+0x8a4): In
function `hash_reset':
/build/imap-2004a/c-client/misc.c:278: multiple definition of
`hash_reset'
/usr/lib/mysql/libmysqlclient.a(hash.o)(.text+0x130): first defined
here
/usr/bin/ld: Warning: size of symbol `hash_reset' changed from 94 in
/usr/lib/mysql/libmysqlclient.a(hash.o) to 89 in
/usr/lib/mysql/libmysqlclient.a(hash.o)
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1

Suggested fix:
The mysql library and/or imap library need to
name-space protect their symbols. Please file a bug with them.
[20 Dec 2004 16:21] Sasha Dolgy
Using 4.1.6 this problem doesn't occur.
[28 Dec 2004 9:34] Victor Kimathi
I've experience the same problem with MySQL 4.1.7  and 4.1.8 as well as the new IMAP 2004b RC2.
[29 Dec 2004 19:04] Jim Maul
If its not something that has to do with mysql, then its definitely something that newer versions of mysql trigger when compiling.  I have a setup with php4.3.10 and imap-client.  Using mysql 4.13 this compiled and worked fine.  All i have done upgraded mysql to 4.18 and now re-building php 4.3.10 is causing this error.
[1 Jan 2005 23:13] Christopher Beers
I am experiencing this problem as well.  On Solaris 8 using 4.1.8 mysql, 2004a imap from University of Washington, and php.
[11 Jan 2005 7:17] Tony VanScoy
I was able to fix/patch this by modifying the files for imapd.

# cd imap-2004b/
# find . -type f -exec sed -i "s/hash_reset/FIX_hash_reset/g" {} \;
# make ???
# mkdir lib
# mkdir include
# cp c-client/*.h include
# cp c-client/*.c lib
# cp c-client/c-client.a lib/libc-client.a
# cd /dir/to/php/src
# make clean
# ./configure --with-apxs2 --with-mysql --with-imap=../where_i_just_was/imap-2004b --with-imap-ssl=/dir/to/openssl
[11 Jan 2005 11:20] Konstantin Osipov
Fixed in 4.1.9, 
Subject: bk commit - 4.1 tree (konstantin:1.2199) BUG#7428

ChangeSet
  1.2199 05/01/11 13:53:10 konstantin@mysql.com +2 -0
  A fix for linking failure of MySQL client when linking with imap libraries
  (Bug#7428) (renamed: hash_reset -> my_hash_reset)