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?