Installing PostgreSQL for GLORP

Daniel Lyons described a way to install PostgreSQL

In case someone else is trying to get this to work, here’s a recipe I found that worked for me.

Scenario: you have PostgreSQL on your Mac via MacPorts and would like to install GlorpDBX with your Pharo 2.0.

1. Make sure you have a universal build of PostgreSQL. Pharo 2.0 is 32-bit, and MacPorts is probably going to fetch you a 64-bit build of Postgres. So do this:

$ sudo port install postgresql93 +universal

2. Download opendbx 1.4.6 and use the following options to ./configure:

$ ./configure CFLAGS=”-I/opt/local/include -I/opt/local/include/postgresql93 -arch i386 -arch x86_64″ CXXFLAGS=”-I/opt/local/include -I/opt/local/include/postgresql93 -arch i386 -arch x86_64″ LDFLAGS=”-L/opt/local/lib -L/opt/local/lib/postgresql93 -arch i386 -arch x86_64″ –disable-dependency-tracking –disable-utils –with-backends=pgsql

Most of that is wiring up opendbx to the MacPorts-specific install areas for Postgres. The -arch flags cause it to build a universal library. –disable-dependency-tracking was mentioned on Stack Overflow here:

–disable-utils stops the build from trying to make a command line utility that seems not to build with the readline on Mavericks.

3. Install it:

$ sudo make install

From here, creating a username/database sodbxtest showed the unit tests passing.


Daniel Lyons

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: