Description:
The current development tools for Mac OS X 10.4 Tiger (Xcode 2.2.1) provide three gcc compilers (2.95, 3.3 and 4.01). These compilers are incompatible in that object files or static libraries built with one compiler cannot be linked with objects produced by another compiler. This also applies to loadable bundles, which on Mac OS/Darwin are not the same as dynamic libraries. Dynamic libraries do not have this problem. I presume this is why Apple say static libraries are not supported on Mac OS X.
Various language packages such as Perl, Python, R etc. use extensions which are loadable bundles and have extension building mechanisms which ensure the extensions are built with the same series compiler as the main binary. This means that extensions using the MySQL client libraries will only build if the Perl/Python/R binary was built with the same compiler as the MySQL binary. More correctly, they will often build but throw an error at load time.
I have built a version 5.0.18 binary with dynamic client libraries by omitting the '--all-static' libtool option. This passes all tests and links correctly with MySQL-Python 1.2.1c3, whereas a MySQL-Python build using the official binary failed on import to Python.
While on the subject of building from source, it would be good to have a build script that produced the same installed file layout as the 'Official' binary. Using the configuration from mysqlbug in the offical binary installs the .cnf files and mysql.server in share/mysql. This prevents the System Preference pane from working unless the files are manually rearranged. It would also break other scripts that users might have.
Thanks
Bill Northcott
How to repeat:
Build from source tarballs without either '--disable-shared' or '--all-static'. Install with 'sudo make install' and compare libraries and file layouts.
Suggested fix:
1. Include dynamic versions of libmysqlclient and libmysqlclient_r in the binary, possibly as an optional install.
2. include a BUILD/compile-darwin or similar script which will produce the offical binary layout from the source tarball.