[Pharo-project] squeakopendbx, which VM?
On linux I installed OpenDBX, checked it work to connect to my remote database Then check for system awarness of it: hilaire@tice:~/Documents/Projets/BaseRessources$ ldconfig -p | grep opendbx libopendbxplus.so.1 (libc6) => /usr/lib/libopendbxplus.so.1 libopendbx.so.1 (libc6) => /usr/lib/libopendbx.so.1 Then installed squeakdbx in pharo from universe so ffi is installed as well. I installed the latest vm (3.10-4 #2) from squeakvm.org web site as my previous vm was apparently without ffi (or could it be the plugin compiled in the VM?). When trying to connect, I still have 'unable to find function address'. FFI is pretty autist about what is going wrong. Any clue? Hilaire -- http://blog.ofset.org/hilaire
2009/4/28 Hilaire Fernandes <hilaire@ofset.org>
On linux
I installed OpenDBX, checked it work to connect to my remote database
Then check for system awarness of it:
hilaire@tice:~/Documents/Projets/BaseRessources$ ldconfig -p | grep opendbx libopendbxplus.so.1 (libc6) => /usr/lib/libopendbxplus.so.1 libopendbx.so.1 (libc6) => /usr/lib/libopendbx.so.1
Then installed squeakdbx in pharo from universe so ffi is installed as well.
I installed the latest vm (3.10-4 #2) from squeakvm.org web site as my previous vm was apparently without ffi (or could it be the plugin compiled in the VM?).
When trying to connect, I still have 'unable to find function address'.
As you can read in the FAQ, this is because FFI doesn't find openDBX library. Read this link and tell me if it works: http://wiki.squeak.org/squeak/6129#OpenDBX%20and%20FFI Questions: - how did you install openDBX ? compile by yourself or binaries ? - do you have the mysql client library installed ? Cheers, Mariano
FFI is pretty autist about what is going wrong.
Any clue?
Hilaire
-- http://blog.ofset.org/hilaire
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
2009/4/28 Mariano Martinez Peck <marianopeck@gmail.com>
2009/4/28 Hilaire Fernandes <hilaire@ofset.org>
On linux
I installed OpenDBX, checked it work to connect to my remote database
Then check for system awarness of it:
hilaire@tice:~/Documents/Projets/BaseRessources$ ldconfig -p | grep opendbx libopendbxplus.so.1 (libc6) => /usr/lib/libopendbxplus.so.1 libopendbx.so.1 (libc6) => /usr/lib/libopendbx.so.1
Then installed squeakdbx in pharo from universe so ffi is installed as well.
I installed the latest vm (3.10-4 #2) from squeakvm.org web site as my previous vm was apparently without ffi (or could it be the plugin compiled in the VM?).
When trying to connect, I still have 'unable to find function address'.
As you can read in the FAQ, this is because FFI doesn't find openDBX library. Read this link and tell me if it works: http://wiki.squeak.org/squeak/6129#OpenDBX%20and%20FFI
I already check that. Questions: - how did you install openDBX ? compile by yourself or binaries ? - do you have the mysql client library installed ? I installed opendbx from debian package, so it is in /usr/lib As I wrote it, Opendbx is working in my station: I can connect to my remote database through the opendbx interactive mode. mysql client and library are installed of course. I am curious about how FFI find the library. Does it goes to the ldconfig cache? Or does it check through preset path. In doubt I added system wide env variable: LD_LIBRARY_PATH=/usr/lib:/usr/local/lib but it does not help. Hilaire -- http://blog.ofset.org/hilaire
I installed the latest vm (3.10-4 #2) from squeakvm.org web site as my previous vm was apparently without ffi (or could it be the plugin compiled in the VM?).
To know this: SmalltalkImage current listLoadedModules In pharo, I would install FFI from ScriptLoader. Just like this: ScriptLoader loadFFI. See http://code.google.com/p/pharo/wiki/CodeSnippets Cheers, Mariano
2009/4/28 Mariano Martinez Peck <marianopeck@gmail.com>
I installed the latest vm (3.10-4 #2) from squeakvm.org web site as my previous vm was apparently without ffi (or could it be the plugin compiled in the VM?).
To know this:
SmalltalkImage current listLoadedModules
I got: #('SqueakFFIPrims 10 November 2008 (e)' 'SocketPlugin 10 November 2008 (i)' 'ImmX11Plugin 10 November 2008 (e)' 'B2DPlugin 10 November 2008 (i)' 'BitBltPlugin 10 November 2008 (i)' 'LargeIntegers v1.5 10 November 2008 (i)' 'FT2Plugin 5 October 2006 (e)' 'SecurityPlugin 10 November 2008 (i)' 'FilePlugin 10 November 2008 (i)' 'MiscPrimitivePlugin 10 November 2008 (i)') So it looks ok.
In pharo, I would install FFI from ScriptLoader. Just like this:
ScriptLoader loadFFI.
It was installed from Universe. Does it matter? I will try it. Hilaire -- http://blog.ofset.org/hilaire
In pharo, I would install FFI from ScriptLoader. Just like this:
ScriptLoader loadFFI.
I don't have it in my version of Pharo. I don't know if I can update it without going through a full pharo image which I don't want to do now. Hilaire -- http://blog.ofset.org/hilaire
2009/4/28 Hilaire Fernandes <hilaire@ofset.org>
In pharo, I would install FFI from ScriptLoader. Just like this:
ScriptLoader loadFFI.
I don't have it in my version of Pharo. I don't know if I can update it without going through a full pharo image which I don't want to do now.
Ok. Doesn't matter. Your current problem is not about FFI but you will have that problem then (when you get squeakDBX working). You only need to get the latests FFI version from MC to work in pharo with closure VM. I haven't my linux machine here, I will look tonight in my home, but: 1) what do you have /usr/lib in PATH ? 2) Just for testing, can you put the openDBX libraries in the same directory where the pharo image is. 3) The same as 2) but where the VM is. Cheers, Mariano
Hilaire
-- http://blog.ofset.org/hilaire
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
2009/4/28 Mariano Martinez Peck <marianopeck@gmail.com>
I don't have it in my version of Pharo. I don't know if I can update it without going through a full pharo image which I don't want to do now.
Ok. Doesn't matter. Your current problem is not about FFI but you will have that problem then (when you get squeakDBX working). You only need to get the latests FFI version from MC to work in pharo with closure VM.
I am pretty sure the VM I used is not with the fixed closure. I am note sure about the image, I can tell you tomorrow the version number of the image when at the office. Is the fixed closure mandatory to get SqueakDBX working? Which Pharo # image and VM should be used? I haven't my linux machine here, I will look tonight in my home, but:
1) what do you have /usr/lib in PATH ? No it points only to binary as it should. Does FFI looks at PATH for the libraries? If so it is a buggy behavior. I am really currious to know how FFI find the libraries...
2) Just for testing, can you put the openDBX libraries in the same directory where the pharo image is. 3) The same as 2) but where the VM is. I will try tomorrow morning. Thanks! Hilaire -- http://blog.ofset.org/hilaire
2009/4/28 Hilaire Fernandes <hilaire@ofset.org>
2009/4/28 Mariano Martinez Peck <marianopeck@gmail.com>
I don't have it in my version of Pharo. I don't know if I can update it without going through a full pharo image which I don't want to do now.
Ok. Doesn't matter. Your current problem is not about FFI but you will have that problem then (when you get squeakDBX working). You only need to get the latests FFI version from MC to work in pharo with closure VM.
I am pretty sure the VM I used is not with the fixed closure. I am note sure about the image, I can tell you tomorrow the version number of the image when at the office. Is the fixed closure mandatory to get SqueakDBX working? Which Pharo # image and VM should be used?
SqueakDBX works with both. If you use a closure image you must use a VM with closure an latest FFI (from MC). But, you can also use Squeak in older version (non closure) with FFI from Universes. So, no problem for you.
I haven't my linux machine here, I will look tonight in my home, but:
1) what do you have /usr/lib in PATH ? No it points only to binary as it should. Does FFI looks at PATH for the libraries? If so it is a buggy behavior. I am really currious to know how FFI find the libraries...
I am not sure about this. Perhaps someone (Andreas) can help us.
2) Just for testing, can you put the openDBX libraries in the same directory where the pharo image is.
3) The same as 2) but where the VM is.
I will try tomorrow morning.
Which Linux are you using? Perhaps there is a problem trying to resolve the library. The last test you can do (just to see if it works) is this: Go t class OpenDBXUnix and change the methods apiBind: handle database: databaseName name: userName password: password method: method and apiInitialize: handle backend: backend host: host port: port In both, put module: 'libopendbx.so.1' or module: 'libopendbx.so' instead of module: 'opendbx' I hope you get it working. Ask all what you want. Greetings, Mariano
Thanks!
Hilaire
-- http://blog.ofset.org/hilaire
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
I think I fix it :) I took a clean Ubuntu. I did: sudo dpkg -i libopendbx1_1.4.0-1_i386.deb libopendbx1-mysql_1.4.0-1_i386.deb Then ldconfig -p | grep opendbx show the same as you: libopendbxplus.so.1 (libc6) => /usr/lib/libopendbxplus.so.1 libopendbx.so.1 (libc6) => /usr/lib/libopendbx.so.1 The problem is that we have as module: opendbx. Ubuntu looks for libMODULE_NAME.so. In this case, was searching libopendbx.so. But, your (and my) file was named libopendbx.so.1. Solution: copy and rename (or just rename) libopendbx.so.1 to libopendbx.so and should work like a charm. Thanks for your testing Hilaire. We want SqueakDBX to be as much easier as possible. So, documenting the wiki with several cases will definitively help us. I add this information to the wiki. Let me know if that work. Cheers, Mariano On Tue, Apr 28, 2009 at 2:56 PM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
2009/4/28 Hilaire Fernandes <hilaire@ofset.org>
2009/4/28 Mariano Martinez Peck <marianopeck@gmail.com>
I don't have it in my version of Pharo. I don't know if I can update it without going through a full pharo image which I don't want to do now.
Ok. Doesn't matter. Your current problem is not about FFI but you will have that problem then (when you get squeakDBX working). You only need to get the latests FFI version from MC to work in pharo with closure VM.
I am pretty sure the VM I used is not with the fixed closure. I am note sure about the image, I can tell you tomorrow the version number of the image when at the office. Is the fixed closure mandatory to get SqueakDBX working? Which Pharo # image and VM should be used?
SqueakDBX works with both. If you use a closure image you must use a VM with closure an latest FFI (from MC). But, you can also use Squeak in older version (non closure) with FFI from Universes. So, no problem for you.
I haven't my linux machine here, I will look tonight in my home, but:
1) what do you have /usr/lib in PATH ? No it points only to binary as it should. Does FFI looks at PATH for the libraries? If so it is a buggy behavior. I am really currious to know how FFI find the libraries...
I am not sure about this. Perhaps someone (Andreas) can help us.
2) Just for testing, can you put the openDBX libraries in the same directory where the pharo image is.
3) The same as 2) but where the VM is.
I will try tomorrow morning.
Which Linux are you using? Perhaps there is a problem trying to resolve the library. The last test you can do (just to see if it works) is this:
Go t class OpenDBXUnix and change the methods
apiBind: handle database: databaseName name: userName password: password method: method
and
apiInitialize: handle backend: backend host: host port: port
In both, put module: 'libopendbx.so.1' or module: 'libopendbx.so' instead of module: 'opendbx'
I hope you get it working. Ask all what you want.
Greetings,
Mariano
Thanks!
Hilaire
-- http://blog.ofset.org/hilaire
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
2009/4/28 Mariano Martinez Peck <marianopeck@gmail.com>
In both, put module: 'libopendbx.so.1' or module: 'libopendbx.so' instead of module: 'opendbx'
It worked like a charm. I renamed all 'opendbx' occurrences to libopendbx.so.1 Thanks! Hilaire -- http://blog.ofset.org/hilaire
2009/4/29 Hilaire Fernandes <hilaire@ofset.org>
2009/4/28 Mariano Martinez Peck <marianopeck@gmail.com>
In both, put module: 'libopendbx.so.1' or module: 'libopendbx.so' instead of module: 'opendbx'
It worked like a charm. I renamed all 'opendbx' occurrences to libopendbx.so.1
Ok. However, I think it is better the last solution I told you (renaming the file) because you don't need to change the code. I will send an email to openDBX author and see if we can rename the .so that are generated from deb. Cheers, Mariano
Thanks!
Hilaire
-- http://blog.ofset.org/hilaire
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
2009/4/28 Hilaire Fernandes <hilaire@ofset.org>
In pharo, I would install FFI from ScriptLoader. Just like this:
ScriptLoader loadFFI.
I don't have it in my version of Pharo. I don't know if I can update it without going through a full pharo image which I don't want to do now.
Last version from MC: MCHttpRepository location: 'http://source.squeakfoundation.org/FFI' user: '' password: ''
Hilaire
-- http://blog.ofset.org/hilaire
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (3)
-
Hilaire Fernandes -
Mariano Martinez Peck -
Mariano Martinez Peck: "si,ty no es gripe gordito..."