Re: [nhc-bugs] Building nhc98 on Windows 2000
I am not able to fully build nhc98 V1.12 under Windows 2000 (cygwin): building hmake constantly fails.
just gave it a quick try (cygwin,Win2k,nhc-1.12+ranlib/hmake-patches).
I was able to work around several other problems: a) inclusion of stdint.h (which gave name conflicts),
only exists in mingw part (no experience with that, not sure whether its a good idea to include its version of stdint.h?)
b) inclusion of inttypes.h (this file is not even present) and
doesn't exist in cygwin.
Could you supply some more details, particularly about how you worked around problems (a) and (b)? The only reason for #include'ing those files is to get the standard typedef for int64_t etc. Is there an alternative location for that in Cygwin?
here's my problem log so far (btw, configure found my ghc-5.02.2; there used to be a way to install with gcc only - is this still there?): - inttypes.h and stdint.h don't exist in src/runtime/kernel/mark.h: #include <sys/types.h> instead in include/HsFFI.h: #include <sys/types.h> instead, and typedef uint{8,16,32,64}_t yourself - ... make[1]: Leaving directory `/tmp/nhc98-1.12/src/hat/runtime' touch targets/ix86-CYGWIN_NT-5.0/runtime cd src/hmake; make HC=ghc install config make[1]: Entering directory `/tmp/nhc98-1.12/src/hmake' mkdir -p /tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake || /bin/true ghc -package lang -package posix -c -o /tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/QSort.o QSort.hs Assembler messages: FATAL: Can't create \tmp\nhc98-1.12\targets\ix86-CYGWIN_NT-5.0\obj\hmake\QSort.o : No such file or directory make[1]: *** [/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/QSort.o] Error 1 make[1]: Leaving directory `/tmp/nhc98-1.12/src/hmake' make: *** [targets/ix86-CYGWIN_NT-5.0/hmake-ghc] Error 2 in src/hmake/Makefile: $(BUILDDIR) and $(DST) are absolute, cygwin-style pathnames, but will be passed to (non-cygwin) ghc, so we need to replace those with non-cygwin-style pathnames. the proper way would probably use cygpath, but then we'd need to escape the \s for use in the cygwin-tools (using patsubst?). for now, just prefix them with c:/cygwin (ghc can handle / and \). [I thought these ghc/cygwin-path problems were an old Hat by now?-] - ... cd src/hmake; make HC=ghc install config make[1]: Entering directory `/tmp/nhc98-1.12/src/hmake' ghc -package lang -package posix -o c:/cygwin/tmp/nhc98-1.12/lib/ix86-CYGWIN_NT-5.0/MkProg.exe c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/QSort.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/Unlit.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/Utils.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/Tsort.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/FileName.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/SymTab.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/Output.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/Order.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/ListUtil.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/Getmodtime.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/MkProg.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/IsPrefixOf.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/Compiler.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/PreProcessor.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/Argv.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/Graph.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/GetDep.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/ParseLib.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/Compat.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/Imports.o c:/cygwin/tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/Config.o c:\ghc\ghc-5.02.2\gcc-lib\ld.exe: cannot find -lHSposix make[1]: *** [c:/cygwin/tmp/nhc98-1.12/lib/ix86-CYGWIN_NT-5.0/MkProg.exe] Error 1 make[1]: Leaving directory `/tmp/nhc98-1.12/src/hmake' make: *** [targets/ix86-CYGWIN_NT-5.0/hmake-ghc] Error 2 Enough for today;-( Claus
Hi Claus,
here's my problem log so far (btw, configure found my ghc-5.02.2; there used to be a way to install with gcc only - is this still there?):
Yes, it is still possible to build with a specified compiler, overriding the detected choice of compiler, e.g. ./configure --buildwith=gcc
- inttypes.h and stdint.h don't exist #include <sys/types.h> instead
Ok, I could place some more #ifdefs to solve this.
in include/HsFFI.h: #include <sys/types.h> instead, and typedef uint{8,16,32,64}_t yourself
... but `uint8_t' etc. are part of the C standard now are they not? There must be a standard include for them.
ghc -package lang -package posix -c -o /tmp/nhc98-1.12/targets/ix86-CYGWIN_NT-5.0/obj/hmake/QSort.o QSort.hs Assembler messages: FATAL: Can't create \tmp\nhc98-1.12\targets\ix86-CYGWIN_NT-5.0\obj\hmake\QSort.o: No such file or directory
I *think* the problem here is that the standard GHC distribution for Windows is now a mingw32 application, and it translates paths to "native" format, which apparently the Cygwin assembler doesn't like. Sigbjorn has recently made a GHC-for-Cygwin binary package available which might solve this problem.
[I thought these ghc/cygwin-path problems were an old Hat by now?-]
So did I, but GHC's move away from Cygwin to support a native Windows configuration seems to have broken several things that used to work.
c:\ghc\ghc-5.02.2\gcc-lib\ld.exe: cannot find -lHSposix
My fault. I assumed that GHC's -package posix would be available in all current GHC's. But of course, Windows is a non-Posix environment. I'll try to find a simple fix that removes the Posix dependency under Windows - it is only used in a trivial way anyhow. Regards, Malcolm
participants (2)
-
C.Reinke -
Malcolm Wallace