ghci attempts to link entire package

Bayley, Alistair Alistair_Bayley at invescoperpetual.co.uk
Thu Jan 4 11:11:23 EST 2007


> From: Bayley, Alistair 
>
> The result is that a user of Takusen can't easily use the 
> library with ghci/runhaskell "out of the box", unless they 
> have the full set of DBMS client libraries installed.

I forgot to mention that there's another difference between ghci and gnu
ld: if the external library is called libxx.dll, rather than xx.dll
(which is the convention on Windows, it seems), then gnu ld is still
able to locate & link to it when you say -lxx, but ghci fails to find
it. You have to say -llibxx to ghci for it to work.

This also makes distributing the Takusen library as a single package
awkward, because
 1. the cabal installation detects the presence of the library and
configures the package with the -lxx option
 2. ghc --make passes -lxx to gnu ld, which is nice...
 3. ... but ghci tries to use -lxx also, and fails.

So PostgreSQL users can't use ghci with the installed package unless
they're willing to re-configure/build/install and change the -l option
to from -lpq to -llibpq, which breaks normal compilation with ghc,
because gnu ld can't find the library when you say -llibpq.

(This affects the PostgreSQL client library on Windows, which is called
libpq.dll.)

Alistair
*****************************************************************
Confidentiality Note: The information contained in this message,
and any attachments, may contain confidential and/or privileged
material. It is intended solely for the person(s) or entity to
which it is addressed. Any review, retransmission, dissemination,
or taking of any action in reliance upon this information by
persons or entities other than the intended recipient(s) is
prohibited. If you received this in error, please contact the
sender and delete the material from any computer.
*****************************************************************


More information about the Glasgow-haskell-users mailing list