physical-computation / sunflower-embedded-system-emulator

Sunflower Full-System Hardware Emulator and Physical System Simulator for Sensor-Driven Systems. Built-in architecture modeling of Hitachi SH (j-core), RISC-V, and more.
http://sflr.org
BSD 3-Clause "New" or "Revised" License
24 stars 215 forks source link

Sim make command #16

Open GeorginaBenson opened 6 years ago

GeorginaBenson commented 6 years ago

Ran make in sim and got the following error:

gcc -g -DSF_L_ENDIAN -Wall -g -m32 -O0 -c randgen.c In file included from /usr/include/features.h:447:0, from /usr/include/bits/libc-header-start.h:33, from /usr/include/math.h:27, from randgen.c:38: /usr/include/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h: No such file or directory

include <gnu/stubs-32.h>

       ^~~~~~~~~~~~~~~~

compilation terminated. make: *** [Makefile:79: randgen.o] Error 1

Having changed to correct HOST and SUNFLOWERROO

phillipstanleymarbell commented 6 years ago

As a temporary workaround (via @z-gu, paraphrased): "Install 32-bit libgcc: sudo sudo apt-get install gcc-multilib. It is likely that apt-get may report an error. In which case, the required library is still installed. However, this will make the apt-get package manager unusable due to a known Ubuntu bug. To fix this: Run sudo dpkg --remove libc6-amd64:i386 libc6-dev-amd64:i386 then run sudo apt-get -f install. Now apt-get should be usable again."

GeorginaBenson commented 6 years ago

I have a fedora laptop, so I installed gcc glibc-devel according to fedora this is the equivalent. However, now when I run make it says command not found

bison -t -v sf.y make: bison: Command not found make: *** [Makefile:103: sf.tab.c] Error 127

GeorginaBenson commented 6 years ago

Have now installed bison.

Make now runs bit with a lot of warnings:

bison -t -v sf.y sf.y:315.9-14: warning: symbol T_MACL redeclared [-Wother] %token T_MACL ^^^^^^ sf.y: warning: 2 nonterminals useless in grammar [-Wother] sf.y: warning: 4 rules useless in grammar [-Wother] sf.y:391.17-21: warning: nonterminal useless in grammar: ruimm [-Wother] %type ruimm ^^^^^ sf.y:392.17-21: warning: nonterminal useless in grammar: rsimm [-Wother] %type rsimm ^^^^^ sf.y:7917.19-7926.17: warning: rule useless in grammar [-Wother] ruimm : uimm ^ sf.y:7927.19-7931.17: warning: rule useless in grammar [-Wother] | rnd ^ sf.y:7934.19-7943.17: warning: rule useless in grammar [-Wother] rsimm : simm ^ sf.y:7944.19-7948.17: warning: rule useless in grammar [-Wother] | rnd ^ sf.y: warning: 104 shift/reduce conflicts [-Wconflicts-sr] sf.y: warning: 500 reduce/reduce conflicts [-Wconflicts-rr] sf.y:459.19-25: warning: rule useless in parser due to conflicts [-Wother] | dotfile ^^^^^^^ sf.y:460.19-27: warning: rule useless in parser due to conflicts [-Wother] | dotglobal ^^^^^^^^^ gcc -g -DSF_L_ENDIAN -Wall -g -m32 -O0 -c sf.tab.c -o sf.o ./mkmantex gawk > commands.tex gcc -g randgen.o arch-linux.o batt.o bit-utils.o decode-hitachi-sh.o dev7708.o devsim7708.o fault.o fdr.o machine-hitachi-sh.o main.o merror.o mmalloc.o mmu-hitachi-sh.o network-hitachi-sh.o op-hitachi-sh.o pau.o physics.o pic.o pipeline-hitachi-sh.o power.o syscalls.o tokenhandling.o sf.o -m32 -lm -lpthread -o sf

phillipstanleymarbell commented 6 years ago

This is a result of the -m32 flag which we currently require.