Missing shared library for GHC-HDBC-Sqlite3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
hdbc-sqlite3 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Sqlite3 interface for Haskell (HDBC) is not working due to missing file (at least that's what GHCI says); steps to reproduce:
$ sudo aptitude install ghc6 libghc6-
$ ghci
Prelude> :module Database.HDBC Database.
Prelude> conn <- connectSqlite3 "test1.db"
[ ... lots of linking messages ... ]
Loading package HDBC-sqlite3-
Compiling the following file with GHC:
import Database.HDBC
import Database.
main :: IO ()
main = do conn <- connectSqlite3 "test1.db"
return ()
results in:
test.o: In function `s1pq_info':
(.text+0xc5): undefined reference to `HDBCzmsqlite3z
test.o: In function `s1pq_info':
(.text+0x1df): undefined reference to `__stginit_
test.o: In function `s1pq_info':
(.text+0x1e9): undefined reference to `__stginit_
test.o: In function `s1pq_srt':
(.data+0x10): undefined reference to `HDBCzmsqlite3z
collect2: ld returned 1 exit status
Ubuntu version: Kubuntu 9.10
Package versions: ghc6 6.10.4-1ubuntu2, libghc6-
Hi,
you'll need to specify the package:
compiling it with 2.1.0.2 test.hs -o test.bin
ghc6 -package HDBC-sqlite3-
works like a charm for me.
Cheers,
Stefan.