Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-07-03 Thread Henning Thielemann
On Mon, 30 Jun 2008, Alistair Bayley wrote: I haven't found a way to detect where headers are installed, so I propose that the Setup.hs assumes $ORACLE_HOME/rdbms/public (for Unix), and you can add more with --extra-include-dirs=... . What do you think? Many thanks for including the necessary

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-30 Thread Henning Thielemann
On Mon, 30 Jun 2008, Alistair Bayley wrote: No, in ORACLE_HOME there is only 'bin' and 'lib'. I haven't found a way to detect where headers are installed, so I propose that the Setup.hs assumes $ORACLE_HOME/rdbms/public (for Unix), and you can add more with --extra-include-dirs=... . What do

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-30 Thread Alistair Bayley
>> 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/oracl

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-27 Thread Henning Thielemann
On Fri, 27 Jun 2008, Alistair Bayley wrote: 2008/6/26 Henning Thielemann <[EMAIL PROTECTED]>: 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 --

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-27 Thread Alistair Bayley
2008/6/26 Henning Thielemann <[EMAIL PROTECTED]>: > >> 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.

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-26 Thread John Goerzen
Henning Thielemann wrote: > On Wed, 25 Jun 2008, John Goerzen wrote: > > $ iodbctest NMR2 > iODBC Demonstration program > This program shows an interactive SQL processor > Driver Manager: 03.52.0607.1008 > 1: SQLDriverConnect = [iODBC][Driver > Manager]/usr/lib/oracle/10.2.0.4/client/lib/libsqora

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-26 Thread Henning Thielemann
On Wed, 25 Jun 2008, John Goerzen wrote: Henning Thielemann wrote: On Wed, 25 Jun 2008, John Goerzen wrote: I haven't read this entire thread, but I might also just interject here that HDBC supports ODBC (on Windows, and on Linux/Posix platforms via unixODBC, iODBC, or similar), which may be

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-26 Thread Henning Thielemann
On Thu, 26 Jun 2008, Alistair Bayley wrote: Yes, puzzling. I don't know why you need to say -lclntsh, because that's the point of all of this Setup shenanigans: to get things set up so that ghci works nicely. That's why we have flags that expose/hide modules in the API: ghci has a custom linke

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-26 Thread Alistair Bayley
> Now I can start GHCi with the example program you gave me. However I have to > start with -lclntsh, otherwise symbol OCIEnvCreate cannot by found. > I thought I do not need this option, because the installed Takusen package > contains the library name: > > $ grep clntsh dist/installed-pkg-config

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-26 Thread Henning Thielemann
On Thu, 26 Jun 2008, Alistair Bayley wrote: Try this version of configOracle in Setup.hs: configOracle verbose buildtools = do if not (sqlplusProgram `isElem` buildtools) then return Nothing else do path <- getEnv "ORACLE_HOME" info verbose ("Using Oracle: " ++ path) make

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-25 Thread John Goerzen
Henning Thielemann wrote: > On Wed, 25 Jun 2008, John Goerzen wrote: > >> I haven't read this entire thread, but I might also just interject here >> that HDBC supports ODBC (on Windows, and on Linux/Posix platforms via >> unixODBC, iODBC, or similar), which may be another avenue for you to >> try.

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-25 Thread Henning Thielemann
On Wed, 25 Jun 2008, John Goerzen wrote: I haven't read this entire thread, but I might also just interject here that HDBC supports ODBC (on Windows, and on Linux/Posix platforms via unixODBC, iODBC, or similar), which may be another avenue for you to try. I'm sure there are ODBC Oracle driver

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-25 Thread John Goerzen
Henning Thielemann wrote: > On Tue, 24 Jun 2008, Alistair Bayley wrote: > >> 2008/6/24 Henning Thielemann <[EMAIL PROTECTED]>: >>> (Btw. Takusen should be split into >>> several packages for all database backends because Cabal flags must not >>> influence the package interface.) >> I don't underst

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-25 Thread Alistair Bayley
> I'll have to change the way that Setup.hs tries to find $ORACLE_HOME. > Using getEnv would be a much better idea. I don't recall why I didn't > use it before; perhaps it's not always set on Windows installations. Try this version of configOracle in Setup.hs: configOracle verbose buildtools = do

