
Hello again,
Is this change in behaviour between ghc-6.4 and ghc-6.4.1 desired:
~/trans $ ls foo foo.c ~/trans $ ghc-6.4 -odir foo -c foo/foo.c ~/trans $ ls foo foo.c foo.o ~/trans $ rm foo/foo.o ~/trans $ ls foo foo.c ~/trans $ ghc-6.4.1.20050804 -odir foo -c foo/foo.c ~/trans $ ls foo foo foo.c ~/trans $ ls foo/foo foo.o
It seems to break cabal-1.1.1, in the case that I have something like
c-sources: foo/foo.c
in my .cabal file ...
Yes, this change was made for consistency (someone else reported the breakage). I've also patched Cabal, so perhaps you're using a version from before the fix?
I must be doing something wrong, then. With the dummy package at http://www.iai.uni-bonn.de/~loeh/cabalghc.tar.gz, the ghc 6.4.1 snapshot from 20050809 and a build of Cabal from the darcs repository I get: ~/trans/cabalghc $ ghc-pkg list Cabal /usr/lib/ghc-6.4.1.20050809/package.conf: (Cabal-1.0), Cabal-1.1.2 ~/trans/cabalghc $ runhaskell Setup configure Setup: Warning: No license-file field. Configuring cabalghc-1.0... configure: Using install prefix: /usr/local configure: Using compiler: /usr/bin/ghc configure: Compiler flavor: GHC configure: Compiler version: 6.4.1.20050809 configure: Using package tool: /usr/bin/ghc-pkg configure: Using haddock: /usr/bin/haddock configure: Using happy: /usr/bin/happy configure: Using alex: /usr/bin/alex configure: Using hsc2hs: /usr/bin/hsc2hs configure: Using c2hs: /usr/bin/c2hs configure: No cpphs found configure: No greencard found configure: Dependency base-any: using base-1.0 ~/trans/cabalghc $ runhaskell Setup build -v Preprocessing library cabalghc-1.0... Preprocessing executables for cabalghc-1.0... Building cabalghc-1.0... /usr/bin/ghc -package-name cabalghc -odir dist/build -hidir dist/build -hide-all-packages --make -i -i. -package base-1.0 Bar Chasing modules from: Bar Compiling Bar ( Bar.hs, dist/build/Bar.o ) /usr/bin/ar q dist/build/libHScabalghc-1.0.a dist/build/Bar.o /usr/bin/ar: creating dist/build/libHScabalghc-1.0.a /usr/bin/ld -r -x -o dist/build/HScabalghc-1.0.o dist/build/Bar.o hsSourceDirs: ["."] /usr/bin/ghc -odir dist/build/foo/foo-tmp/foo -hidir dist/build -c foo/foo.c /usr/bin/ghc -odir dist/build/foo/foo-tmp -hidir dist/build/foo/foo-tmp -o dist/build/foo/foo -hide-all-packages --make -i -i. -package base-1.0 dist/build/foo/foo-tmp/foo/foo.o Main.hs Chasing modules from: Main.hs Compiling Main ( Main.hs, dist/build/foo/foo-tmp/Main.o ) Linking ... gcc: dist/build/foo/foo-tmp/foo/foo.o: No such file or directory The file foo.o is at dist/build/foo/foo-tmp/foo/foo/foo.o ... Cheers, Andres