[SqueakDBX] SqueakDBX with MySQL in Snow Leopard 64 bits

Mariano Martinez Peck marianopeck at gmail.com
Tue Oct 27 19:59:39 UTC 2009


For those who are not subscribed with RSS in http://www.squeakdbx.org/news I
copy here the post. This will be the last email for posts. After this, all
of them will be in http://www.squeakdbx.org/news.


SqueakDBX with MySQL in Snow Leopard 64
bits<http://www.squeakdbx.org/news/SqueakDBX%20in%20Snow%20Leopard%2064%20bits>

As you may know, there are some problems with the SqueakVM on 64 bits and
FFI. So, if you have a 64 architecture, the most common approach is to use a
32 bits Squeak/Pharo VM. The problem here is how to install OpenDBX and the
client libraries.

In this case, we had:

   - Mac Snow Leopard 64 bits
   - SqueakVM is 32 bits.
   - MySQL

So, let’s start installing the MySQL client libraries. To do that, you
should do something like:

sudo port install mysql5-devel

But...that library is compiled with 64 bits by default. Thus, when OpenDBX
tries to load that library, you may get the following error:

oLoadModule(libopendbx.dylib): dlopen(libopendbx.dylib, 10): no suitable
image found. Did find: libopendbx.dylib: mach-o, but wrong architecture
/usr/local/lib/libopendbx.dylib: mach-o, but wrong architecture

So, we tried to do something like this:

CFLAGS="-m32" CXXFLAGS="-m32" sudo port install mysql5-devel

but we got the same results. Probably the flags are ignored :(

So, the solution we found was to download a precompiled MySQL client library
for 32 bits. It is here: http://dev.mysql.com/downloads/mysql/5.1.html and
download the file titled: "Mac OS X 10.5 (x86)"

Install it.

After that, you should compile OpenDBX like this:

CFLAGS="-m32" CXXFLAGS="-m32"
CPPFLAGS="-I/usr/local/mysql-5.1.40-osx10.5-x86/include"
LDFLAGS="-L/usr/local/mysql-5.1.40-osx10.5-x86/lib" ./configure
--enable-singlelib --disable-utils --with-backends="mysql"

With this, you should have all SqueakDBX tests in green :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeakdbx/attachments/20091027/6d1910b2/attachment.htm


More information about the SqueakDBX mailing list