more non-standard mingw trouble: math.h: No such file

Claus Reinke claus.reinke at talk21.com
Thu Mar 5 18:48:50 EST 2009


while trying some -fvia-C compilation with ghc-6.11.20090118,
(mingw/cygwin), I ran into

C:/ghc/ghc-6.11.20090118/include/Stg.h:51:18: math.h: No such file or directory

Since ghc's copy of gcc is non-standard (#1502), ghc has to tell gcc where
to find its includes. "ghc -v" reveals that the relevant path is passed to gcc with
a trailing slash, leading to gcc ignoring it (and since I build on drive D: while my
mingw is on drive C:, the catch-all "/mingw/include" does not work - a setup
with everything on C: would hide this bug).

Workaround: ghc -v -optc -I -optc C:/ghc/ghc-6.11.20090118/include/mingw

The -v output below shows that the internally generated path (with trailing /)
is ignored as non-existent, as are various others, while the manually added
path (without trailing /) is considered.

Fixing #1502 would avoid even the possibility of these kinds of path errors
(gcc could find its files relative to its executable, as can be seen from the other
currently non-existent paths below, so no extra paths would need to be passed).

Claus

 C:/ghc/ghc-6.11.20090118/gcc-lib/cc1.exe -quiet -v -IC:\ghc\ghc-6.11.20090118\include/mingw/ -I C:/
ghc/ghc-6.11.20090118/include/mingw -I . -I ghc_out -I C:\Program Files\Haskell\mersenne-random-pure
64-0.2.0.2\ghc-6.11.20090118\include -I C:\ghc\ghc-6.11.20090118\old-time-1.0.0.1\include -I C:\ghc\
ghc-6.11.20090118\base-4.0.0.0\include -I C:\ghc\ghc-6.11.20090118/include -I 
PAPI_INCLUDE_DIR -iprefix C:\ghc\ghc-6.11.20090118\../lib/gcc/mingw32/3.4.2/ -isystem 
C:/ghc/ghc-6.11.20090118/gcc-lib/inc
lude -DDONT_WANT_WIN32_DLL_SUPPORT -DSTOLEN_X86_REGS=4 -D__GLASGOW_HASKELL__=611 -DTABLES_NEXT_TO_CODE 
C:\DOCUME~1\cr3\LOCALS~1\Temp\/ghc2524_0/ghc2524_0.hc -quiet -dumpbase ghc2524_0.hc -mno-omit-lea
f-frame-pointer -auxbase-strip 
C:\DOCUME~1\cr3\LOCALS~1\Temp\/ghc2524_0/ghc2524_0.raw_s -O2 -O2 -Wimplicit -version -fno-defer-pop  
-fomit-frame-pointer -fno-builtin -fwrapv -fno-unit-at-a-time -ffloat
-store -fno-strict-aliasing -funroll-loops -o 
C:\DOCUME~1\cr3\LOCALS~1\Temp\/ghc2524_0/ghc2524_0.raw_s
ignoring nonexistent directory 
"C:/ghc/ghc-6.11.20090118/../lib/gcc/mingw32/3.4.2/../../../../include"
ignoring nonexistent directory "C:/ghc/ghc-6.11.20090118/../lib/gcc/mingw32/3.4.2/include"
ignoring nonexistent directory 
"C:/ghc/ghc-6.11.20090118/../lib/gcc/mingw32/3.4.2/../../../../mingw32/include"
ignoring nonexistent directory "/mingw/include"
ignoring nonexistent directory "/mingw/include"
ignoring nonexistent directory "/mingw/lib/gcc/mingw32/3.4.2/include"
ignoring nonexistent directory "/mingw/mingw32/include"
ignoring nonexistent directory "/mingw/include"
ignoring nonexistent directory "C:/ghc/ghc-6.11.20090118/include/mingw/"
ignoring nonexistent directory "PAPI_INCLUDE_DIR"
#include "..." search starts here:
#include <...> search starts here:
 C:/ghc/ghc-6.11.20090118/include/mingw
 .
 ghc_out
 C:/Program Files/Haskell/mersenne-random-pure64-0.2.0.2/ghc-6.11.20090118/include
 C:/ghc/ghc-6.11.20090118/old-time-1.0.0.1/include
 C:/ghc/ghc-6.11.20090118/base-4.0.0.0/include
 C:/ghc/ghc-6.11.20090118/include
 C:/ghc/ghc-6.11.20090118/gcc-lib/include
End of search list.
GNU C version 3.4.2 (mingw-special) (mingw32)
        compiled by GNU C version 3.4.2 (mingw-special). 



More information about the Cvs-ghc mailing list