I have no idea what is wrong, but if you add "-v" to the ghc command line you'll see exactly what flags it is giving to the C compiler, and that might help. You can also keep intermediate files so you can see them later http://www.haskell.org/ghc/docs/latest/html/users_guide/flag-reference.html#id471118
this might at least give you more info Simon | -----Original Message----- | From: [email protected] [mailto:glasgow-haskell-users- | [email protected]] On Behalf Of Henry DeYoung | Sent: 31 October 2009 18:27 | To: [email protected] | Cc: [email protected] | Subject: Assembler errors when compiling nofib benchmarks with -optc-g | | Hi, | | I am working with another grad student on a course project on cache | behavior of GHC programs. The first part of this project is to reproduce | some of the measurements from Nethercote and Mycroft's "The Cache Behavior | of Large Lazy Functional Programs on Stock Hardware". | | We've decided to use oprofile to sample cache misses recorded by the | performance counters. To get reasonable information out of oprofile, I'd | like to compile the nofib benchmarks via C with export of debugging | symbols. | | As a first step toward this, I've changed the NoFibHcOpts variable in | nofib/mk/boilerplate.mk to be: | | NoFibHcOpts = -O -fvia-C -pgmc gcc -optc-g | | However, when I do make in the nofib/real/compress directory, for example, | I get the following error message: | | ==nofib== compress: time to compile BinConv follows... | /usr0/software/ghc-6.10.1/inplace/bin/ghc-stage2 -H32m -O -O -fvia-C -pgmc | gcc -optc-g -Rghc-timing -H32m -hisuf hi -c BinCon | v.hs -o BinConv.o | <<ghc: 83082120 bytes, 8 GCs, 5163477/9786528 avg/max bytes residency (3 | samples), 33M in use, 0.00 INIT (0.00 elapsed), 0.14 | MUT (1.25 elapsed), 0.10 GC (0.12 elapsed) :ghc>> | 1.27user 0.12system 0:01.39elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k | 0inputs+0outputs (0major+21251minor)pagefaults 0swaps | ==nofib== compress: size of BinConv.o follows... | text data bss dec hex filename | 6677 192 8 6877 1add BinConv.o | ==nofib== compress: time to compile BinTest follows... | /usr0/software/ghc-6.10.1/inplace/bin/ghc-stage2 -H32m -O -O -fvia-C -pgmc | gcc -optc-g -Rghc-timing -H32m -hisuf hi -c BinTes | t.hs -o BinTest.o | /tmp/ghc14909_0/ghc14909_0.s: Assembler messages: | | /tmp/ghc14909_0/ghc14909_0.s:54:0: Error: unassigned file number 1 | | /tmp/ghc14909_0/ghc14909_0.s:54:0: | Error: junk at end of line, first unrecognized character is `0' | | /tmp/ghc14909_0/ghc14909_0.s:56:0: Error: unassigned file number 1 | | /tmp/ghc14909_0/ghc14909_0.s:56:0: | Error: junk at end of line, first unrecognized character is `0' | | /tmp/ghc14909_0/ghc14909_0.s:57:0: Error: unassigned file number 1 | | /tmp/ghc14909_0/ghc14909_0.s:57:0: | Error: junk at end of line, first unrecognized character is `0' | | /tmp/ghc14909_0/ghc14909_0.s:61:0: Error: unassigned file number 1 | | /tmp/ghc14909_0/ghc14909_0.s:61:0: | Error: junk at end of line, first unrecognized character is `0' | | etc... | | Curiously, if I remove the -optc-g flag, but still use -fvia-C and -pgmc | gcc, everything works fine. | | Do you have any ideas what might be causing these errors? Is there a fix | or workaround to get the C compiler to export debugging symbols? | | | Second, it appears that a make with -fvia-C -pgmc gcc removes the C source | after it has been compiled. Is there a way to preserve this source so | that it can be annotated line by line using oprofile? | | | I apologize if these questions are rudimentary; this is my first | experience with GHC and nofib. Also, if these questions should be | directed toward a different mailing list, please let me know. | | Thanks for any help you can give with this! | | Henry | | | | _______________________________________________ | Glasgow-haskell-users mailing list | [email protected] | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
