[Pythonmac-SIG] How to get setuptools to build a Universal Binary?
Ned Deily
nad at acm.org
Thu Jan 8 01:57:45 CET 2009
In article <nad-B78282.16124207012009 at news.gmane.org>,
Ned Deily <nad at acm.org> wrote:
> In article <49653A6A.3070805 at strout.net>, Joe Strout <joe at strout.net>
> wrote:
> [...]
> > But OK, now this brings up the question of why my
> > libmysqlclient_r.16.dylib is Intel-only, when I took pains to install a
> > UB version of MySQL (c.f. the "Installing MySQL" section of
> > <http://www.dotancohen.com/howto/python-app-mac.html>). (I'm going to
> > do a fresh download of that mysql binary package and poke around inside
> > to see what I find.)
>
> Hmm, there's omething odd about that download.
>
> -rw-r--r--@ 1 nad staff 4396 Nov 20 23:31 libdbug.a
> -rw-r--r--@ 1 nad staff 2619952 Nov 20 23:31 libheap.a
> -rw-r--r--@ 1 nad staff 7612800 Nov 20 23:31 libmyisam.a
> -rw-r--r--@ 1 nad staff 3293744 Nov 20 23:31 libmyisammrg.a
> -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
> -rw-r--r--@ 1 nad staff 17541992 Nov 20 23:31 libmysqlclient.a
> -rwxr-xr-x@ 1 nad staff 4781040 Nov 15 14:57 libmysqlclient.dylib
> -rwxr-xr-x@ 1 nad staff 867 Nov 15 14:57 libmysqlclient.la
> -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
> -rw-r--r--@ 1 nad staff 17629744 Nov 20 23:31 libmysqlclient_r.a
> -rwxr-xr-x@ 1 nad staff 4801460 Nov 15 14:57 libmysqlclient_r.dylib
> -rwxr-xr-x@ 1 nad staff 881 Nov 15 14:57 libmysqlclient_r.la
> -rw-r--r--@ 1 nad staff 203291168 Nov 20 23:31 libmysqld.a
> -rw-r--r--@ 1 nad staff 5235560 Nov 20 23:31 libmystrings.a
> -rw-r--r--@ 1 nad staff 2435784 Nov 20 23:31 libmysys.a
> -rw-r--r--@ 1 nad staff 125656 Nov 20 23:30 libvio.a
> -rw-r--r--@ 1 nad staff 563080 Nov 20 23:30 libz.a
> -rwxr-xr-x@ 1 nad staff 741 Nov 15 14:57 libz.la
> drwxr-xr-x@ 2 nad staff 408 Nov 20 23:32 plugin
>
> $ file libmysqlclient_r.16.0.0.dylib
> 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
>
> $ file libmysqlclient_r.16.dylib
> libmysqlclient_r.16.dylib: Mach-O dynamically linked shared library i386
>
> Perhaps you can get away with making a symlink or copying from one to
> the other??
Ah, out of curiosity I download the latest mysql-5.0 universal build and
there all of the library files in lib *are* indeed universal (which can
be verified by a doing a "file lib*"):
~/Downloads/mysql-5.0.67-osx10.4-universal/lib$ ls -l
total 265624
-rw-r--r--@ 1 nad staff 4380 Aug 5 06:14 libdbug.a
-rw-r--r--@ 1 nad staff 2929 Aug 4 05:30 libmysql.imp
-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
-rw-r--r--@ 1 nad staff 17629984 Aug 5 06:15 libmysqlclient.a
-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
-rw-r--r--@ 1 nad staff 17716472 Aug 5 06:15 libmysqlclient_r.a
-rwxr-xr-x@ 1 nad staff 15437700 Aug 5 06:15 libmysqlclient_r.dylib
-rw-r--r--@ 1 nad staff 5389152 Aug 5 06:15 libmystrings.a
-rw-r--r--@ 1 nad staff 2258096 Aug 5 06:15 libmysys.a
-rw-r--r--@ 1 nad staff 562976 Aug 5 06:14 libz.a
$ diff libmysqlclient_r.15.0.0.dylib libmysqlclient_r.15.dylib
$
So, it looks like the 5.1 universal download is slightly broken and the
copying suggestion should work.
--
Ned Deily,
nad at acm.org
More information about the Pythonmac-SIG
mailing list