[Haskell-cafe] Use MySQL from Haskell

Daniel van den Eijkel dvde at gmx.net
Fri Jun 19 07:50:16 EDT 2009


The same with me - I'm on XP, and HDBC-odbc is the library I got running 
to access the MySQL database.
Regards,
Daniel


Michael Snoyman schrieb:
> Marciej,
>
> I went the HDBC route and got the same problem. Although it does not 
> seem to be officially blessed, try installing the time-1.1.3 package. 
> It's working for me at least, which I know is a dubious recommendation.
>
> Also, I am currently using the hdbc-odbc package for accessing MySQL. 
> I couldn't get hdbc-mysql to work properly. I hope that once I get 
> this project working right, I'll have a chance to dig into the 
> hdbc-mysql issue itself.
>
> Good luck!
>
> Michael
>
> On Fri, Jun 19, 2009 at 12:26 AM, Maciej Podgurski 
> <maciej.podgurski at googlemail.com 
> <mailto:maciej.podgurski at googlemail.com>> wrote:
>
>     Hello,
>
>     I'm trying to use MySQL from Haskell but it seems impossible for
>     me to install one of the MySQL packages on my Windows XP machine.
>
>     First I tired to install hsql-mysql-1.7.1 on GHC 6.10.3 but
>     installing haskelldb-hsql failed with a hidden package error. So I
>     added the old-time package to the cabal file but there still was a
>     compile error (something due to the change from Exception to
>     Exception e => e).
>
>     So I switched to GHC 6.8.3 and tried it again. Now it says:
>
>     Configuring hsql-mysql-1.7.1...
>     Warning: 'extra-lib-dirs: /usr/lib/mysql' directory does not exist.
>     Warning: 'include-dirs: /usr/include/mysql' directory does not exist.
>     Warning: This package indirectly depends on multiple versions of
>     the same
>     package. This is highly likely to cause a compile failure.
>     package process-1.0.0.1 requires filepath-1.1.0.0
>     package directory-1.0.0.1 requires filepath-1.1.0.0
>     package Cabal-1.6.0.3 requires filepath-1.1.0.2
>     Setup: Missing dependency on a foreign library:
>     * Missing C library: mysqlclient
>     This problem can usually be solved by installing the system
>     package that
>     provides this library (you may need the "-dev" version). If the
>     library is
>     already installed but in a non-standard location then you can use
>     the flags
>     --extra-include-dirs= and --extra-lib-dirs= to specify where it is.
>
>     There's no Haskell package mysqlclient and I don't know how to
>     install a C library in Haskell. So I switched to HDBC-2.1.1 and
>     got the next compile error:
>
>     Building convertible-1.0.5...
>
>     Data/Convertible/Instances/Num.hs:671:0:
>        warning: no newline at end of file
>     [...]
>     [5 of 8] Compiling Data.Convertible.Instances.C (
>     Data/Convertible/Instances/C.hs, dist\build/Data/C
>     onvertible/Instances/C.o )
>     [6 of 8] Compiling Data.Convertible.Instances.Time (
>     Data/Convertible/Instances/Time.hs, dist\build/
>     Data/Convertible/Instances/Time.o )
>
>     Data/Convertible/Instances/Time.hs:64:0:
>       Duplicate instance declarations:
>         instance Typeable NominalDiffTime
>           -- Defined at Data/Convertible/Instances/Time.hs:(64,0)-(65,42)
>         instance Typeable NominalDiffTime
>           -- Defined in time-1.1.3:Data.Time.Clock.UTC
>
>     Data/Convertible/Instances/Time.hs:67:0:
>       Duplicate instance declarations:
>         instance Typeable UTCTime
>           -- Defined at Data/Convertible/Instances/Time.hs:(67,0)-(68,34)
>         instance Typeable UTCTime
>           -- Defined in time-1.1.3:Data.Time.Clock.UTC
>
>     So please help me, what GHC/package configuration will I need to
>     use MySQL from my Haskell programs on Windows? I really like
>     Haskell but all those "broken" packages are really discouraging. :(
>
>
>     Best wishes,
>     Maciej
>     _______________________________________________
>     Haskell-Cafe mailing list
>     Haskell-Cafe at haskell.org <mailto:Haskell-Cafe at haskell.org>
>     http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>   


More information about the Haskell-Cafe mailing list