Hi folks!<br><br>I have a problem with SqueakDBX and FFI. I install openDBX from a .deb and I get this:<br><br>ldconfig -p | grep opendbx   show the same as you:<div class="im"><br>    libopendbxplus.so.1 (libc6) =&gt; /usr/lib/libopendbxplus.so.1<br>

    libopendbx.so.1 (libc6) =&gt; /usr/lib/libopendbx.so.1<br><br></div>The problem is that we (in squeakDBX) have as module: opendbx. Linux looks for libMODULE_NAME.so. <br><br>In this case, was searching libopendbx.so. But, my file was named libopendbx.so.1. And of course, I got a &#39;unable to find function address&#39;.<br>

<br>Solution: copy and rename (or just rename) libopendbx.so.1 to libopendbx.so and worked like a charm.<br><br>But, the question is, shouldn&#39;t FFI resolve this ? is this a matter of the linker ?<br><br>Thanks for the help!<br>
<br>Mariano<br><br><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Mariano Martinez Peck</b> <span dir="ltr">&lt;<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt;</span><br>
Date: Tue, Apr 28, 2009 at 10:40 PM<br>Subject: Re: [Pharo-project] squeakopendbx, which VM?<br>To: <a href="mailto:Pharo-project@lists.gforge.inria.fr">Pharo-project@lists.gforge.inria.fr</a><br><br><br>I think I fix it :)<br>
<br>I took a clean Ubuntu. I did:<br><br>sudo dpkg -i libopendbx1_1.4.0-1_i386.deb libopendbx1-mysql_1.4.0-1_i386.deb <br><br>Then  ldconfig -p | grep opendbx   show the same as you:<div class="im"><br><br>    libopendbxplus.so.1 (libc6) =&gt; /usr/lib/libopendbxplus.so.1<br>

    libopendbx.so.1 (libc6) =&gt; /usr/lib/libopendbx.so.1<br><br></div>The problem is that we have as module: opendbx. Ubuntu looks for libMODULE_NAME.so. <br><br>In this case, was searching libopendbx.so. But, your (and my) file was named libopendbx.so.1.<br>

<br>Solution: copy and rename (or just rename) libopendbx.so.1 to libopendbx.so and should work like a charm.<br><br>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. <br>
<br>
Let me know if that work.<br>
<br>
Cheers,<br><font color="#888888">
<br>
Mariano</font><div><div></div><div class="h5"><br><br><br><br><div class="gmail_quote">On Tue, Apr 28, 2009 at 2:56 PM, Mariano Martinez Peck <span dir="ltr">&lt;<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><br><div class="gmail_quote"><div>2009/4/28 Hilaire Fernandes <span dir="ltr">&lt;<a href="mailto:hilaire@ofset.org" target="_blank">hilaire@ofset.org</a>&gt;</span><br>


</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br><div><div class="gmail_quote"><div>2009/4/28 Mariano Martinez Peck <span dir="ltr">&lt;<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>&gt;</span><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><div><div>I don&#39;t have it in my version of Pharo. I don&#39;t know if I can update it without going through a full pharo image which I don&#39;t want to do now.<div>




<div></div><div></div></div></div></div></blockquote><div>
<div><br><br>Ok. Doesn&#39;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. <br>





</div></div></div></blockquote><div><br>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.<br>Is the fixed closure mandatory to get SqueakDBX working?<br>




Which Pharo # image and VM should be used? <br><div></div></div></div></div></blockquote><div><br>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. <br>



<br> </div><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="gmail_quote"><div><div><br>I haven&#39;t my linux machine here, I will look tonight in my home, but:<br>



<br>&gt; 1) what do you have /usr/lib in PATH ?<br></div>No it points only to binary as it should. <br>
Does FFI looks at PATH for the libraries? If so it is a buggy behavior.<br>I am really currious to know how FFI find the libraries...<div></div></div></div></blockquote></div><div><br>I am not sure about this. Perhaps someone (Andreas) can help us. <br>



 </div><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="gmail_quote"><div><div><br><br>2) Just for testing, can you put the openDBX libraries in the same directory where the pharo <br>





image is.<br><br>3) The same as 2) but where the VM is.<br></div></div><div><br>I will try tomorrow morning.</div></div></blockquote></div><div><br>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:<br>



<br>Go t class OpenDBXUnix and change the methods<br><br>apiBind: handle database: databaseName name: userName password: password method: method<br><br>and<br><br>apiInitialize: handle backend: backend host: host port: port<br>



<br>In both, put module: &#39;libopendbx.so.1&#39; or module: &#39;libopendbx.so&#39; instead of module: &#39;opendbx&#39;<br><br>I hope you get it working. Ask all what you want.<br><br>Greetings,<br><br>Mariano<br> </div>



<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div class="gmail_quote"><div><br></div></div><br>Thanks!<div><div></div><div>
<br>
<br>Hilaire<br><br clear="all"><br>-- <br><a href="http://blog.ofset.org/hilaire" target="_blank">http://blog.ofset.org/hilaire</a><br>

</div></div><br></div><div>_______________________________________________<br>
Pharo-project mailing list<br>
<a href="mailto:Pharo-project@lists.gforge.inria.fr" target="_blank">Pharo-project@lists.gforge.inria.fr</a><br>
<a href="http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project" target="_blank">http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project</a><br></div></blockquote></div><br>
</blockquote></div><br>
</div></div></div><br>