-
Notifications
You must be signed in to change notification settings - Fork 18
Description
I'm trying to install postgresql-libpq on Mac OS X 10.6.8. I get:
00:06 ijmorlan@27imac.local$ cabal install postgresql-libpq
Resolving dependencies...
[1 of 1] Compiling Main ( /var/folders/Lh/LhVs9ls4Hme1jR+t1DJbm++++TQ/-Tmp-/postgresql-libpq-0.8.2.2-42202/postgresql-libpq-0.8.2.2/Setup.hs, /var/folders/Lh/LhVs9ls4Hme1jR+t1DJbm++++TQ/-Tmp-/postgresql-libpq-0.8.2.2-42202/postgresql-libpq-0.8.2.2/dist/setup/Main.o )
Linking /var/folders/Lh/LhVs9ls4Hme1jR+t1DJbm++++TQ/-Tmp-/postgresql-libpq-0.8.2.2-42202/postgresql-libpq-0.8.2.2/dist/setup/setup ...
Configuring postgresql-libpq-0.8.2.2...
Building postgresql-libpq-0.8.2.2...
Preprocessing library postgresql-libpq-0.8.2.2...
dyld: Library not loaded: libpq.5.dylib
Referenced from: /private/var/folders/Lh/LhVs9ls4Hme1jR+t1DJbm++++TQ/-Tmp-/postgresql-libpq-0.8.2.2-42202/postgresql-libpq-0.8.2.2/dist/build/Database/PostgreSQL/LibPQ_hsc_make
Reason: image not found
running dist/build/Database/PostgreSQL/LibPQ_hsc_make failed (exit code 5)
command was: dist/build/Database/PostgreSQL/LibPQ_hsc_make >dist/build/Database/PostgreSQL/LibPQ.hs
cabal: Error: some packages failed to install:
postgresql-libpq-0.8.2.2 failed during the building phase. The exception was:
ExitFailure 1
00:06 ijmorlan@27imac.local$
Now, my libpq is not in /usr/lib, so maybe that's an issue. But:
00:06 ijmorlan@27imac.local$ pg_config --libdir
/Library/PostgreSQL/9.2/lib
00:08 ijmorlan@27imac.local$
So I figure that the postgresql-libpq configure stuff should be able to find it.
But maybe not, so:
00:08 ijmorlan@27imac.local$ cabal install --extra-lib-dirs=/Library/PostgreSQL/9.2/lib postgresql-libpq
Resolving dependencies...
[... same result ...]
I tried symlinking /Library/PostgreSQL/9.2/lib/libpq.5.dylib into /usr/lib, but then it complained about the version of libiconv. Sure enough, the version in /usr/lib is the slightly older version it can't use, while the one in /Library/PostgreSQL/9.2/lib is the needed version. I don't really want to go randomly upgrading stuff in /usr/lib.
Incidentally, my PostgreSQL installation was made by using the one click installer available from http://www.postgresql.org/download/macosx/.
This is one of those confusing cases where I can't seem to find anybody else asking the same question, but I don't see that I'm doing anything special that would give me a different experience from most other people. Any hints would be much appreciated.