[Haskell-cafe] HDBC-ODBC build/install problem.
bringert at cs.chalmers.se
Fri Jul 13 06:50:18 EDT 2007
On Jul 12, 2007, at 23:35 , Edward Ing wrote:
> 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 (
> dist\build/Database/HaskellDB/HDBC/ODBC.o )
> C:\Program Files\Haskell\HDBC-odbc-220.127.116.11\ghc-6.6.1/Database/HDBC/
> 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-18.104.22.168\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
> It seems like runghc Setup.hs install, did not install
> 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-22.214.171.124\
> library-dirs: "C:\\Program Files\\Haskell\\HDBC-odbc-126.96.36.199\
> hs-libraries: HSHDBC-odbc-188.8.131.52
> 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-184.108.40.206.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.
the right approach would be to add it to other-modules in HDBC-
odbc.cabal file, where it should have been all along. This is a bug
in HDBC-odbc, I recommend that you send a patch to the maintainer.
Approach 1 doesn't work since that does not include the .o file in
the installed .a archive.
Approach 2 doesn't work for several reasons, which exactly depend on
what else you did, and which .installed-pkg-config file you changed.
More information about the Haskell-Cafe