avadhpatel / marss

PTLsim and QEMU based Computer Architecture Research Simulator
http://www.marss86.org
128 stars 63 forks source link

Compiling with g++ 4.6.3 and kernel 3.13 doesn't work #43

Open papamoose opened 9 years ago

papamoose commented 9 years ago

papamoose@grackle:~/grackle/marss$ cat /proc/cpuinfo | grep 'model name' | head -n1 model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz

papamoose@grackle:~/grackle$ uname -a Linux grackle 3.13.0-34-generic #60~precise1-Ubuntu SMP Wed Aug 13 15:55:33 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

papamoose@grackle:~/grackle$ gcc --version gcc (Ubuntu/Linaro 4.6.4-1ubuntu1~12.04) 4.6.4

...

papamoose@grackle:~/grackle$ git clone https://github.com/avadhpatel/marss.git Cloning into 'marss'... remote: Counting objects: 11798, done. remote: Total 11798 (delta 0), reused 0 (delta 0) Receiving objects: 100% (11798/11798), 14.47 MiB | 4.39 MiB/s, done. Resolving deltas: 100% (7980/7980), done.

papamoose@grackle:~/grackle$ cd marss/

papamoose@grackle:~/grackle/marss$ scons -Q running with -j9 Machine 'shared_l2' requires minimum of 2 contexts while you are compiling with 1 contexts. Skipping this machine 'shared_l2'. Machine 'ooo_2_th' requires minimum of 2 contexts while you are compiling with 1 contexts. Skipping this machine 'ooo_2_th'. Machine 'moesi_private_L2' requires minimum of 2 contexts while you are compiling with 1 contexts. Skipping this machine 'moesi_private_L2'. Machine 'private_L2' requires minimum of 2 contexts while you are compiling with 1 contexts. Skipping this machine 'private_L2'. Plugins found : Creating ==> ptlsim/build/cache/cacheTypes.h Creating ==> ptlsim/build/cache/cacheTypes.cpp Creating ==> ptlsim/build/core/atom-core/atom_atom.h Compiling :: ptlsim/build/core/basecore.cpp ==> ptlsim/build/core/basecore.o Compiling :: ptlsim/build/core/branchpred.cpp ==> ptlsim/build/core/branchpred.o Creating ==> ptlsim/build/core/ooo-core/ooo_ooo.h Creating ==> ptlsim/build/core/ooo-core/ooo_ooo_2.h Creating ==> ptlsim/build/core/ooo-core/ooo_xeon.h Compiling :: ptlsim/build/lib/bson/bson.c ==> ptlsim/build/lib/bson/bson.o Compiling :: ptlsim/build/core/atom-core/atomcore.cpp ==> ptlsim/build/core/atom-core/atomcore_atom.o ... lots of things compiling ... until /tmp/cc5fH3VH.s: Assembler messages: /tmp/cc5fH3VH.s:2440: Error: no such instruction: vfnmadd312sd 56(%rsp),%xmm0,%xmm1' /tmp/cc5fH3VH.s:15318: Error: no such instruction:vfmadd312sd .LC1(%rip),%xmm1,%xmm0' scons: *\ [qemu/target-i386/op_helper.o] Error 1


Yet it compiles fine on a system with the following specs:

papamoose@hester:~$ cat /proc/cpuinfo | grep 'model name' | head -n1 model name : Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz

papamoose@hester:~$ uname -a Linux hester 3.8.0-30-generic #44~precise1-Ubuntu SMP Fri Aug 23 18:32:41 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

papamoose@hester:~$ gcc --version gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 ...

This (https://www.mail-archive.com/darktable-devel@lists.sourceforge.net/msg04714.html) seems to be a similar issue.

Not all is lost though. I happen to have g++-4.8 installed on all my systems as well, so I set the line: 'base_env['CXX'] = "g++"' to 'base_env['CXX'] = "g++-4.8"' and it seems to have compiled, though with a lot more warnings.

EDIT: Using g++-4.8 does seem to do the trick.