RE: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-25 Thread Bayley, Alistair
> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Henning Thielemann > > I don't get an error. sqlplus is in $ORACLE_HOME/bin, but the > RPM package > also sets a link from /usr/bin/sqlplus to $ORACLE_HOME/bin, > thus 'sqlplus' > is in the $PATH also without $ORACLE_HOME.

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-25 Thread Henning Thielemann
On Tue, 24 Jun 2008, Alistair Bayley wrote: 2008/6/24 Henning Thielemann <[EMAIL PROTECTED]>: When you run configure, you should get output that says: Using Oracle: What is ? I don't get these questions. Sorry. I was really asking (not very clearly): what is the output from "runhaskell

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-25 Thread Alistair Bayley
>> $ ll $ORACLE_HOME/lib >> ... >> I assume that libociei.so is the library I need. > > Actually it's libclntsh.so. You need to change the oracle section in > Takusen.cabal to this: Another difference between Windows and Linux Oracle installations is that the client libs are in $ORACLE_HOME/lib

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-24 Thread Daniil Elovkov
Henning Thielemann wrote: On Sat, 21 Jun 2008, Lanny Ripple wrote: I had luck with this the other day using Database.HDBC.ODBC. For Ubuntu's Hardy I found that Oracle's 10.2.0.3 worked best. (10.2.0.4 and 11 seemed to have problems for me at least.) http://www.oracle.com/technology/software/

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-24 Thread Alistair Bayley
>> 2008/6/24 Henning Thielemann <[EMAIL PROTECTED]>: >>> >> When you run configure, you should get output that says: >> Using Oracle: >> >> What is ? > > I don't get these questions. Sorry. I was really asking (not very clearly): what is the output from "runhaskell Setup.hs configure -foracle" ?

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-24 Thread Henning Thielemann
On Sat, 21 Jun 2008, Lanny Ripple wrote: I had luck with this the other day using Database.HDBC.ODBC. For Ubuntu's Hardy I found that Oracle's 10.2.0.3 worked best. (10.2.0.4 and 11 seemed to have problems for me at least.) http://www.oracle.com/technology/software/tech/oci/instantclient/htdo

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-24 Thread Henning Thielemann
On Tue, 24 Jun 2008, Alistair Bayley wrote: 2008/6/24 Henning Thielemann <[EMAIL PROTECTED]>: (Btw. Takusen should be split into several packages for all database backends because Cabal flags must not influence the package interface.) I don't understand this (cabal flags must not influence

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-24 Thread Alistair Bayley
2008/6/24 Henning Thielemann <[EMAIL PROTECTED]>: > > (I remain on the list in order to fill the archive with information, others > may need, too.) As you wish. > (Btw. Takusen should be split into > several packages for all database backends because Cabal flags must not > influence the package

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-24 Thread Henning Thielemann
On Fri, 20 Jun 2008, Alistair Bayley wrote: Another problem is that the Oracle installation process assumes that, for all platforms, the library is called oci i.e. the linker option -loci is used. For Unix clients, the OCI library seems to be libclnstsh.so, so I guess it should pass -lclnstsh.

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-21 Thread Lanny Ripple
Lanny Ripple wrote: > I had luck with this the other day using Database.HDBC.ODBC. For > Ubuntu's Hardy I found that Oracle's 10.2.0.3 worked best. > (10.2.0.4 and 11 seemed to have problems for me at least.) > > http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.ht

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-21 Thread Steve Lihn
Oracle OCI interface is quite different between 7/8 and 9/10. And 10 is different from 9 in some respect. I don't know much about 11. Oracle 10.2.0.3 is a stable release, but there are some major server bugs in it, that Oracle had to release 10.2.0.4. I'd recommend Haskell community to focus on 10.

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-21 Thread Paul Moore
2008/6/20 Alistair Bayley <[EMAIL PROTECTED]>: > Having just taken a closer took at what Oracle Instant Client is, I > suspect that you might have some trouble getting Takusen to compile > against it. The Instant Client lacks header files, while Takusen's FFI > imports specify oci.h. I don't know w

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-20 Thread Lanny Ripple
I had luck with this the other day using Database.HDBC.ODBC. For Ubuntu's Hardy I found that Oracle's 10.2.0.3 worked best. (10.2.0.4 and 11 seemed to have problems for me at least.) http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html Grab the basic (not basic-

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-20 Thread Steve Lihn
You may want to check this out. http://www.orafaq.com/wiki/ODBC_FAQ#Where_can_one_get_ODBC_drivers_for_Oracle_and_Rdb.3F As Oracle is a commercial company who is not interested in open source historically, it is little chance that you will get robust software for free -- from someone with many ye

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-20 Thread Alistair Bayley
2008/6/20 Alistair Bayley <[EMAIL PROTECTED]>: >> Is there a way of accessing a remote Oracle database by one of the common >> Haskell database interfaces (HaskellDB, Takusen, etc.) ? I tried to get >> unixODBC and Oracle's Instant Client running on a Linux machine, but I'm >> trapped in the notori

Re: [Haskell-cafe] Access to Oracle database from Haskell

2008-06-19 Thread Alistair Bayley
> Is there a way of accessing a remote Oracle database by one of the common > Haskell database interfaces (HaskellDB, Takusen, etc.) ? I tried to get > unixODBC and Oracle's Instant Client running on a Linux machine, but I'm > trapped in the notorious error: Takusen's Oracle backend uses the Oracl