oriansj/stage0

Support freebsd?

chaoticryptidz opened this issue · 2 comments

Currently running make all on freebsd does not work.

cc -ggdb -DVM32=true -Dtty_lib=true -shared -Wl,-soname,libvm.so -o libvm.so -fPIC wrapper.c vm_instructions.c vm_decode.c tty.c
cc -ggdb -DVM32=true -Dtty_lib=true vm.c vm_instructions.c vm_decode.c tty.c -o bin/vm
./bin/vm --rom seed/NATIVE/knight/hex0-seed --tape_01 stage0/stage0_monitor.hex0 --tape_02 roms/stage0_monitor
gmake: *** [makefile:50: stage0_monitor] Segmentation fault (core dumped)

GDB Output

(gdb) run --rom seed/NATIVE/knight/hex0-seed --tape_01 stage0/stage0_monitor.hex0 --tape_02 roms/stage0_monitor
Starting program: /usr/home/kitteh/ctest/stage0/bin/vm --rom seed/NATIVE/knight/hex0-seed --tape_01 stage0/stage0_monitor.hex0 --tape_02 roms/stage0_monitor

Program received signal SIGSEGV, Segmentation fault.
0x00000008003ef9b2 in ?? () from /lib/libc.so.7
(gdb) bt
#0  0x00000008003ef9b2 in ?? () from /lib/libc.so.7
#1  0x00000008003ef94b in fseek () from /lib/libc.so.7
#2  0x0000000000205309 in load_program (vm=0x800650000, rom_name=0x7fffffffecc3 "seed/NATIVE/knight/hex0-seed") at vm.c:28
#3  0x00000000002056b8 in main (argc=7, argv=0x7fffffffe9d0) at vm.c:150

Was due to submodules not being cloned.