After spending more time helping Andy VestergÄrd to get everything working on his new Intel Mac mini we ran into problems compiling Postfix with MySQL support together with TLS/SSL support. In the linking phase of compiling Postfix we got many errors warning us about multiple definitions of symbols being used like:
/usr/bin/ld: multiple definitions of symbol _SSL_CTX_set_timeout /usr/lib/libssl.0.9.7.dylib(ssl_sess.o) definition of _SSL_CTX_set_timeout /usr/local/mysql/lib/libmysqlclient.a(ssl.o) definition of _SSL_CTX_set_timeout in section (__TEXT,__text)
It took me quite some time to locate the origin of this problem and ‘m sad to say that the cause lies with MySQL. In the lib directory of the MySQL installation there are no more shared libraries only static ones. There is even a bug being reported about this problem back in 2005 and it still isn’t solved. The remark being put there is to compile it yourself if you need it. I looked at the 5.0.x packages they provided both for PPC and Intel and the error is still there.
I guess this means I have to write documentation on how to compile your own binary of MySQL. This will delay the v2 documentation for some time…
- No related posts
May 20th, 2006 at 10:52 pm
Look at this thread for some pointers:
http://forums.mysql.com/read.php?117,57498,83024
WIth a little digging, you can get the original “./configure” line” for both ppc and i386 binary builds. Might be as simple as deleting the “disable-shared” option to produce shared libraries. Output from “./configure –help” shows that both static and shared are produced by default.
May 21st, 2006 at 6:25 am
The “./configure” line pulled from the mysqlbug file, as mentioned by the above hint, modified only by deleting the “disable-shared” option, will build shared/static libraries on a ppc mac. It will pass “make test” by patching two of the test scripts as mentioned by this mysql commit list:
http://lists.mysql.com/commits/6247
Didn’t start the server yet (too late), but the only oddity I noticed was that include & lib files were buried one level deeper. That is, lib files were at “/opt/local/mysql/lib/mysql” instead of “/opt/local/mysql/lib”. I set –prefix=/opt/local/mysql but it still built in that manner.
[Builiding in /opt/local to avoid the binary install]
Hope this helps with intel build.