GHC 6.0, Mingw32 and RTS

Simon Peyton-Jones simonpj@microsoft.com
Wed, 23 Jul 2003 08:45:26 +0100


There are detailed instructions on building GHC for Win32 at
=09
http://www.haskell.org/ghc/docs/latest/html/building/winbuild.html

I'm not sure you are doing exactly what is specified there.  The other
thing to check is that you have checked out and have up to date all the
directories
	fptools/mk
	fptools/ghc
	fptools/libraries
	fptools/glafp-utils

Sit in the fptools/ directory and type 'make' (this will do a 'make
boot' first).

Simon

| -----Original Message-----
| From: glasgow-haskell-users-admin@haskell.org
[mailto:glasgow-haskell-users-admin@haskell.org]
| On Behalf Of Michael Adams
| Sent: 23 July 2003 00:50
| To: glasgow-haskell-users@haskell.org
| Subject: GHC 6.0, Mingw32 and RTS
|=20
| I am trying to compile GHC for mingw32 (cygwin
| environment with -mno-cygwin compile option) but I've
| run into some trouble with some "undefined reference"
| errors.  Can someone help me?  I'm having this trouble
| with both version 3 and 2 of gcc, and I'm using the
| Windows Installer of ghc 6.0 to bootstrap from.
|=20
| Thanks in advance,
| Michael D. Adams
| mdmkolbe@yahoo.com
|=20
| P.S. I can post the config.log's if you need them.  I
| just wanted to check if they were needed before posing
| them because they are so long.
|=20
| ----
| $ uname -a
| CYGWIN_NT-5.1 seville 1.3.22(0.78/3/2) 2003-03-18
| 09:20 i686 unknown unknown Cygwin
|=20
| $ gcc-2 -v
| Reading specs from
| /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-10/specs
| gcc version 2.95.3-10 (cygwin special)
|=20
| $ /cygdrive/d/bin/ghc/bin/ghc.exe -v --version
| The Glorious Glasgow Haskell Compilation System,
| version 6.0
|=20
| $ wget
| http://haskell.cs.yale.edu/ghc/dist/6.0/ghc-6.0-src.tar.bz2
| $ bunzip2 ghc-6.0-src.tar.bz2
| $ tar -xvf ghc-6.0-src.tar
| $ mv ghc-6.0-src ghc-6.0-n2
| $ cd ghc-6.0-n2
| $ ./configure --prefix=3D/usr/local/stow/ghc-6-n2
| --enable-win32-dlls
| --with-ghc=3D/cygdrive/d/bin/ghc/bin/ghc.exe
| i686-pc-mingw32 --with-gcc=3Dgcc-2
| ...
|=20
| $ make
| ... Errors appear in ./ghc/rts
| $ cd ./ghc/rts
| $ make
| make -C gmp MAKEFLAGS=3D
| make[1]: Entering directory
| `/src/Haskell/ghc-6.0-n2/ghc/rts/gmp'
| make  all-recursive
| make[2]: Entering directory
| `/src/Haskell/ghc-6.0-n2/ghc/rts/gmp'
| Making all in mpn
| make[3]: Entering directory
| `/src/Haskell/ghc-6.0-n2/ghc/rts/gmp/mpn'
| make[4]: Entering directory
| `/src/Haskell/ghc-6.0-n2/ghc/rts/gmp/mpn'
| make[4]: Nothing to be done for `all-am'.
| make[4]: Leaving directory
| `/src/Haskell/ghc-6.0-n2/ghc/rts/gmp/mpn'
| make[3]: Leaving directory
| `/src/Haskell/ghc-6.0-n2/ghc/rts/gmp/mpn'
| Making all in mpz
| make[3]: Entering directory
| `/src/Haskell/ghc-6.0-n2/ghc/rts/gmp/mpz'
| make[4]: Entering directory
| `/src/Haskell/ghc-6.0-n2/ghc/rts/gmp/mpz'
| make[4]: Nothing to be done for `all-am'.
| make[4]: Leaving directory
| `/src/Haskell/ghc-6.0-n2/ghc/rts/gmp/mpz'
| make[3]: Leaving directory
| `/src/Haskell/ghc-6.0-n2/ghc/rts/gmp/mpz'
| make[3]: Entering directory
| `/src/Haskell/ghc-6.0-n2/ghc/rts/gmp'
| make[3]: Leaving directory
| `/src/Haskell/ghc-6.0-n2/ghc/rts/gmp'
| make[2]: Leaving directory
| `/src/Haskell/ghc-6.0-n2/ghc/rts/gmp'
| make[1]: Leaving directory
| `/src/Haskell/ghc-6.0-n2/ghc/rts/gmp'
| dllwrap --output-lib libHSrts_imp.a -o
| ../../dll/HSrts.dll libHSrts.a -mno-cygwin
| --target=3Di386-mingw32 -lHS_imp_stub -lgmp_imp
| --export-all --output-def=3DHSrts.def DllVersionInfo.o
| -lgmp -L. -L../rts/gmp   -lwsock32 -lwinmm
| dllwrap: no export definition file provided.
| Creating one, but that may not be what you want
| libHSrts.a(GC.o)(.text+0x168a):GC.c: undefined
| reference to `GHCziBase_Czh_con_info'
| libHSrts.a(GC.o)(.text+0x16a7):GC.c: undefined
| reference to `GHCziBase_Izh_con_info'
| libHSrts.a(Schedule.o)(.text+0x22a):Schedule.c:
| undefined reference to
| `GHCziIOBase_NonTermination_closure'
| libHSrts.a(Schedule.o)(.text+0xc2f):Schedule.c:
| undefined reference to
| `GHCziIOBase_stackOverflow_closure'
| libHSrts.a(Schedule.o)(.text+0x1414):Schedule.c:
| undefined reference to
| `GHCziIOBase_BlockedOnDeadMVar_closure'
| libHSrts.a(Schedule.o)(.text+0x1420):Schedule.c:
| undefined reference to
| `GHCziIOBase_NonTermination_closure'
| libHSrts.a(Schedule.o)(.text+0x14a9):Schedule.c:
| undefined reference to
| `GHCziIOBase_NonTermination_closure'
| libHSrts.a(Weak.o)(.text+0xcc):Weak.c: undefined
| reference to `GHCziWeak_runFinalizzerBatch_closure'
| libHSrts.a(RtsAPI.o)(.text+0x14):RtsAPI.c: undefined
| reference to `GHCziBase_Czh_con_info'
| libHSrts.a(RtsAPI.o)(.text+0x38):RtsAPI.c: undefined
| reference to `GHCziBase_Izh_con_info'
| libHSrts.a(RtsAPI.o)(.text+0x5e):RtsAPI.c: undefined
| reference to `GHCziInt_I8zh_con_info'
| libHSrts.a(RtsAPI.o)(.text+0x88):RtsAPI.c: undefined
| reference to `GHCziInt_I16zh_con_info'
| libHSrts.a(RtsAPI.o)(.text+0xb0):RtsAPI.c: undefined
| reference to `GHCziInt_I32zh_con_info'
| libHSrts.a(RtsAPI.o)(.text+0xd9):RtsAPI.c: undefined
| reference to `GHCziInt_I64zh_con_info'
| libHSrts.a(RtsAPI.o)(.text+0x100):RtsAPI.c: undefined
| reference to `GHCziWord_Wzh_con_info'
| libHSrts.a(RtsAPI.o)(.text+0x126):RtsAPI.c: undefined
| reference to `GHCziWord_W8zh_con_info'
| libHSrts.a(RtsAPI.o)(.text+0x150):RtsAPI.c: undefined
| reference to `GHCziWord_W16zh_con_info'
| libHSrts.a(RtsAPI.o)(.text+0x178):RtsAPI.c: undefined
| reference to `GHCziWord_W32zh_con_info'
| libHSrts.a(RtsAPI.o)(.text+0x1a1):RtsAPI.c: undefined
| reference to `GHCziWord_W64zh_con_info'
| libHSrts.a(RtsAPI.o)(.text+0x1c3):RtsAPI.c: undefined
| reference to `GHCziFloat_Fzh_con_info'
| libHSrts.a(RtsAPI.o)(.text+0x1f9):RtsAPI.c: undefined
| reference to `GHCziFloat_Dzh_con_info'
| libHSrts.a(RtsAPI.o)(.text+0x230):RtsAPI.c: undefined
| reference to `GHCziStable_StablePtr_con_info'
| libHSrts.a(RtsAPI.o)(.text+0x254):RtsAPI.c: undefined
| reference to `GHCziPtr_Ptr_con_info'
| libHSrts.a(RtsAPI.o)(.text+0x278):RtsAPI.c: undefined
| reference to `GHCziPtr_FunPtr_con_info'
| libHSrts.a(RtsAPI.o)(.text+0x290):RtsAPI.c: undefined
| reference to `GHCziBase_False_closure'
| libHSrts.a(RtsAPI.o)(.text+0x299):RtsAPI.c: undefined
| reference to `GHCziBase_True_closure'
| libHSrts.a(RtsAPI.o)(.text+0x2b5):RtsAPI.c: undefined
| reference to `GHCziPack_unpackCString_closure'
| libHSrts.a(RtsAPI.o)(.text+0x3c4):RtsAPI.c: undefined
| reference to `GHCziBase_True_closure'
| libHSrts.a(RtsAPI.o)(.text+0x3d5):RtsAPI.c: undefined
| reference to `GHCziBase_False_closure'
| libHSrts.a(StgMiscClosures.o)(.data+0x14):StgMiscClosures.hc:
| undefined reference to `GHCziBase_Czh_static_info'
| libHSrts.a(StgMiscClosures.o)(.data+0x1c):StgMiscClosures.hc:
| undefined reference to `GHCziBase_Czh_static_info'
| libHSrts.a(StgMiscClosures.o)(.data+0x24):StgMiscClosures.hc:
| undefined reference to `GHCziBase_Czh_static_info'
| libHSrts.a(StgMiscClosures.o)(.data+0x2c):StgMiscClosures.hc:
| undefined reference to `GHCziBase_Czh_static_info'
| libHSrts.a(StgMiscClosures.o)(.data+0x34):StgMiscClosures.hc:
| undefined reference to `GHCziBase_Czh_static_info'
| libHSrts.a(StgMiscClosures.o)(.data+0x3c):StgMiscClosures.hc:
| more undefined references to
| `GHCziBase_Czh_static_info' follow
| libHSrts.a(StgMiscClosures.o)(.data+0x814):StgMiscClosures.hc:
| undefined reference to `GHCziBase_Izh_static_info'
| libHSrts.a(StgMiscClosures.o)(.data+0x81c):StgMiscClosures.hc:
| undefined reference to `GHCziBase_Izh_static_info'
| libHSrts.a(StgMiscClosures.o)(.data+0x824):StgMiscClosures.hc:
| undefined reference to `GHCziBase_Izh_static_info'
| libHSrts.a(StgMiscClosures.o)(.data+0x82c):StgMiscClosures.hc:
| undefined reference to `GHCziBase_Izh_static_info'
| libHSrts.a(StgMiscClosures.o)(.data+0x834):StgMiscClosures.hc:
| undefined reference to `GHCziBase_Izh_static_info'
| libHSrts.a(StgMiscClosures.o)(.data+0x83c):StgMiscClosures.hc:
| more undefined references to
| `GHCziBase_Izh_static_info' follow
| dllwrap: gcc exited with status 1
| make: *** [../../dll/HSrts.dll] Error 1
|=20
|=20
| __________________________________
| Do you Yahoo!?
| Yahoo! SiteBuilder - Free, easy-to-use web site design software
| http://sitebuilder.yahoo.com
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users@haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users