GHC 6.0, Mingw32 and RTS

Michael Adams mdmkolbe@yahoo.com
Fri, 25 Jul 2003 14:27:23 -0700 (PDT)


I found the cause of the error.  If I pass
--enable-win32-dll to configure then the error
happens.  When I don't pass --enable-win32-dll, the
error doesn't happen (build.mk however still has
"GhcLibWays+=dll" in it) and stage1 completes.

What is the purpose of --enable-win32-dll?  How is it
different than GhcLibWays+=dll?

Michael D. Adams
mdmkolbe@yahoo.com

P.S. Later next week I can post details about what it
took for me to get it to build if anyone is
interested.

--- Simon Peyton-Jones <simonpj@microsoft.com> wrote:
> There are detailed instructions on building GHC for
> Win32 at
> 	
>
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
> | 
> | 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.
> | 
> | Thanks in advance,
> | Michael D. Adams
> | mdmkolbe@yahoo.com
> | 
> | 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.
> | 
> | ----
> | $ uname -a
> | CYGWIN_NT-5.1 seville 1.3.22(0.78/3/2) 2003-03-18
> | 09:20 i686 unknown unknown Cygwin
> | 
> | $ 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)
> | 
> | $ /cygdrive/d/bin/ghc/bin/ghc.exe -v --version
> | The Glorious Glasgow Haskell Compilation System,
> | version 6.0
> | 
> | $ 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=/usr/local/stow/ghc-6-n2
> | --enable-win32-dlls
> | --with-ghc=/cygdrive/d/bin/ghc/bin/ghc.exe
> | i686-pc-mingw32 --with-gcc=gcc-2
> | ...
> | 
> | $ make
> | ... Errors appear in ./ghc/rts
> | $ cd ./ghc/rts
> | $ make
> | make -C gmp MAKEFLAGS=
> | 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=i386-mingw32 -lHS_imp_stub -lgmp_imp
> | --export-all --output-def=HSrts.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
> 
=== message truncated ===


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com