[Haskell-cafe] cabal install of HDBC-odbc fails on ghc 6.7, -I flag causes problems

Thomas Hartman thomas.hartman at db.com
Mon Aug 20 13:10:37 EDT 2007


problemw with the -I flag to ghc are causing cabal install to fail for 
hdbc-odbc (darcs head).

man ghc still reports that -I is a valid flag after installing ghc 6.7 
from darcs head a couple days ago.

I think the problem might be the space after the -I flag (which is bad for 
both 6.6.1 and 6.7)

hartthoma at linuxpt:~/installs/HDBC-odbc-head/hdbc-odbc>/usr/local/bin/ghc-6.7.20070816 
  -I. -e '' Setup.hs
hartthoma at linuxpt:~/installs/HDBC-odbc-head/hdbc-odbc>/usr/local/bin/ghc-6.7.20070816 
  -I/ -e '' Setup.hs
hartthoma at linuxpt:~/installs/HDBC-odbc-head/hdbc-odbc>/usr/local/bin/ghc-6.7.20070816 
  -I / -e '' Setup.hs
ghc-6.7.20070816: unrecognised flags: -I

just a guess... 

anothing thing is it seems like there's a new INCLUDE pragma in 6.7. 
perhaps this should be used in one of the source files to get it to 
compile. but which one? I couldn't figure out what was causing 

  ghc -c -I dist/build/Database/HDBC/ODBC/Connection_hsc_make.c -o 
dist/build/Database/HDBC/ODBC/Connection_hsc_make.o

to be run. (I did try grepping on ghc but no luck, below.)

Any tips on debugging this cabal install would be appreciated.

thanks,

thomas

*************

$ runghc Setup.hs configure; runghc Setup.hs build

.....

configure: Using tar found on system at: /bin/tar
Reading parameters from 
/home/hartthoma/installs/HDBC-odbc-head/hdbc-odbc/HDBC-odbc.buildinfo
Preprocessing library 
HDBC-odbc-1.1.2hartthoma at linuxpt:~/installs/HDBC-odbc-head/hdbc-odbc>darcs 
whatsnew.0...
ghc-6.7.20070816: unrecognised flags: -I
Usage: For basic information, try the `--help' option.
compiling dist/build/Database/HDBC/ODBC/Connection_hsc_make.c failed
command was: ghc -c -I dist/build/Database/HDBC/ODBC/Connection_hsc_make.c 
-o dist/build/Database/HDBC/ODBC/Connection_hsc_make.o

........


hartthoma at linuxpt:~/installs/HDBC-odbc-head/hdbc-odbc>darcs whatsnew
{
hunk ./Setup.hs 8
-main = defaultMainWithHooks defaultUserHooks{preConf = conf, postConf = 
ok}
-       where ok _ _ _ _ = return ExitSuccess
+--main = defaultMainWithHooks defaultUserHooks{preConf = conf, postConf = 
ok}
+--       where ok _ _ _ _ = return ExitSuccess
+main = do
+  let ok _ _ _ _ = do return ExitSuccess
+                      return ()
+    in defaultMainWithHooks defaultUserHooks{preConf = conf, postConf = 
ok}
+  return ()
+
}

.....

hartthoma at linuxpt:~/installs/HDBC-odbc-head/hdbc-odbc>grep -i ghc *
HDBC-odbc.buildinfo:ghc-prof-options:
HDBC-odbc.buildinfo:ghc-options:
HDBC-odbc.cabal:GHC-Options: -O2
Makefile:GHCPARMS := -fglasgow-exts
Makefile:all: setup                     # GHC build
Makefile:       ghc -package Cabal Setup.hs -o setup
Makefile:       cd testsrc && ghc --make -package mtl -package HUnit 
-package MissingH -package HDBC -lodbc $(GHCPARMS) -o runtests 
-i../dist/build:.. ../d\
ist/build/hdbc-odbc-helper.o runtests.hs
Makefile:test-ghc6: testsrc/runtests
Makefile:interact-ghci: all
Makefile:       ghci -idist/build -Ldist/build $(GHCPARMS)
Makefile:test: test-ghc6 test-hugs
README.txt:You'll need either GHC 6.4.1 or above, or Hugs 2005xx or above. 
 If
README.txt:2) ghc --make -o setup Setup.lhs
README.txt:To use with GHC, you'll want to use:


---

This e-mail may contain confidential and/or privileged information. If you 
are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any 
unauthorized copying, disclosure or distribution of the material in this 
e-mail is strictly forbidden.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070820/4b7ee31e/attachment.htm


More information about the Haskell-Cafe mailing list