rems-project / sail-arm

Sail version of Arm ISA definition, currently for Armv9.3-A, and with the previous Sail Armv8.5-A model
Other
71 stars 18 forks source link

Cannot build #13

Open blacktop opened 3 years ago

blacktop commented 3 years ago
~/Developer/Github/rems-project/sail-arm/arm-v8.5-a master 6m 24s
❯ make aarch64
gcc -O2 aarch64.c /lib/*.c -DHAVE_SETCONFIG -lgmp -lz -I /lib/ -o aarch64
clang: error: no such file or directory: '/lib/*.c'
make: *** [aarch64] Error 1
Alasdair commented 3 years ago

I think the Makefile expects the SAIL_DIR environment variable to be set to find the Sail library files. If you installed Sail via opam it should be at opam var sail:share. I'll look into having the Makefile pick that up automatically if present.

blacktop commented 3 years ago

Thank you for the VERY fast response! Here's my next road bump. Is this project now out of sync with sail ?

❯ make aarch64
Makefile:7: SAIL_DIR is /Users/blacktop/.opam/default/share/sail
gcc -O2 aarch64.c /Users/blacktop/.opam/default/share/sail/lib/*.c -DHAVE_SETCONFIG -lgmp -lz -I /Users/blacktop/.opam/default/share/sail/lib/ -o aarch64
In file included from aarch64.c:1:
/Users/blacktop/.opam/default/share/sail/lib/sail.h:8:10: fatal error: 'gmp.h' file not found
#include <gmp.h>
         ^~~~~~~
1 error generated.
In file included from /Users/blacktop/.opam/default/share/sail/lib/elf.c:7:
In file included from /Users/blacktop/.opam/default/share/sail/lib/rts.h:8:
/Users/blacktop/.opam/default/share/sail/lib/sail.h:8:10: fatal error: 'gmp.h' file not found
#include <gmp.h>
         ^~~~~~~
1 error generated.
In file included from /Users/blacktop/.opam/default/share/sail/lib/rts.c:5:
/Users/blacktop/.opam/default/share/sail/lib/sail.h:8:10: fatal error: 'gmp.h' file not found
#include <gmp.h>
         ^~~~~~~
1 error generated.
In file included from /Users/blacktop/.opam/default/share/sail/lib/sail.c:10:
/Users/blacktop/.opam/default/share/sail/lib/sail.h:8:10: fatal error: 'gmp.h' file not found
#include <gmp.h>
         ^~~~~~~
1 error generated.
In file included from /Users/blacktop/.opam/default/share/sail/lib/sail_failure.c:1:
In file included from /Users/blacktop/.opam/default/share/sail/lib/sail_failure.h:4:
/Users/blacktop/.opam/default/share/sail/lib/sail.h:8:10: fatal error: 'gmp.h' file not found
#include <gmp.h>
         ^~~~~~~
1 error generated.
make: *** [aarch64] Error 1
Alasdair commented 3 years ago

Do you have libgmp?

I didn't think my response was that fast - I had review deadlines for several conferences that were keeping me busy over the weekend, I should be more responsive now.

blacktop commented 2 years ago
❯ brew list | grep gmp
gmp
blacktop commented 2 years ago

Adding -I/opt/homebrew/include -L/opt/homebrew/lib to the gcc make targets worked.