From dholland-haskell at netbsd.org Fri Oct 25 07:22:01 2013 From: dholland-haskell at netbsd.org (David Holland) Date: Fri, 25 Oct 2013 07:22:01 +0000 Subject: [nhc-bugs] nhc98 on netbsd x86_64 Message-ID: <20131025072201.GA28213@netbsd.org> I have been updating NetBSD's nhc98 package (to 1.22), and while it builds on 32-bit x86, on a 64-bit host the build dies running hmake3.config with PreludeList.init: empty list PreludeList.init: empty list PreludeList.init: empty list This comes from the MkConfig binary, which chucks this error immediately when run: % MACHINE=x86_64-NetBSD HMAKECONFDIR=/tmp/foo lib/x86_64-NetBSD/MkConfig foo PreludeList.init: empty list % Running it with no args produces suggestive results: % MACHINE=x86_64-NetBSD HMAKECONFDIR=/tmp/foo lib/x86_64-NetBSD/MkConfig Usage: hmake-config [configfile] list hmake-config [configfile] [add|add-dyn|delete|default] hc -- hc is name/path of a Haskell compiler default configfile is: PreludeList.init: empty list % inasmuch as it dies when it starts printing the path of the default config file. However, I see no way that the string involved can lead to a call to init, on an empty list or otherwise. And since it's happening inside unsafePerformIO maybe this is a red herring. Unfortunately since I'm building from the generated C I can't build MkConfig with trace information or debug printouts or much of anything else, and consequently I'm more or less stuck. (This is after adding -m32 to ARCH in Makefile.inc; without that the build fails almost instantly.) Suggestions? Are there additional places where -m32 needs to be set manually? (Given that the behavior is machine-dependent one possible explanation is that -m32 is missing somewhere so something is mixing 32-bit and 64-bit data and passing nonsense to init.) -- David A. Holland dholland at netbsd.org From nikita at karetnikov.org Fri Oct 25 11:11:44 2013 From: nikita at karetnikov.org (Nikita Karetnikov) Date: Fri, 25 Oct 2013 15:11:44 +0400 Subject: [nhc-bugs] GNU/Linux i686: PreludeList.init: empty list Message-ID: <87li1hppu7.fsf@karetnikov.org> I?d like to build nhc98 1.22 [1] on i686 without a Haskell compiler. ?make? fails with the following (also, see [2]): sh /home/tester/nhc98/nhc98-1.22/targets/ix86-Linux/hmake3.config PreludeList.init: empty list PreludeList.init: empty list PreludeList.init: empty list make[1]: *** [config] Error 255 make[1]: Leaving directory `/home/tester/nhc98/nhc98-1.22/src/hmake' make: *** [targets/ix86-Linux/hmake-gcc] Error 2 Any ideas? I?m also attaching the output of ?./configure?. Should I provide more information? Configuring for nhc98... [ v1.22 (2010-07-09) ] -------- Looking for already-installed Haskell compilers: Found C compiler: /usr/bin/gcc C compiler version: gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Looking for hbc... (not found) Note: LMLDIR/HBCDIR variables must be set to enable detection of hbc. Looking for ghc... (not found) Looking for nhc98... (not found) I am guessing that you want to use gcc to build hmake. Now I'm creating targets/ix86-Linux/hmake3.config for your installation. Done. -------- Configuration report for nhc98. (You can re-run configure to change settings before proceeding.) You wish (eventually) to install the following components in these locations: (Installation directories are not created/checked at this stage.) Final install root: /usr/local nhc98 binaries/libs: /usr/local/lib/nhc98/ix86-Linux hmake binaries: /usr/local/lib/hmake/ix86-Linux Interfaces/includes: /usr/local/include/nhc98 Scripts: /usr/local/bin Man pages: /usr/local/man/man1 Html documents: (none) Now we check/create your build directories: Config directory: targets/ix86-Linux Build directory root: /home/tester/nhc98/nhc98-1.22/targets (exists) Object files build in: /home/tester/nhc98/nhc98-1.22/targets/ix86-Linux (exists) Executables and libs: /home/tester/nhc98/nhc98-1.22/lib/ix86-Linux (created) Toolchain: host compiler: gcc host strip: strip cabal-parse: /home/tester/nhc98/nhc98-1.22/script/cabal-parse I am guessing you will build nhc98 with: gcc backend compiler option: -m32 backend linker option: -m32 nhc98comp uses RTS delimiters? yes This machine's endian-ness is: -DLOW_BYTE_FIRST (detected) Executables need .exe suffix? no (detected) Testing for the curses library: -ltermcap -lcurses (detected) Testing for the readline library: no (detected) Reading /usr/include/errno.h: updated DErrNo.hs Testing for FunnelWeb: no (detected) Default heap for compiled programs is: 100000 words (cached) Adding Makefile config script to /home/tester/nhc98/nhc98-1.22/lib/ix86-Linux... cat: targets/ix86-Linux/ghcsym: No such file or directory Adding build scripts to /home/tester/nhc98/nhc98-1.22/script... nhc98 hmake hmake-config hi greencard nhc98-pkg hsc2hs cpphs Creating src/runtime/nhc98heap.c ... Configuring src/compiler98/Building.hs ... Updating targets/ix86-Linux/hmake3.config... Saving current configuration in targets/ix86-Linux/config.cache Done. [1] http://www.haskell.org/nhc98/nhc98src-1.22.tar.gz [2] http://www.haskell.org/pipermail/nhc-bugs/2013-October/000554.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: From malcolm.wallace at me.com Fri Oct 25 22:58:23 2013 From: malcolm.wallace at me.com (Malcolm Wallace) Date: Fri, 25 Oct 2013 23:58:23 +0100 Subject: [nhc-bugs] nhc98 on netbsd x86_64 In-Reply-To: <20131025072201.GA28213@netbsd.org> References: <20131025072201.GA28213@netbsd.org> Message-ID: On 25 Oct 2013, at 08:22, David Holland wrote: > I have been updating NetBSD's nhc98 package (to 1.22), and while it > builds on 32-bit x86, on a 64-bit host the build dies running > hmake3.config with > > PreludeList.init: empty list > PreludeList.init: empty list > PreludeList.init: empty list My best guess is the same as yours. nhc98 will only build with a 32-bit environment, since its memory model explicitly expects that. Building with a 64-bit compiler and the -m32 flag _might_ work, but as you say, it is easy to miss a place where the flag is necessary, but the build system fails to pass it through correctly. Regards, Malcolm