[Pharo-project] SqueakDBX and MacOS X

Mariano Martinez Peck marianopeck at gmail.com
Mon May 23 15:05:36 EDT 2011


On Mon, May 23, 2011 at 8:00 AM, Olivier Auverlot <
olivier.auverlot at gmail.com> wrote:

>  Le 22/05/11 15:58, Mariano Martinez Peck a écrit :
>
> Thanks Olivier. I have updated the website :)
>
> http://www.squeakdbx.org/MySQL%20and%20PostgreSQL%20for%20mac
>
>  it's cool ;-)
>
>
> Now...do you remember the links where you download the 32bits Mac OS client
> for PostgreSQL ?
>
>   I haven't found a distribution of the library for PostgreSQL. I
> downloaded and installed the PostgreSQL server on my computer and extracted
> the files of the client interface.
>
>
Seriously ???  what a shame....there should be something somewhere....I am
new with Mac and it takes me time to test every backend :(
I have a virtual box image with Ubuntu and ALL databases intalled with
OpenDBX working in all of them. And the same for windows XP.
But with Mac OS I only tried with MySQL and it has in fact quite
complicated.


> And for MySQL did you use http://dev.mysql.com/downloads/mysql/5.1.html
> "Mac OS X 10.5 (x86)"  also ?   if not, which one ?
>
> yes
>
> I have created an archive with the libraries for MysqL 5.1 and PostgreSQL.
> You can download it at
> http://www.auverlot.fr/squeakdbx/squeackDBXlibclients.zip
>
>
Thanks. Good idea. But "The system cannot find the file specified. "


>
> Best regards
> Olivier ;-)
> www.auverlot.fr
>
>
> Thanks in advance,
>
> Mariano
>
>
> On Wed, May 18, 2011 at 11:42 AM, Olivier Auverlot <
> olivier.auverlot at gmail.com> wrote:
>
>>  In my previous note, I have forget to say that it's necessary to modify
>> the key SqueakPluginsBuiltInOrLocalOnly in the Info.plist file. The value of
>> this parameter must be "false".
>>
>> There are also  a little error. The temporary directory is "opendbx" and
>> not "openDBX".
>>
>>
>> Best regards
>> Olivier ;-)
>> www.auverlot.fr
>>
>> Thanks a lot Olivier.
>> I know it is a pain. I suffered with my mac also.
>> So....I will update:
>> http://www.squeakdbx.org/Different%20backends%20under%20Mac
>> with your data.
>>
>> Thanks
>>
>> On Wed, May 18, 2011 at 10:10 AM, Olivier Auverlot <
>> olivier.auverlot at gmail.com> wrote:
>>
>>>  After many hours to try to install OpenDBX and SqueakDBX on my Mac Intel
>>> with a 64 bit processor, I'm very happy to propose you a little step by step
>>> tutorial.
>>>
>>> 1. Download the client libraries for MySQL and PostgreSQL. Warning ! you
>>> must get the 32 bits version. Create a temporary directory named "openDBX"
>>> where you want. For me, I have put the directory at the root of my system
>>> path.My directory contains :
>>>
>>>     > mysql
>>>         > 5.0
>>>             > include
>>>             > lib
>>>     > PostgreSQL
>>>         > 9.0
>>>             > include
>>>             > lib
>>>
>>> 2. Download openDBX and compile it in 32 bits mode (because the Smalltalk
>>> virtual machine is a 32 bits application). I have write a little shell
>>> script to produce the configuration of the compiler.Of course, you must set
>>> the directories for the include files and the librairies path.
>>>
>>> CFLAGS="-m32" \
>>> CXXFLAGS="-m32" \
>>> CPPFLAGS="-m32 -I/opendbx/PostgreSQL/9.0/include
>>> -I/opendbx/mysql/5.0/include" \
>>> LDFLAGS="-m32 -L/opendbx/PostgreSQL/9.0/lib -L/opendbx/mysql/5.0/lib" \
>>> ./configure --disable-utils --with-backends="mysql pgsql sqlite3"
>>>
>>> Run it and do :
>>>     make
>>>     make install
>>>
>>> All the files are copied in the /usr/local/lib directory and the
>>> /usr/local/lib/opendbx subdirectory.
>>>
>>> 3. Copy the MySQL and PostgreSQL clients librairies into /usr/local/bin
>>> (the include files are unused).
>>>
>>> 4. Now, you must launch Pharo to install SqueakDBX.
>>>
>>>
>>> Gofer new squeaksource: 'MetacelloRepository';
>>> package: 'ConfigurationOfSqueakDBX';
>>> load.
>>>
>>> ConfigurationOfSqueakDBX project latestVersion load.
>>>
>>> Gofer new squeaksource: 'MetacelloRepository';
>>> package: 'ConfigurationOfGlorpDBX';
>>> load.
>>>
>>> ConfigurationOfGlorpDBX project latestVersion load.
>>>
>>>  5. You could remove the temporary "openDBX" directory (step 1).
>>>
>>> 6. The installation is completed.
>>>
>>> Olivier ;-)
>>> www.auverlot.fr
>>>
>>> Hi Olivier,
>>>
>>>  IIRC, you should:
>>>  1) fix the location problem by putting symlink in the right place.
>>>  2) ensure that your dylib is compiled for the right architecture (32bit)
>>> considering that current VMs are 32bits
>>>  Perhaps this is your problem?
>>>  what gives:
>>>
>>>  $ lipo -info libopendbx.dylib
>>>
>>> #Luc
>>>
>>>
>>>
>>> 2011/5/17 Olivier Auverlot <olivier.auverlot at gmail.com>
>>>
>>>>  Hi,
>>>>
>>>> I try to use SqueakDBX on Mac OS X 10.6. I have downloaded and compiled
>>>> the libraries for PostgreSQL, MySQL and finaly compiled and installed
>>>> openDBX.
>>>>
>>>> CPPFLAGS="-I/opendbx/PostgreSQL/9.0/include
>>>> -I/opendbx/mysql/5.0/include"
>>>> LDFLAGS="-L/opendbx/PostgreSQL/9.0/lib -L/opendbx/mysql/5.0/lib"
>>>> ./configure --disable-utils --with-backends="pgsql mysql sqlite3"
>>>>
>>>> Now, I have in /usr/local/lib:
>>>>
>>>> -rwxr-xr-x  1 root  wheel   17040 17 mai 09:10 libopendbx.1.dylib
>>>> -rw-r--r--  1 root  wheel   32584 17 mai 09:10 libopendbx.a
>>>> lrwxr-xr-x  1 root  wheel      18 17 mai 09:10 libopendbx.dylib ->
>>>> libopendbx.1.dylib
>>>> -rwxr-xr-x  1 root  wheel    1001 17 mai 09:10 libopendbx.la
>>>> -rwxr-xr-x  1 root  wheel   74624 17 mai 09:10 libopendbxplus.1.dylib
>>>> -rw-r--r--  1 root  wheel  385056 17 mai 09:10 libopendbxplus.a
>>>> lrwxr-xr-x  1 root  wheel      22 17 mai 09:10 libopendbxplus.dylib ->
>>>> libopendbxplus.1.dylib
>>>> -rwxr-xr-x  1 root  wheel    1054 17 mai 09:10 libopendbxplus.la
>>>>
>>>> and in /usr/local/opendbx :
>>>> -rwxr-xr-x  1 root  wheel  17232 17 mai 09:10 libmysqlbackend.1.so
>>>> -rw-r--r--  1 root  wheel  38960 17 mai 09:10 libmysqlbackend.a
>>>> -rwxr-xr-x  1 root  wheel   1051 17 mai 09:10 libmysqlbackend.la
>>>> lrwxr-xr-x  1 root  wheel     20 17 mai 09:10 libmysqlbackend.so ->
>>>> libmysqlbackend.1.so
>>>> -rwxr-xr-x  1 root  wheel  16904 17 mai 09:10 libpgsqlbackend.1.so
>>>> -rw-r--r--  1 root  wheel  28624 17 mai 09:10 libpgsqlbackend.a
>>>> -rwxr-xr-x  1 root  wheel   1036 17 mai 09:10 libpgsqlbackend.la
>>>> lrwxr-xr-x  1 root  wheel     20 17 mai 09:10 libpgsqlbackend.so ->
>>>> libpgsqlbackend.1.so
>>>> -rwxr-xr-x  1 root  wheel  16856 17 mai 09:10 libsqlite3backend.1.so
>>>> -rw-r--r--  1 root  wheel  25936 17 mai 09:10 libsqlite3backend.a
>>>> -rwxr-xr-x  1 root  wheel   1053 17 mai 09:10 libsqlite3backend.la
>>>> lrwxr-xr-x  1 root  wheel     22 17 mai 09:10 libsqlite3backend.so ->
>>>> libsqlite3backend.1.so
>>>>
>>>> ok...
>>>>
>>>> I have downloaded the OneClick distribution of Pharo 1.2.1 and installed
>>>> SqueakDBX and GlorpDBX.
>>>>
>>>> Gofer new squeaksource: 'MetacelloRepository';
>>>> package: 'ConfigurationOfSqueakDBX';
>>>> load.
>>>>
>>>> ConfigurationOfSqueakDBX project latestVersion load.
>>>>
>>>> Gofer new squeaksource: 'MetacelloRepository';
>>>> package: 'ConfigurationOfGlorpDBX';
>>>> load.
>>>>
>>>> ConfigurationOfGlorpDBX project latestVersion load.
>>>>
>>>> Now, I try to do a SQL request to MySQL:
>>>>
>>>> connect
>>>>      | conn connectionSettings result |
>>>>
>>>>     connectionSettings := DBXConnectionSettings
>>>>         host: 'mysql.domaine.fr'
>>>>         port: '3306'
>>>>         database: 'test'
>>>>         userName: 'username'
>>>>         userPassword: 'hello'.
>>>>
>>>>     conn := DBXConnection
>>>>         platform: DBXMySQLPlatform new
>>>>         settings: connectionSettings.
>>>>
>>>>     conn connect.
>>>>
>>>>     conn open.
>>>>     result := conn execute: 'SELECT * from data'.
>>>>
>>>>     DBXTranscript show: result.
>>>>
>>>>     conn close.
>>>>
>>>> But I get an error :  'Unable to find function address'
>>>>
>>>> SqueakDBX didn't found the libraries ? I have try to copy the librairies
>>>> in /usr/lib and /usr/lib/opendbx but with no results. In the Resources
>>>> subdirectory, I have created a symbolic link to
>>>> /usr/local/lib/libopendbx.dylib but without progress.
>>>>
>>>> ln -s /usr/local/lib/libopendbx.dylib opendbx
>>>>
>>>>  I get the same error :-(
>>>>
>>>> If i modify the info.plist file to set the SqueakDebug key at 1 and the
>>>> SqueakPluginsBuiltInOrLocalOnly key at false, I can see the search of
>>>> librairies by the SqueakVM. The SqueakVM doesn't seem to try to load the
>>>> openddbx libraries.
>>>>
>>>> You can download the log file at
>>>> http://www.auverlot.fr/squeakdbx/squeakdbx.txt
>>>>
>>>> My previous tests under Linux have worked fine but i didn't find a
>>>> solution with Mac OS X. Someone has an idea for help me ???
>>>>
>>>> Thanks for your help.
>>>>
>>>> Best regards
>>>> Olivier
>>>> www.auverlot.fr
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>> --
>> Mariano
>> http://marianopeck.wordpress.com
>>
>>
>>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20110523/d82e0f80/attachment.html>


More information about the Pharo-dev mailing list