I am having difficulties getting set up and running with DBXTalk tools on a
Mac. I hate to pester the community with some basics, but I am getting way
too many hours in simply trying to connect to a Postgres DB. Any help or
guidance that anyone can offer is greatly appreciated.

Keep up the good work on Pharo! It is a great platform!  [I have not
checked in lately to see where things are with regard to us commercial
operators contributing to the community, but I am overdue!]

Thanks for the feedback in advance!
-Cam


*#1:* From http://dbxtalk.smallworks.com.ar/Download/
I see a paragraph near that top that reads:

*If in the previous step you have installed OpenDBX by using its binaries
(no compilation), then you must install the databse client library (C
library) of your database.*

By "client library", is the author referring to the libraries like
libpgsqlbackend.* which is part of the opendbx binaries? Or do I need to
install some posgres client from http://www.postgresql.org/? (My DB server
is remote, and this computer knows nothing about it.)

I built the libs locally and successfully installed them -- after finding
specs that the utils cannot be compiled for Mac. Permissions for all are
read & execute, except for the ".a" libs which have only read permission.

*#2: does Pharo know where to look for these libraries on a mac?* Or do I
need to define environmental variables to point to them? After fishing
around, I read about a file called environment.plist (xml key/value), where
I defined the following environmental variables based on a link from
dbxtalk pages to a 2008 blog, so now my environment.plist file is stored in
~/.MacOSX and contains the following:

*<plist version="1.0">
**<dict>
**    <key>LD_LIBRARY_PATH</key>
**    <string>/usr/local/lib:usr/lib</string>*

*    <key>DYLD_LIBRARY_PATH**</key>
**    <string>/usr/local/lib:usr/lib</string>
**</dict></plist>*

*More questions:* A) do I need to include the /usr/local/lib/opendbx
directory too, or do the dbx tools know to append that directory to the
other path elements? and B) after logging back into my computer (actually I
did a reboot -- it had been a while), I opened up a terminal, and executed
printenv, but the aforementioned variables are not to be seen, is there a
Mac expert in the crowd who knows why, or what the right way to do this is?

*#3:* *Does anybody offer up a fairly clean image that includes the
standard seaside suite, and dbxtalk tools all pre-loaded?*

I am just curious for the future, as I am currently stuck at testing the
OpenDBXDriver connectivity. Which implies that I have more things to
install and test.

*#4 -- FFI question:* In seaside in the OpenDBXDriverTests the tests all
fail. (Previously I had altered DBXPostgreFacility>>createConnection to
match the db login specs.) When I debug the first failed test, it says
"createConnection:" failed "Error: External module not found", which is
what led to question(s) #2 up above.

An additional question in my mind, is when I am debugging FFI connections,
how can I find exactly what library it is trying to load during the
failure? And what paths it tried?

In this case, looking at the following, near the top of the stack in the
debugger:
OpenDBXMacOSX>>apiInitialize: handle backend: backend host: host port: port
"long odbx_init(odbx_t**, char*, char*, char*)"
 <cdecl: long 'odbx_init' (ulong* char* char* char*) module: 'opendbx'>
^self externalCallFailed

I see the reference to the module 'opendbx', so I presume that is the
library being sought. *So is the general solution to finding "what" is
being sought, to search for the pattern 'module:'?*
*
*
That still leaves the question of "*where*" it looked. Answers to #2 up
above will likely address the rules, but the question stands: *is it
possible in the debugger to see where it looked for the module? or is that
simply too difficult.*

Note: FFI unit tests all pass except for one using Form -- "#makeStar
method not found."

Cheers,
Cam

Reply via email to