goblint / cil

C Intermediate Language
https://goblint.github.io/cil/
Other
40 stars 16 forks source link

compiling fails on Apple M1 #44

Closed vogler closed 3 years ago

vogler commented 3 years ago
$ make setup
...
#=== ERROR while compiling goblint-cil.1.8.1 ==================================#
# context     2.0.8 | macos/arm64 | ocaml-base-compiler.4.12.0 | pinned(git+https://github.com/goblint/cil.git#208d2a2f9e51a42ee0a036f4587624ac7ac23ccb#208d2a2f)
# path        ~/goblint/analyzer/_opam/.opam-switch/build/goblint-cil.1.8.1
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p goblint-cil -j 7 @install
# exit-code   1
# env-file    ~/.opam/log/goblint-cil-6320-a6f474.env
# output-file ~/.opam/log/goblint-cil-6320-a6f474.out
### output ###
#    ocamlyacc src/frontc/cparser.{ml,mli}
# 1 shift/reduce conflict.
#    configure src/cilversion.ml,src/machdep.ml (exit 1)
# (cd _build/default && ./configure)
# checking build system type... Invalid configuration `arm64-apple-darwin20.5.0': machine `arm64-apple' not recognized
# configure: error: /bin/sh ./config.sub arm64-apple-darwin20.5.0 failed
vogler commented 3 years ago

All these autotools-generated files are pretty outdated: https://github.com/goblint/cil/blob/208d2a2f9e51a42ee0a036f4587624ac7ac23ccb/config.sub#L7 and therefore don't support any arm64 yet.

It also seems like some of them should be generated and not tracked in git: https://stackoverflow.com/questions/3290908/which-files-generated-by-autotools-should-i-keep-in-version-control-repository

vogler commented 3 years ago

I only noticed this since I got a replacement for my M1 Macbook Air. On the previous one (same, fresh setup) I compiled goblint at this commit and it did not complain installing goblint-cil. But #39 is older than that, and after only #42 was merged?