On 20 December 2010 22:10, laurent laffont <laurent.laffont@gmail.com> wrote:
Hi Hernan, the strace equivalent on OSX seems to be dtruss (yes I'm learning OSX too :) sudo dtruss -p [pid of process] in the trace I have this: stat("/Users/laurentlaffont/Downloads/Seaside.app/Contents/Resources/yaz3.bundle/Contents/MacOS/yaz3\0", 0xBFF59440, 0xBFF5AB28) = -1 Err#2 stat64("/Users/laurentlaffont/Downloads/Seaside.app/Contents/Resources/yaz3.bundle/Contents/MacOS/yaz3\0", 0xBFF5892C, 0xBFF5AB28) = -1 Err#2 stat("/Users/laurentlaffont/Downloads/Seaside.app/Contents/Resources/yaz3\0", 0xBFF59440, 0xBFF5AB28) = 0 0 stat64("/Users/laurentlaffont/Downloads/Seaside.app/Contents/Resources/yaz3\0", 0xBFF5892C, 0xBFF5AB28) = 0 0 open("/Users/laurentlaffont/Downloads/Seaside.app/Contents/Resources/yaz3\0", 0x0, 0x0) = 12 0 pread(0xC, "\317\372\355\376\a\0", 0x1000, 0x0) = 4096 0 close(0xC) = 0 0 stat("/Users/laurentlaffont/Downloads/Plugins/yaz3.bundle/Contents/MacOS/yaz3\0", 0xBFF59440, 0x1000) = -1 Err#2 stat64("/Users/laurentlaffont/Downloads/Plugins/yaz3.bundle/Contents/MacOS/yaz3\0", 0xBFF5892C, 0x1000) = -1 Err#2 stat("/Users/laurentlaffont/Downloads/Plugins/yaz3\0", 0xBFF59440, 0x1000) = -1 Err#2 stat64("/Users/laurentlaffont/Downloads/Plugins/yaz3\0", 0xBFF5892C, 0x1000) = -1 Err#2
so it looks like the VM is trying to find yaz3 at non standard Unix places (I don't know if it's SqueakVM or OSX related). I've created Contents/Resources/yaz3.bundle/Contents/MacOS/, put yaz lib there, ln -s libyaz.3.dylib yaz3 but no success.
I've read good post http://forum.world.st/FFI-Documentation-td2225150.html :
Module Location - where the external library file lives - depends on the platform - Mac - pre Snow Leopard - checks VM path and common library paths - Snow Leopard - only looks in VM bundle's Resources file, you must either [5]: - store all external libraries there - ln -s path/to/library path/to/VM/Resources/library_name - Change the VM's Info.plist "SqueakPluginsBuiltInOrLocalOnly" key from "true" to "false."
For this SqueakPluginsBuiltInOrLocalOnly I suppose I need to compile a VM ?
no. Just go inside an .app folder (for Squeak its Squeak.app i guess) and look for Info.plist file. This is an xml file , where you can find and change that key.
Cheers, Laurent Laffont
-- Best regards, Igor Stasenko AKA sig.