[Haskell-cafe] Re: Problems installing HDBC-postgresql
haskell-cafe at martinpercossi.com
Wed Jul 12 06:04:25 EDT 2006
Hi, sorry for the delay in replying.
You were right -- it was not finding the correct version of the library.
In fact, all I had to do was change the order in my LD_LIBRARY_PATH --
but thanks for the suggestion on strace -- I will certainly be using
this tool for future problems.
John Goerzen wrote:
> On 2006-07-10, Martin Percossi <haskell-cafe at martinpercossi.com> wrote:
>>Hi, I'm having problems using HDBC-postgresql (I've tried both 0.99.2.1
>>and 18.104.22.168) with postgresql (version 8.1.4, installed in /share/pgsql).
>>I adjust the include-dir and extra-lib-dirs to use the custom location
>>of postgresql, and build: no error messages, everything seems fine.
> Probably, though, there is something that is not quite fine...
>>However, when I then try to type:
>>ghci -package HDBC -package HDBC-postgresql
>>, I get the error message:
>>Loading package HDBC-postgresql-0.99.2.1 ... linking ... ghc-6.4.2:
>>unknown symbol `PQserverVersion'
>>ghc-6.4.2: unable to load package `HDBC-postgresql-0.99.2.1'
> This sounds like it's not finding your PostgreSQL libraries.
> First, can you confirm that PQserverVersion still occurs in your
> Next, try strace on your ghci session.
> Grep for libpq in the output. It may be instructive.
> In my case, I saw:
> 0xb763a1e0) = -1 ENOENT (No such file or directory)
> 0xb763a570) = -1 ENOENT (No such file or directory)
> open("/usr/lib/libpq.so", O_RDONLY) = 3
> So we know that the system did successfully open that library.
>>Has anyone seen this error message before? Google didn't turn up
>>anything relevant to haskell -- however there does seem to be a
>>PQserverVersion procedure in the libpq library -- maybe HDBC-postgresql
>>is not seeing this due to the custom install location?
> This would all be up to your modifications to cabal.
> Try: ghc-pkg describe HDBC-postgresql
> You should see:
> * pq in the extra-libraries line
> * Your header file location in the include-dirs line
> * Your extra-lib-dirs path
> If you don't see those things, then something went wrong with the build
> or install.
> I would also suggesting building a program with GHC (not GHCI) that uses
> HDBC-postgresql for testing.
> -- John
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe