ghc-6.6 + cabal-1.6 - can't find header files

I'm puzzled as to why this build fails (ghc-6.6.1, cabal-1.6 (actually HEAD, I think, but close enough, and winXP). The sqlite.h header file is in C:\Progra~1\sqlite3\, which is clearly given with the -I option. Alistair c:\ghc\ghc-6.6.1\bin\ghc.exe -package-name Takusen-0.8.4 --make -hide-all-packag es -no-user-package-conf -i -idist\build -i. -idist\build\autogen -Idist\build\a utogen -Idist\build -IC:\Progra~1\sqlite3\ -IC:/PROGRA~1/POSTGR~1/8.1/include -I C:/PROGRA~1/POSTGR~1/8.1/include/server -IC:\Oracle\product\10.2.0\client_1\oci\ include -optP-include -optPdist\build\autogen\cabal_macros.h -odir dist\build -h idir dist\build -package QuickCheck-1.0.1 -package base-2.1.1 -package mtl-1.0.1 -package time-1.1.1 -O -cpp Database.ODBC.Enumerator Database.ODBC.OdbcFunction s Database.Oracle.Enumerator Database.Oracle.OCIConstants Database.Oracle.OCIFun ctions Database.PostgreSQL.Enumerator Database.PostgreSQL.PGFunctions Database.S qlite.Enumerator Database.Sqlite.SqliteFunctions Database.Enumerator Database.Ut il Database.Stub.Enumerator Control.Exception.MonadIO Foreign.C.UTF8 Database.In ternalEnumerator [ 7 of 15] Compiling Database.Sqlite.SqliteFunctions ( Database/Sqlite/SqliteFun ctions.lhs, dist\build/Database/Sqlite/SqliteFunctions.o ) C:\DOCUME~1\bayleya\LOCALS~1\Temp\ghc4176_0\ghc4176_0.hc:8:20: sqlite.h: No such file or directory .. [many more "implicit declaration of function" warnings follow as a result of this one]

2009/1/27 Alistair Bayley
I'm puzzled as to why this build fails (ghc-6.6.1, cabal-1.6 (actually HEAD, I think, but close enough, and winXP). The sqlite.h header file is in C:\Progra~1\sqlite3\, which is clearly given with the -I option.
Turns out it's the trailing backslash in the path C:\Progra~1\sqlite3\ (same error for slashes, too). !? Sorry for the noise. Alistair

On Tue, 2009-01-27 at 19:02 +0000, Alistair Bayley wrote:
2009/1/27 Alistair Bayley
: I'm puzzled as to why this build fails (ghc-6.6.1, cabal-1.6 (actually HEAD, I think, but close enough, and winXP). The sqlite.h header file is in C:\Progra~1\sqlite3\, which is clearly given with the -I option.
Turns out it's the trailing backslash in the path C:\Progra~1\sqlite3\ (same error for slashes, too). !?
I am very surprised. Is that problem at the gcc level? Does specifying paths with trailing dir separator cause this problem for gcc in a simple test case? If it really is a problem with gcc on windows perhaps ghc can use an updated gcc in future releases or we could try stripping trailing dir separators on include dirs in Cabal. Duncan

2009/1/27 Duncan Coutts
On Tue, 2009-01-27 at 19:02 +0000, Alistair Bayley wrote:
2009/1/27 Alistair Bayley
: I'm puzzled as to why this build fails (ghc-6.6.1, cabal-1.6 (actually HEAD, I think, but close enough, and winXP). The sqlite.h header file is in C:\Progra~1\sqlite3\, which is clearly given with the -I option.
Turns out it's the trailing backslash in the path C:\Progra~1\sqlite3\ (same error for slashes, too). !?
I am very surprised. Is that problem at the gcc level? Does specifying paths with trailing dir separator cause this problem for gcc in a simple test case?
If it really is a problem with gcc on windows perhaps ghc can use an updated gcc in future releases or we could try stripping trailing dir separators on include dirs in Cabal.
I think it's only ghc-6.6, but I'll retest against 6.8 and 6.10. If it's only 6.6 then I'm not going to sweat it. Alistair

On Tue, 2009-01-27 at 22:08 +0000, Alistair Bayley wrote:
2009/1/27 Duncan Coutts
: On Tue, 2009-01-27 at 19:02 +0000, Alistair Bayley wrote:
2009/1/27 Alistair Bayley
: I'm puzzled as to why this build fails (ghc-6.6.1, cabal-1.6 (actually HEAD, I think, but close enough, and winXP). The sqlite.h header file is in C:\Progra~1\sqlite3\, which is clearly given with the -I option.
Turns out it's the trailing backslash in the path C:\Progra~1\sqlite3\ (same error for slashes, too). !?
I am very surprised. Is that problem at the gcc level? Does specifying paths with trailing dir separator cause this problem for gcc in a simple test case?
If it really is a problem with gcc on windows perhaps ghc can use an updated gcc in future releases or we could try stripping trailing dir separators on include dirs in Cabal.
I think it's only ghc-6.6, but I'll retest against 6.8 and 6.10. If it's only 6.6 then I'm not going to sweat it.
That doesn't make a lot of sense to me. It's gcc that finds the header files. It could be ghc-6.6 that is somehow messing up passing flags on to gcc, but that would also be surprising. You can build with -v and see how ghc is invoking gcc, and try those commands manually etc. Duncan

That doesn't make a lot of sense to me. It's gcc that finds the header files. It could be ghc-6.6 that is somehow messing up passing flags on to gcc, but that would also be surprising.
Below are the gcc version and ghc commands for 6.6.1, 6.8.1, & 6.10.1. Puzzling that 6.8.1 works while 6.6.1 doesn't, given that they both use the same gcc. There must be something else going on. Like I said, I'm not going to worry about it much. ghc-hq aren't going to release a fix for ghc-6.6 now, are they? I will fix Setup.hs so that the trailing path separator is stripped. Alistair ------ ghc-6.6.1 gcc (GCC) 3.4.2 (mingw-special) c:\ghc\ghc-6.6.1\bin\ghc.exe -package-name Takusen-0.8.4 --make -hide-all-packag es -no-user-package-conf -i -idist\build -i. -idist\build\autogen -Idist\build\a utogen -Idist\build -IC:\Program Files\sqlite3\ -IC:/PROGRA~1/POSTGR~1/8.1/inclu de -IC:/PROGRA~1/POSTGR~1/8.1/include/server -IC:\Oracle\product\10.2.0\client_1 \oci\include -optP-include -optPdist\build\autogen\cabal_macros.h -odir dist\bui ld -hidir dist\build -package QuickCheck-1.0.1 -package base-2.1.1 -package mtl- 1.0.1 -package time-1.1.1 -O -cpp Database.ODBC.Enumerator Database.ODBC.OdbcFun ctions Database.Oracle.Enumerator Database.Oracle.OCIConstants Database.Oracle.O CIFunctions Database.PostgreSQL.Enumerator Database.PostgreSQL.PGFunctions Datab ase.Sqlite.Enumerator Database.Sqlite.SqliteFunctions Database.Enumerator Databa se.Util Database.Stub.Enumerator Control.Exception.MonadIO Foreign.C.UTF8 Databa se.InternalEnumerator ------ ghc-6.8.1 gcc (GCC) 3.4.2 (mingw-special) c:\ghc\ghc-6.8.1\bin\ghc.exe -package-name Takusen-0.8.4 --make -hide-all-packag es -no-user-package-conf -i -idist\build -i. -idist\build\autogen -Idist\build\a utogen -Idist\build -IC:\Program Files\sqlite3\ -IC:/PROGRA~1/POSTGR~1/8.1/inclu de -IC:/PROGRA~1/POSTGR~1/8.1/include/server -IC:\Oracle\product\10.2.0\client_1 \oci\include -optP-include -optPdist\build\autogen\cabal_macros.h -odir dist\bui ld -hidir dist\build -stubdir dist\build -package QuickCheck-1.1.0.0 -package ba se-3.0.0.0 -package mtl-1.1.0.0 -package old-time-1.0.0.0 -package time-1.1.2.0 -O -XCPP Database.ODBC.Enumerator Database.ODBC.OdbcFunctions Database.Oracle.En umerator Database.Oracle.OCIConstants Database.Oracle.OCIFunctions Database.Post greSQL.Enumerator Database.PostgreSQL.PGFunctions Database.Sqlite.Enumerator Dat abase.Sqlite.SqliteFunctions Database.Enumerator Database.Util Database.Stub.Enu merator Control.Exception.MonadIO Foreign.C.UTF8 Database.InternalEnumerator ------ ghc-6.10.1 gcc (GCC) 3.4.5 (mingw-vista special r3) c:\ghc\ghc-6.10.1\bin\ghc.exe -package-name Takusen-0.8.4 --make -hide-all-packa ges -no-user-package-conf -i -idist\build -i. -idist\build\autogen -Idist\build\ autogen -Idist\build -IC:\Program Files\sqlite3\ -IC:/PROGRA~1/POSTGR~1/8.1/incl ude -IC:/PROGRA~1/POSTGR~1/8.1/include/server -IC:\Oracle\product\10.2.0\client_ 1\oci\include -optP-DNEW_EXCEPTION -optP-DNEW_EXCEPTION -optP-include -optPdist\ build\autogen\cabal_macros.h -odir dist\build -hidir dist\build -stubdir dist\bu ild -package QuickCheck-1.2.0.0 -package base-4.0.0.0 -package mtl-1.1.0.2 -pack age old-time-1.0.0.1 -package time-1.1.2.2 -O -O2 -O2 -XCPP Database.ODBC.Enumer ator Database.ODBC.OdbcFunctions Database.Oracle.Enumerator Database.Oracle.OCIC onstants Database.Oracle.OCIFunctions Database.PostgreSQL.Enumerator Database.Po stgreSQL.PGFunctions Database.Sqlite.Enumerator Database.Sqlite.SqliteFunctions Database.Enumerator Database.Util Database.Stub.Enumerator Control.Exception.Mon adIO Foreign.C.UTF8 Database.InternalEnumerator
participants (2)
-
Alistair Bayley
-
Duncan Coutts