[Haskell-cafe] Access to Oracle database from Haskell

Alistair Bayley alistair at abayley.org
Fri Jun 27 09:58:24 EDT 2008

2008/6/26 Henning Thielemann <lemming at henning-thielemann.de>:
>> Do you need to say -lclntsh when you use ghc to compile?
> Ah, I see, I must run both GHCi and GHC with -package Takusen and everything
> is fine.

This still doesn't seem right. Both ghci and ghc --make should
automatically link the package. The only time you should need to use
-package is in ghc "batch" mode i.e. ghc sans --make.

> configOracle verbose buildtools = do
>  if not (sqlplusProgram `isElem` buildtools)
>   then return Nothing
>   else do
>     path <- getEnv "ORACLE_HOME"
>     info verbose ("Using Oracle: " ++ path)
>     let (libDir, includeDir) =
>             if isWindows
>               then ("bin", "oci/include")
>               else ("lib", "/usr/include/oracle/")
>     makeConfig path libDir includeDir
> This is obviously a hack. We should get the Oracle include path from the
> user, maybe via another environment variable or a custom Cabal option.

Yes... I've had a quick look at the instant client packages. The SDK
zip just puts the headers under instantclient_10_2/sdk/include (which
is still not $ORACLE_HOME/rdbms/public, but c'est la vie). So it looks
like the .rpm puts them somewhere completely different:
/usr/include/oracle/ Do you also have
$ORACLE_HOME/sdk/include, with headers in?


More information about the Haskell-Cafe mailing list