[Haskell-cafe] Success with Takusen (was: Type problem with simple
takusen code)
Paul Moore
p.f.moore at gmail.com
Fri Dec 15 09:50:28 EST 2006
On 12/12/06, Paul Moore <p.f.moore at gmail.com> wrote:
> Should be, but isn't, unfortunately. The Setup.hs file includes some
> code defining configPG etc, but there's nothing I can see for the user
> control how it works. Maybe something in the cabal infrastructure
> handles this, but I've not had time yet to dive into the cabal
> documentation on the hope of finding something.
Just a brief note to let people on the list know that, with a lot of
extremely patient help from Alistair Bayley, I have managed to resolve
the issues I was having.
The fundamental issue I was hitting was that I was treating GHC as an
interpreted system, rather than a compiler/linker. I was therefore not
thinking about the errors I was seeing as I would if I hit (say) a C
link error.
To summarise, the following works fine:
To install Takusen, make sure that an Oracle home is in your PATH. You
don't need PostgreSQL or sqlite. Your Oracle install can be simply a
client build - all you need is oci.dll, not the full OCI development
package.
runhaskell Setup.hs configure
runhaskell Setup.hs build
runhaskell Setup.hs install
That's it, and it works fine.
To build a program, you need to do
ghc --make db.hs -o db D:\Oracle\Ora92\bin\oci.dll
(put the path to your oci.dll here).
This compiles your program, and links it with oci.dll to get the
Oracle externals resolved.
Runhaskell doesn't seem to work, as it tries to link all the DB
backends at runtime, regardless of whether you use them.
That really is all there is to it. Arguably, the error messages you
get when you mess up bits of this aren't too helpful, but if you've
ever seen a C++ compilation fail with compile or link errors, you'll
know not to expect much here (or at least you should!) GHC is
certainly no worse than that.
Once again, thanks to Alistair for his patience.
Now I'll go off and reproduce my success on a clean environment just
to be sure, and then write up what I've learnt for the Wiki and the
Takusen readme.
Paul.
More information about the Haskell-Cafe
mailing list