Hello all, I've install "universal binary" for x86_64 of GHC 6.4.1. The installation was done on AMD dual core machine. Uname for the machine gives: Linux <machine name> 2.6.16.5 #1 SMP Thu Apr 13 09:08:22 CEST 2006 x86_64 x86_64 x86_64 GNU/Linux While ghci was running some tests well, the ghc ended compilation with a long list of errors starting like this: Chasing modules from: queen-main Compiling QueensDK ( ./QueensDK.hs, ./QueensDK.o ) /tmp/ghc27286.s: Assembler messages: /tmp/ghc27286.s:26: Error: bad register name `%r12' /tmp/ghc27286.s:27: Error: bad register name `%r15' /tmp/ghc27286.s:29: Error: bad register name `%r12)' /tmp/ghc27286.s:30: Error: bad register name `%r12)' /tmp/ghc27286.s:31: Error: bad register name `%r12)' /tmp/ghc27286.s:32: Error: bad register name `%rax' /tmp/ghc27286.s:33: Error: bad register name `%r13)' /tmp/ghc27286.s:34: Error: bad register name `%rbp' /tmp/ghc27286.s:37: Error: bad register name `%rbx)' /tmp/ghc27286.s:38: Error: bad register name `%rbx)' /tmp/ghc27286.s:45: Error: bad register name `%rbp)' /tmp/ghc27286.s:46: Error: bad register name `%r14' /tmp/ghc27286.s:48: Error: bad register name `%rbp)' /tmp/ghc27286.s:49: Error: bad register name `%r13' ... The list is quite long. I've truncated it. Well, OK, the x386 version is running, but it won't compile GHC-6.4.2 and, moreover, it's not optimized for the HW. ;-) Is there any way out, or what may I be doing wrong way? Regards, Dusan
Dusan Kolar wrote:
Hello all,
I've install "universal binary" for x86_64 of GHC 6.4.1. The installation was done on AMD dual core machine. Uname for the machine gives:
Linux <machine name> 2.6.16.5 #1 SMP Thu Apr 13 09:08:22 CEST 2006 x86_64 x86_64 x86_64 GNU/Linux
While ghci was running some tests well, the ghc ended compilation with a long list of errors starting like this:
Chasing modules from: queen-main Compiling QueensDK ( ./QueensDK.hs, ./QueensDK.o ) /tmp/ghc27286.s: Assembler messages: /tmp/ghc27286.s:26: Error: bad register name `%r12' /tmp/ghc27286.s:27: Error: bad register name `%r15' /tmp/ghc27286.s:29: Error: bad register name `%r12)' /tmp/ghc27286.s:30: Error: bad register name `%r12)' /tmp/ghc27286.s:31: Error: bad register name `%r12)' /tmp/ghc27286.s:32: Error: bad register name `%rax' /tmp/ghc27286.s:33: Error: bad register name `%r13)' /tmp/ghc27286.s:34: Error: bad register name `%rbp' /tmp/ghc27286.s:37: Error: bad register name `%rbx)' /tmp/ghc27286.s:38: Error: bad register name `%rbx)' /tmp/ghc27286.s:45: Error: bad register name `%rbp)' /tmp/ghc27286.s:46: Error: bad register name `%r14' /tmp/ghc27286.s:48: Error: bad register name `%rbp)' /tmp/ghc27286.s:49: Error: bad register name `%r13' ....
The list is quite long. I've truncated it.
Well, OK, the x386 version is running, but it won't compile GHC-6.4.2 and, moreover, it's not optimized for the HW. ;-)
Is there any way out, or what may I be doing wrong way?
It appears that somehow the assembler is being used in 32-bit mode, rather than 64-bit. I'm not sure why this happens. Perhaps your machine is set up to use a 32-bit build environment by default, rather than a 64-bit one? The fact that the x86 version works without any special options seems to support that. On my x86_64 box here, I have to give -m32 options to gcc to generate 32-bit code, for example. Cheers, Simon
Well, thanks for kicking. :-) Now, I have a 6.4.1 version compiling for 64bits. Nevertheless, if I try to build a 6.4.2 based on this ghc and 64bit gcc, I get this error during make (quite soon after make starts) - below my text. Is there again a problem in mixing of 32/64-bit versions or is there a principial problem? Any further kick is velcome :-) Thx and regards Dusan P.S. Curently produced executable by ghhc 6.4.1 has the following signature: a.out: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), stripped D. ------ /mnt/data/FLP/bin/ghc -H16m -O -cpp -Wall -fno-warn-name-shadowing -fno-warn-unused-matches -i../../lib/compat -ignore-package Cabal -Rghc-timing -c Version.hs -o Version.o -ohi Version.hi Version.hs:2:0: Warning: Definition but no type signature for `version' Version.hs:3:0: Warning: Definition but no type signature for `targetOS' Version.hs:4:0: Warning: Definition but no type signature for `targetARCH' In file included from /tmp/ghc24730.hc:4: /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:42:21: termios.h: not a file or directory /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:81:23: sys/timeb.h: not a file or directory In file included from /tmp/ghc24730.hc:4: /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:538: error: syntax error before "__hscore_lflag" /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:538: warning: "struct termios" declared inside parameter list /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:538: warning: its scope is only this definition or declaration, which is probably not what you want /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:538: warning: return type defaults to `int' /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h: In function `__hscore_lflag': /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:538: error: dereferencing pointer to incomplete type /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h: At top level: /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:541: error: syntax error before "tcflag_t" /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h: In function `__hscore_poke_lflag': /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:541: error: `ts' undeclared (first use in this function) /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:541: error: (Each undeclared identifier is reported only once /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:541: error: for each function it appears in.) /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:541: error: `t' undeclared (first use in this function) /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h: At top level: /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:544: warning: "struct termios" declared inside parameter list /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h: In function `__hscore_ptr_c_cc': /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:545: error: dereferencing pointer to incomplete type /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h: In function `__hscore_sizeof_termios': /mnt/data/FLP/lib/ghc-6.4.1/include/HsBase.h:551: error: invalid application of `sizeof' to incomplete type `termios' <<ghc: 56820992 bytes, 12 GCs, 2392741/4898280 avg/max bytes residency (3 samples), 20M in use, 0.00 INIT (0.00 elapsed), 0.18 MUT (0.45 elapsed), 0.18 GC (0.17 elapsed) :ghc>> make[4]: *** [Version.o] Error 1 make[3]: *** [boot] Error 2 make[2]: *** [boot] Error 1 make[1]: *** [boot] Error 1 make[1]: Leaving directory `/mnt/data/FLP/Downloads/ghc-6.4.2/ghc' make: *** [build] Error 1 Simon Marlow wrote:
Dusan Kolar wrote:
Hello all,
I've install "universal binary" for x86_64 of GHC 6.4.1. The installation was done on AMD dual core machine. Uname for the machine gives:
Linux <machine name> 2.6.16.5 #1 SMP Thu Apr 13 09:08:22 CEST 2006 x86_64 x86_64 x86_64 GNU/Linux
While ghci was running some tests well, the ghc ended compilation with a long list of errors starting like this:
Chasing modules from: queen-main Compiling QueensDK ( ./QueensDK.hs, ./QueensDK.o ) /tmp/ghc27286.s: Assembler messages: /tmp/ghc27286.s:26: Error: bad register name `%r12' /tmp/ghc27286.s:27: Error: bad register name `%r15' /tmp/ghc27286.s:29: Error: bad register name `%r12)' /tmp/ghc27286.s:30: Error: bad register name `%r12)' /tmp/ghc27286.s:31: Error: bad register name `%r12)' /tmp/ghc27286.s:32: Error: bad register name `%rax' /tmp/ghc27286.s:33: Error: bad register name `%r13)' /tmp/ghc27286.s:34: Error: bad register name `%rbp' /tmp/ghc27286.s:37: Error: bad register name `%rbx)' /tmp/ghc27286.s:38: Error: bad register name `%rbx)' /tmp/ghc27286.s:45: Error: bad register name `%rbp)' /tmp/ghc27286.s:46: Error: bad register name `%r14' /tmp/ghc27286.s:48: Error: bad register name `%rbp)' /tmp/ghc27286.s:49: Error: bad register name `%r13' ....
The list is quite long. I've truncated it.
Well, OK, the x386 version is running, but it won't compile GHC-6.4.2 and, moreover, it's not optimized for the HW. ;-)
Is there any way out, or what may I be doing wrong way?
It appears that somehow the assembler is being used in 32-bit mode, rather than 64-bit. I'm not sure why this happens. Perhaps your machine is set up to use a 32-bit build environment by default, rather than a 64-bit one? The fact that the x86 version works without any special options seems to support that.
On my x86_64 box here, I have to give -m32 options to gcc to generate 32-bit code, for example.
Cheers, Simon
participants (2)
-
Dusan Kolar -
Simon Marlow