Bug #15017 Compiling mysql clients fail using 64bit standard binaries for MacOSX 10.4
Submitted: 17 Nov 2005 14:02 Modified: 6 Mar 2013 9:17
Reporter: Geert Vanderkelen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S4 (Feature request)
Version:5.0.15 OS:Mac OS X (MacOSX 10.4 64bit)
Assigned to: CPU Architecture:Any

[17 Nov 2005 14:02] Geert Vanderkelen
Description:
Hi!

Compiling applications using the client libarry shipping with standard binary distribution for MacOSX 10.4 64-bit is failing with following error:

/usr/bin/ld: truncated or malformed archive: /usr/local/mysql-standard-5.0.15-osx10.4-powerpc-64bit/lib/libmysqlclient.a (ranlib structures in table of contents extends past the end of the table of contents, can't load from it)

This was when compiling PHP, but ther are some references online which have similar errors compiling DBD::mysql for example.

Geert

How to repeat:
- Unpack mysql-standard-5.0.15-osx10.4-powerpc-64bit.tar.gz in /usr/local or install using Installer
- Get PHP 5.0.5, and use following to configure it: (should work on most systems, Maybe need zlib though..)

./configure --with-mysql=/usr/local/mysql-standard-5.0.15-osx10.4-powerpc-64bit --with-mysqli=/usr/local/mysql-standard-5.0.15-osx10.4-powerpc-64bit/bin/mysql_config

Gives:
..
/usr/bin/ld: truncated or malformed archive: /usr/local/mysql-standard-5.0.15-osx10.4-powerpc-64bit/lib/libmysqlclient.a (ranlib structures in table of contents extends past the end of the table of contents, can't load from it)
..

Suggested fix:
No fix, but workarounds for now:
- compile from 5.0.15 source
- install the 32bit distribution instead of the 64bit
[22 Nov 2005 19:56] Jorge del Conde
Verified w/5.0.16bk and 10.4.2
[3 Aug 2006 12:42] Kent Boortz
Trying to link a 32 bit application with the 64 bit
client library part of the 64 bit server package will
of course fail. So this is not a bug.

But changed this to a "Feature request", as from a user
perspective "installing MySQL" should be enough to be
able to use the client. And installing two server packages
could potentially cause problems with start scripts.

There are several possible solutions to this

 - Separate client packages. Would still require to
   install a separate new package, but more clear
   than be forced to install two server packages.

 - Include both 32 and 64 bit client libraries in
   both server packages, or at least the 32 bit server
   package. But as they are installed in
   "/usr/local/mysql-<version>/lib/..." it is likley
   still a bit confusing, as the non standard
   placement requires the user compiling PHP to point
   to the right client library directory at that location.

 - Universal binaries. Contains both 32 bit and 64 bit
   client libraries in the same library file. From a
   user standpoint the most easy to use solution.
[6 Mar 2013 9:17] Yngve Svendsen
Rejecting this, since it will realistically never be prioritized highly enough to get resolved.