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

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


度々の投稿申し訳ありません。
ヤマシタです。

阿部さんにご対応頂き、以下にファイルがアップされていますので、ご確認ください。
http://squeakland.jp/squeakja/DebugReport-20091031182059.zip

時間の都合をつけ、Linuxでも調査をしてみたいと思います。

また、色々対応してみたり、ネットで調べたりしたのですが、
以下で何をしているのかわからないので、ご教授頂けないでしょうか?

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

現在発生しているエラーからFFI関連とOSX用の設定があやしいと思っています。

◆不明な点
・OpenDBX and FFIで記載の内容はすべて、/usr/local/libに存在している。
   PATH関係のチェックでなにをどうすれば良いのかわからない。
 他、多分記載の意味が理解できていない。。。と思います。

・Problems with Mac OSで記載のVM内のsymlinkは作成済み。
・plistのSqueakDebugの0から1には変更済み。
・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
http://smalltalkconsulting.com/html/squeakinfoplist.html

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:

SQUEAK_PLUGIN_PATH
VM_LIBDIR
VM_X11DIR

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

"/CoreServices.framework/Frameworks",

"/ApplicationServices.framework/Frameworks",
"/Carbon.framework/Frameworks",


When SqueakPluginsBuiltInOrLocalOnly is true we only look in

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


"/CoreServices.framework/Frameworks",
"/ApplicationServices.framework/Frameworks",
"/Carbon.framework/Frameworks",

その他、これまでに調べた内容を記載しておきます。

・参考文献/リンク等

http://lists.gforge.inria.fr/pipermail/pharo-project/2009-August/012820.html
http://dreamsofascorpion.blogspot.com/2008/05/using-opendbx-with-squeak.html
http://smalltalkimpressions.blogspot.com/2009/01/squeakdbx.html

かなり、的外れな内容かも知れませんが、ご教授頂けると幸いです。
以上、何卒宜しくお願い致します。

====
dai_yamashita


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