Bug #41940 client libraries in 5.1 universal tar are not all universal binaries
Submitted: 8 Jan 2009 2:01 Modified: 30 Jun 2009 14:38
Reporter: Ned Deily Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:5.1.30 OS:MacOS (10.4 (Universal) TAR)
Assigned to: Kent Boortz CPU Architecture:Any

[8 Jan 2009 2:01] Ned Deily
Description:
In the 5.1.30 universal tarball, the files libmysqlclient.16.0.0.dylib and libmysqlclient_r.16.0.0.dylib are 3-way universal binaries (i386, ppc, ppc64) but the corresponding libmysqlclient.16.dylib and libmysqlclient_r.16.dylib files are i386 only.

In the latest 5.0 universal tarball, these files are all universal (see below).

This problem shows up when trying to build universal applications, for instance with python and MySQLdb adapter. 

Also, is there a reason why the universal binaries are not 4-way, i.e. why isn't arch x86_64 included?

How to repeat:
~/Downloads/mysql-5.1.30-osx10.4-universal/lib$ ls -l libmysqlclient*.dylib
-rwxr-xr-x@ 1 nad  staff  15266468 Nov 20 23:32 libmysqlclient.16.0.0.dylib
-rwxr-xr-x@ 1 nad  staff   4781040 Nov 15 14:57 libmysqlclient.16.dylib
-rwxr-xr-x@ 1 nad  staff   4781040 Nov 15 14:57 libmysqlclient.dylib
-rwxr-xr-x@ 1 nad  staff  15337152 Nov 20 23:32 libmysqlclient_r.16.0.0.dylib
-rwxr-xr-x@ 1 nad  staff   4801460 Nov 15 14:57 libmysqlclient_r.16.dylib
-rwxr-xr-x@ 1 nad  staff   4801460 Nov 15 14:57 libmysqlclient_r.dylib

~/Downloads/mysql-5.1.30-osx10.4-universal/lib$ file libmysqlclient*.dylib
libmysqlclient.16.0.0.dylib:   Mach-O universal binary with 3 architectures
libmysqlclient.16.0.0.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libmysqlclient.16.0.0.dylib (for architecture ppc64):	Mach-O 64-bit dynamically linked shared library ppc64
libmysqlclient.16.0.0.dylib (for architecture ppc):	Mach-O dynamically linked shared library ppc
libmysqlclient.16.dylib:       Mach-O dynamically linked shared library i386
libmysqlclient.dylib:          Mach-O dynamically linked shared library i386
libmysqlclient_r.16.0.0.dylib: Mach-O universal binary with 3 architectures
libmysqlclient_r.16.0.0.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libmysqlclient_r.16.0.0.dylib (for architecture ppc64):	Mach-O 64-bit dynamically linked shared library ppc64
libmysqlclient_r.16.0.0.dylib (for architecture ppc):	Mach-O dynamically linked shared library ppc
libmysqlclient_r.16.dylib:     Mach-O dynamically linked shared library i386
libmysqlclient_r.dylib:        Mach-O dynamically linked shared library i386

~/Downloads/mysql-5.0.67-osx10.4-universal/lib$ ls -l libmysqlclient*.dylib
-rwxr-xr-x@ 1 nad  staff  15367288 Aug  5 06:15 libmysqlclient.15.0.0.dylib
-rwxr-xr-x@ 1 nad  staff  15367288 Aug  5 06:15 libmysqlclient.15.dylib
-rwxr-xr-x@ 1 nad  staff  15367288 Aug  5 06:15 libmysqlclient.dylib
-rwxr-xr-x@ 1 nad  staff  15437700 Aug  5 06:15 libmysqlclient_r.15.0.0.dylib
-rwxr-xr-x@ 1 nad  staff  15437700 Aug  5 06:15 libmysqlclient_r.15.dylib
-rwxr-xr-x@ 1 nad  staff  15437700 Aug  5 06:15 libmysqlclient_r.dylib

:~/Downloads/mysql-5.0.67-osx10.4-universal/lib$ file libmysqlclient*.dylib
libmysqlclient.15.0.0.dylib:   Mach-O universal binary with 3 architectures
libmysqlclient.15.0.0.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libmysqlclient.15.0.0.dylib (for architecture ppc64):	Mach-O 64-bit dynamically linked shared library ppc64
libmysqlclient.15.0.0.dylib (for architecture ppc):	Mach-O dynamically linked shared library ppc
libmysqlclient.15.dylib:       Mach-O universal binary with 3 architectures
libmysqlclient.15.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libmysqlclient.15.dylib (for architecture ppc64):	Mach-O 64-bit dynamically linked shared library ppc64
libmysqlclient.15.dylib (for architecture ppc):	Mach-O dynamically linked shared library ppc
libmysqlclient.dylib:          Mach-O universal binary with 3 architectures
libmysqlclient.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libmysqlclient.dylib (for architecture ppc64):	Mach-O 64-bit dynamically linked shared library ppc64
libmysqlclient.dylib (for architecture ppc):	Mach-O dynamically linked shared library ppc
libmysqlclient_r.15.0.0.dylib: Mach-O universal binary with 3 architectures
libmysqlclient_r.15.0.0.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libmysqlclient_r.15.0.0.dylib (for architecture ppc64):	Mach-O 64-bit dynamically linked shared library ppc64
libmysqlclient_r.15.0.0.dylib (for architecture ppc):	Mach-O dynamically linked shared library ppc
libmysqlclient_r.15.dylib:     Mach-O universal binary with 3 architectures
libmysqlclient_r.15.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libmysqlclient_r.15.dylib (for architecture ppc64):	Mach-O 64-bit dynamically linked shared library ppc64
libmysqlclient_r.15.dylib (for architecture ppc):	Mach-O dynamically linked shared library ppc
libmysqlclient_r.dylib:        Mach-O universal binary with 3 architectures
libmysqlclient_r.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
libmysqlclient_r.dylib (for architecture ppc64):	Mach-O 64-bit dynamically linked shared library ppc64
libmysqlclient_r.dylib (for architecture ppc):	Mach-O dynamically linked shared library ppc

Suggested fix:
Create symlinks for the unversioned paths of the libraries as is commonly done with other OSX and Unix-y libraries, rather than having multiple copies of the file.

Add -arch x86_64 to build 4-way libraries?
[11 Jan 2009 12:34] Sveta Smirnova
Thank you for the report.

Verified as described.
[22 Feb 2009 16:32] Kent Boortz
This is corrected in 5.1.32
[24 Feb 2009 21:02] Paul DuBois
Noted in 5.1.32 changelog.

On Mac OS X, some of the universal client libraries were not actually
universal and were missing code for the x86_64 architecture.

Setting report to NDI pending push into 5.0.x/6.0.x.
[24 Feb 2009 21:05] Paul DuBois
Revised changelog comment:

On Mac OS X, some of the universal client libraries were not actually
universal and were missing code for one or more architectures.
[2 Mar 2009 17:15] Paul DuBois
Noted in 5.0.78 changelog.

Setting report to NDI pending push into 6.0.x.
[30 Jun 2009 14:38] Paul DuBois
Noted in 6.0.11 changelog.