[Haskell-cafe] Type problem with simple takusen code (was: Trivialdatabase access in Haskell)

Bayley, Alistair Alistair_Bayley at invescoperpetual.co.uk
Wed Dec 13 09:31:53 EST 2006


> Having said that, I now get
> 
> >ghc --make db.hs -o db
> [1 of 1] Compiling Main             ( db.hs, db.o )
> Linking db.exe ...
> D:\Apps\GHC\gcc-lib\ld.exe: cannot find -lsqlite3
> collect2: ld returned 1 exit status
> 
> This may be because I have a sqlite3.dll in my PATH, but no
> development libs.

You need to have sqlite3.exe in the same folder as sqlite3.dll.
sqlite3.exe is what the installer looks for - if it finds it, then it
assumes sqlite3.dll is in the same place. When you built takusen, was
this in your path? Check the output from "runhaskell Setup.hs
configure": this tells you if it finds Sqlite, and if so where it is.
This information is then baked into takusen.buildinfo, and that's what's
used by ghc for linking when you build your program.

You don't need it if you want to use Oracle: just remove it from your
path and configure/build/install Takusen.


> However, now when I run ghc --make, I get a string of link errors from
> Oracle stuff (OCIconstants.o). This is serious progress - I'm linking
> the right stuff this time. I've seen similar issues before, where I
> tried to use gcc to link to the Oracle-supplied OCI libraries (or at
> least I think that was it), as Oracle supply MSVC compatible libraries
> instead. Could this be relevant here? I know ghc uses the gcc linker,
> so it seems like a possibility.

Not a problem I've experienced, but then my Oracle client install
includes the headers etc. I don't think these are necessary unless you
compile -fvia-C, which I don't think is happening (ghc -O results in
-fvia-C, though). I use ghc for compilation and linking, and I have no
trouble.

Can you send me the compiler/linker output? Perhaps best if we take this
off-list. Also, what version of Oracle is it? I've developed against 8i,
and haven't had a chance to test against later versions.

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 Haskell-Cafe mailing list