[Haskell-cafe] HDBC-ODBC build/install problem.
Edward Ing
edward.ing at gmail.com
Thu Jul 12 17:35:36 EDT 2007
Hi,
I am trying to make HaskellDB work with HDBC-ODBC.
I did builds of HDBC/HDBC-ODBC. But when I am building
HaskellDB-HDBC-ODBC, I get the following message.
--------------
"[1 of 1] Compiling Database.HaskellDB.HDBC.ODBC (
Database/HaskellDB/HDBC/ODBC.hs,
dist\build/Database/HaskellDB/HDBC/ODBC.o )
C:\Program Files\Haskell\HDBC-odbc-1.1.2.0\ghc-6.6.1/Database/HDBC/ODBC/Connection.hi
Declaration for connectODBC:
Failed to load interface for `Database.HDBC.ODBC.ConnectionImpl':
Use -v to see a list of the files searched for.
Cannot continue after interface file error"
--------------
>From this, I know the problem is the linkage between
Database.HDBC.ODBC.Connection and Database.HDBC.ODBC.ConnectionImple.
(Also I looked at the code to see the reference.)
I did a little further investigation. I looked at the package registry
area (C:\Program
Files\Haskell\HDBC-odbc-1.1.2.0\ghc-6.6.1\Database\HDBC\ODBC) and
notice that ConnectionImpl.hi is not there.
I went back to the build directory and did find ConnectoinImpl.hi and
ConnectionImpl.o.
It seems like runghc Setup.hs install, did not install ConnectionImpl.hi.
I looked into the file named ".installed-pkg-config" and I saw this:
------------
exposed-modules: Database.HDBC.ODBC
hidden-modules: Database.HDBC.ODBC.Connection
Database.HDBC.ODBC.Statement Database.HDBC.ODBC.Types
Database.HDBC.ODBC.Utils Database.HDBC.ODBC.TypeConv
import-dirs: "C:\\Program Files\\Haskell\\HDBC-odbc-1.1.2.0\\ghc-6.6.1"
library-dirs: "C:\\Program Files\\Haskell\\HDBC-odbc-1.1.2.0\\ghc-6.6.1"
hs-libraries: HSHDBC-odbc-1.1.2.0
extra-libraries: odbc32
--------------
No mention of ConnectionImple.hi. It looks like the setup up script
did not install ConnectionImpl.hi.
Did ConnectionImpl.o get bound into "libHSHDBC-odbc-1.1.2.0.a" even
though ConnectionImpl.hi did not get successfully installed?
Does anyone know why the install target does not install
ConnectionImpl.hi and how I can get around this problem?
(Where is the odbc32 to be found anyways?)
Here are a few things I did try which did NOT work:
1. Copy ConnectionImpl.hi over manually. HaskellDB-HDBC-ODBC builds,
but at runtime there is a link error.
2. Manually alter ".installed-pkg-config" to add ConnectionImpl.hi as
hidden module.
Please comment on why these would not work ( I will learn from this.)
Help would be appreciated.
Edward Ing
More information about the Haskell-Cafe
mailing list