maybe a GHC bug but not sure

When building the Haskell Objective C bindings tool from http://code.google.com/p/hoc Using GHC 7.0.3 for Haskell Platform 2011.2.0.1, OS X 64 bit HOC compiles HOC_cbits.o before trying to build it into the rest of the program (I don't say link because this came up while trying to compile:
[18 of 31] Compiling HOC.StdArgumentTypes ( HOC/HOC/StdArgumentTypes.hs, dist/build/HOC/StdArgumentTypes.o ) [loading packages, like you'd see from ghci...] Loading object (static) dist/build/HOC_cbits.o ... ghc: dist/build/HOC_cbits.o: Bad magic. Expected: feedfacf, got: feedface.
GHC says "the impossible happened" and tells me to report it as a GHC bug, but based on the odd behavior I think the HOC build script might be doing something odd. I just don't have any idea where to start looking. For instance, why the heck is it looking at the magic bits for an object file while compiling a source file? Any insight appreciated. -- Edward Amsden Student Computer Science Rochester Institute of Technology www.edwardamsden.com

And after a lot more sleep and some digging, it turns out that the
build script was forcing GCC to build the .o file as a 32 bit binary,
and thus causing the "magic" mismatch.
On Mon, May 30, 2011 at 11:20 PM, Edward Amsden
When building the Haskell Objective C bindings tool from http://code.google.com/p/hoc
Using GHC 7.0.3 for Haskell Platform 2011.2.0.1, OS X 64 bit
HOC compiles HOC_cbits.o before trying to build it into the rest of the program (I don't say link because this came up while trying to compile:
[18 of 31] Compiling HOC.StdArgumentTypes ( HOC/HOC/StdArgumentTypes.hs, dist/build/HOC/StdArgumentTypes.o ) [loading packages, like you'd see from ghci...] Loading object (static) dist/build/HOC_cbits.o ... ghc: dist/build/HOC_cbits.o: Bad magic. Expected: feedfacf, got: feedface.
GHC says "the impossible happened" and tells me to report it as a GHC bug, but based on the odd behavior I think the HOC build script might be doing something odd. I just don't have any idea where to start looking. For instance, why the heck is it looking at the magic bits for an object file while compiling a source file?
Any insight appreciated.
-- Edward Amsden Student Computer Science Rochester Institute of Technology www.edwardamsden.com
-- Edward Amsden Student Computer Science Rochester Institute of Technology www.edwardamsden.com
participants (1)
-
Edward Amsden