nhc98 on netbsd x86_64

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@netbsd.org

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
participants (2)
-
David Holland
-
Malcolm Wallace