Hi,
I want to use http://www.squeaksource.com/Z3950 Following install instructions, I've dowloaded yaz sources (I've tried 4.1.2 and 3.0.52) as it seems there's no binary for OSX, ./configure && make && make install.
Then using latest Seaside One Click image I've copied /usr/local/lib/*yaz* in Seaside.app/Contents/MacOS $ ls ~/Downloads/Seaside.app/Contents/MacOS/
Squeak VM Opt libyaz.a libyaz.la libyaz_icu.a libyaz_icu.la libyaz_server.a libyaz_server.la libyaz.3.dylib libyaz.dylib libyaz_icu.3.dylib libyaz_icu.dylib libyaz_server.3.dylib libyaz_server.dylib
But then I have a External Module Not Found on YAZPQFFFILibrary>>createParser " YAZPQDFFILibrary default createParser "
<cdecl: YAZPQFParser 'yaz_pqf_create' (void) module: 'yaz3'>
^ self externalCallFailed Any hint ? Cheers, Pharo Smalltalk Screencasts: http://www.pharocasts.com/ Blog: http://magaloma.blogspot.com/ |
I want to know that too.
On Dec 19, 2010, at 9:22 AM, laurent laffont wrote: > Hi, > > I want to use http://www.squeaksource.com/Z3950 > > Following install instructions, I've dowloaded yaz sources (I've tried 4.1.2 and 3.0.52) as it seems there's no binary for OSX, ./configure && make && make install. > > Then using latest Seaside One Click image I've copied /usr/local/lib/*yaz* in Seaside.app/Contents/MacOS > > $ ls ~/Downloads/Seaside.app/Contents/MacOS/ > Squeak VM Opt libyaz.a libyaz.la libyaz_icu.a libyaz_icu.la libyaz_server.a libyaz_server.la libyaz.3.dylib libyaz.dylib libyaz_icu.3.dylib libyaz_icu.dylib libyaz_server.3.dylib libyaz_server.dylib > > > > But then I have a External Module Not Found on YAZPQFFFILibrary>>createParser > " YAZPQDFFILibrary default createParser " > > <cdecl: YAZPQFParser 'yaz_pqf_create' (void) module: 'yaz3'> > ^ self externalCallFailed > > > Any hint ? > > Cheers, > > Laurent Laffont -- FFI newbie > > Pharo Smalltalk Screencasts: http://www.pharocasts.com/ > Blog: http://magaloma.blogspot.com/ |
In reply to this post by laurent laffont
Hi Laurent,
Thanks for reporting. The correct #moduleName for MacOS was missing, I've uploaded a new version answering 'libyaz.3.dylib' which I guess is the corresponding for 'yaz3.dll' (according to http://en.wikipedia.org/wiki/Dynamic_library#Naming ). I haven't access to a MacOS, but in Windows I've had to find the mangled function names (i.e. _ZOOM_connection_create@4) so FFI can find the function addresses and you don't get the classic "Error: Unable to find function address". I don't know if it's related since talks about C++, but you may want to check http://wiki.squeak.org/squeak/3735 The tool I've used to find the mangled function names in Windows is the Steve Miller's Dependency Walker http://www.dependencywalker.com/ 2010/12/19 laurent laffont <[hidden email]>: > Hi, > > I want to use http://www.squeaksource.com/Z3950 > Following install instructions, I've dowloaded yaz sources (I've tried 4.1.2 > and 3.0.52) as it seems there's no binary for OSX, ./configure && make && > make install. > Then using latest Seaside One Click image I've copied /usr/local/lib/*yaz* > in Seaside.app/Contents/MacOS > $ ls ~/Downloads/Seaside.app/Contents/MacOS/ > Squeak VM Opt libyaz.a libyaz.la > libyaz_icu.a libyaz_icu.la libyaz_server.a > libyaz_server.la libyaz.3.dylib libyaz.dylib > libyaz_icu.3.dylib libyaz_icu.dylib libyaz_server.3.dylib > libyaz_server.dylib > > > But then I have a External Module Not Found on > YAZPQFFFILibrary>>createParser > " YAZPQDFFILibrary default createParser " > <cdecl: YAZPQFParser 'yaz_pqf_create' (void) module: 'yaz3'> > ^ self externalCallFailed > > Any hint ? > Cheers, > Laurent Laffont -- FFI newbie > > Pharo Smalltalk Screencasts: http://www.pharocasts.com/ > Blog: http://magaloma.blogspot.com/ > -- Hernán Morales Information Technology Manager, Institute of Veterinary Genetics. National Scientific and Technical Research Council (CONICET). La Plata (1900), Buenos Aires, Argentina. Telephone: +54 (0221) 421-1799. Internal: 422 Fax: 425-7980 or 421-1799. |
Thanks Hernan. It still doesn't work. I've also tried to play with LD_LOAD_PATH / LD_LIBRARY_PATH no success.... I want to make it work so I need to learn :)
For the mangled function names, on Linux and OSX there's nm.
Here's what I get: $ nm -g libyaz.3.dylib | grep ZOOM_connection_create 0000000000046a30 T _ZOOM_connection_create
Cheers, Laurent On Sun, Dec 19, 2010 at 6:23 PM, Hernán Morales Durand <[hidden email]> wrote: Hi Laurent, |
Hi Laurent
I've read there is a couple of system calll monitors in MacOS, ktrace and dtrace (http://en.wikipedia.org/wiki/Ktrace , http://en.wikipedia.org/wiki/DTrace) so you may attach to the VM and see what's missing? Cheers, Hernán 2010/12/20 laurent laffont <[hidden email]>: > Thanks Hernan. > It still doesn't work. I've also tried to play with LD_LOAD_PATH / > LD_LIBRARY_PATH no success.... I want to make it work so I need to learn :) > > For the mangled function names, on Linux and OSX there's nm. > Here's what I get: > $ nm -g libyaz.3.dylib | grep ZOOM_connection_create > 0000000000046a30 T _ZOOM_connection_create > Cheers, > Laurent > > On Sun, Dec 19, 2010 at 6:23 PM, Hernán Morales Durand > <[hidden email]> wrote: >> >> Hi Laurent, >> >> Thanks for reporting. The correct #moduleName for MacOS was missing, >> I've uploaded a new version answering 'libyaz.3.dylib' which I guess >> is the corresponding for 'yaz3.dll' (according to >> http://en.wikipedia.org/wiki/Dynamic_library#Naming ). >> >> I haven't access to a MacOS, but in Windows I've had to find the >> mangled function names (i.e. _ZOOM_connection_create@4) so FFI can >> find the function addresses and you don't get the classic "Error: >> Unable to find function address". I don't know if it's related since >> talks about C++, but you may want to check >> http://wiki.squeak.org/squeak/3735 >> >> The tool I've used to find the mangled function names in Windows is >> the Steve Miller's Dependency Walker http://www.dependencywalker.com/ >> >> 2010/12/19 laurent laffont <[hidden email]>: >> > Hi, >> > >> > I want to use http://www.squeaksource.com/Z3950 >> > Following install instructions, I've dowloaded yaz sources (I've tried >> > 4.1.2 >> > and 3.0.52) as it seems there's no binary for OSX, ./configure && make >> > && >> > make install. >> > Then using latest Seaside One Click image I've copied >> > /usr/local/lib/*yaz* >> > in Seaside.app/Contents/MacOS >> > $ ls ~/Downloads/Seaside.app/Contents/MacOS/ >> > Squeak VM Opt libyaz.a libyaz.la >> > libyaz_icu.a libyaz_icu.la libyaz_server.a >> > libyaz_server.la libyaz.3.dylib libyaz.dylib >> > libyaz_icu.3.dylib libyaz_icu.dylib libyaz_server.3.dylib >> > libyaz_server.dylib >> > >> > >> > But then I have a External Module Not Found on >> > YAZPQFFFILibrary>>createParser >> > " YAZPQDFFILibrary default createParser " >> > <cdecl: YAZPQFParser 'yaz_pqf_create' (void) module: 'yaz3'> >> > ^ self externalCallFailed >> > >> > Any hint ? >> > Cheers, >> > Laurent Laffont -- FFI newbie >> > >> > Pharo Smalltalk Screencasts: http://www.pharocasts.com/ >> > Blog: http://magaloma.blogspot.com/ >> > >> >> -- >> Hernán Morales >> Information Technology Manager, >> Institute of Veterinary Genetics. >> National Scientific and Technical Research Council (CONICET). >> La Plata (1900), Buenos Aires, Argentina. >> Telephone: +54 (0221) 421-1799. >> Internal: 422 >> Fax: 425-7980 or 421-1799. > > |
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 ? Cheers, On Mon, Dec 20, 2010 at 4:12 PM, Hernán Morales Durand <[hidden email]> wrote: Hi Laurent |
On 20 December 2010 22:10, laurent laffont <[hidden email]> 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. |
In reply to this post by hernanmd
On Mon, Dec 20, 2010 at 4:12 PM, Hernán Morales Durand <[hidden email]> wrote: Hi Laurent I know this is an old thread, but the SqueakVM has already been integrated with DTrace by Adrian Lienchard: http://forum.world.st/ANN-DTrace-for-Squeak-Pharo-tp2173421p2173421.html Hernán -- Mariano http://marianopeck.wordpress.com |
On Mon, Apr 25, 2011 at 7:49 PM, Mariano Martinez Peck <[hidden email]> wrote:
OK Laurent.
|
Free forum by Nabble | Edit this page |