[Squeak-ja: 4408] Re: SqueakDBXの導入について

daisuke yamashita y.daisuke.homeaddres @ gmail.com
2009年 11月 2日 (月) 00:36:03 JST





http://squeakdbx.smallworks.com.ar/Compiling%20and%20installing%20OpenDBX より


・OpenDBX and FFIで記載の内容はすべて、/usr/local/libに存在している。

・Problems with Mac OSで記載のVM内のsymlinkは作成済み。
・We also hunt in the .apps resources folder
 standard Plugins directory
 the current directory ./
 the vm directory
 and lastly frameworks in

◆OpenDBX and FFI

You can have a common problem which is that SqueakDBX, trough FFI,
cannot find openDBX library.
It can be this: If you compile openDBX by yourself,
the operation system will put all those files in the directory
associated for things compiled by the user.
For example, in most Linux distributions, it is /usr/local/lib.
However if you install it from binaries (.deb, .rpm or whatever) it
will put the installed application in /usr/lib.
We have situations when FFI was looking in one of those directories or
in different order.
Here you can do two things: copy all the files of openDBX to the other
directory, or create
symbolic links. The openDBX compilation resulted files and directories are:
directory /usr/local/lib/opendbx with 5 files inside per backend you
compile some libopendbx(10) in /usr/local/lib
file /usr/local/lib/pkgconfig/opendbx.pc

If you try to run any test and you get a ’unable to find function
address’ this means FFI doesn’t find the openDBX shared library.
In this case, there are some things you can do:
Evaluate ’OpenDBX current’. You should have a subclass of OpenDBX that
represents your OS.
For example, if you are in Mac OS, you must have an OpenDBXMacOSX instance.
check PATH variable: This depends on the OS. For example, in Linux you
should have: /usr/lib and /usr/local/lib.
check DYLD_LIBRARY_PATH or LD_LIBRARY_PATH variable. For example, in
Linux you should have: /usr/lib and /usr/local/lib.
Be sure the file of the shared library has the correct name.
Perhaps if you install openDBX from binaries (suppose .deb) it will
create the file libopendbx.so.1.
But FFI will search for libopendbx.so.
So, in this case, the simpler solution is to copy and rename (or just
rename) libopendbx.so.1 to libopendbx.so and should work like a charm.

◆Problems with Mac OS:

Check the property SqueakPluginsBuiltInOrLocalOnly in Info.plist de la
VM. This should be in false.
Put a symlink to the opendbx library inside the Squeak directory.
In other words create the link in the Resources directory of the
SqueakVM package:
cd Squeak 3.8.18beta3U.app/Contents/Resources/
ln -s /usr/local/lib/libopendbx.dylib opendbx

Set SqueakDebug to 1 and it will print lots of information about where
it’s trying to find the indicated library.
You will need to start the VM from a terminal session command line to
see the log messages.
When SqueakPluginsBuiltInOrLocalOnly is false we look in more places.

Environment variables it uses are:


We also hunt in the .apps resources folder
standard Plugins directory
the current directory ./
the vm directory
and lastly frameworks in



When SqueakPluginsBuiltInOrLocalOnly is true we only look in

the.apps resources folder
standard Plugins directory
and lastly frameworks in







Squeak-ja メーリングリストの案内