Skip to content

macOS troubleshooting

Anton Trunov edited this page Oct 8, 2021 · 6 revisions

macOS troubleshooting

VERSION issue, see here

If you are experiencing build failures on macOS with error messages like the following ones

path to file 'VERSION'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#    include version
             ^~~~~~~~~
             VERSION

or something like this

#=== ERROR while compiling scilla.~dev ========================================#
# context     2.1.0 | macos/x86_64 | ocaml-variants.4.11.1+flambda | pinned(git+file:///Users/anton/zilliqa/scilla#chick#cb64e3ea)
# path        ~/.opam/4.11.1/.opam-switch/build/scilla.~dev
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p scilla -j 7
# exit-code   1
# env-file    ~/.opam/log/scilla-62637-a031ca.env
# output-file ~/.opam/log/scilla-62637-a031ca.out
### output ###
# [...]
# In file included from /usr/local/include/boost/config.hpp:44:
# In file included from /usr/local/include/boost/config/detail/select_stdlib_config.hpp:24:
# /Users/anton/.opam/4.11.1/lib/ocaml/version:1:1: error: expected unqualified-id
# 4.11.1
# ^
# /Users/anton/.opam/4.11.1/lib/ocaml/version:3:3: error: invalid preprocessing directive
# # The version string is the first line of this file.
#   ^
# /Users/anton/.opam/4.11.1/lib/ocaml/version:4:3: error: invalid preprocessing directive
# # It must be in the format described in stdlib/sys.mli
#   ^
# 1 warning and 3 errors generated.

Then removing VERSION files from your opam switches should help:

find $(opam var --safe --strict root) -type f -name VERSION -exec rm {} \;

Note: the above command works for global switches only, if you are using a local switch, change the command accordingly.

Update: looks like this issue is fixed since OCaml 4.12.

OpenSSL-related build errors

If you see an error like the following one

/usr/local/Cellar/openssl@3/3.0.0/include/openssl/ec.h:174:1: note: 'EC_GROUP_clear_free'
      has been explicitly marked deprecated here
OSSL_DEPRECATEDIN_3_0 void EC_GROUP_clear_free(EC_GROUP *group);
...

you will need to install OpenSSL v1.1 as at the moment of writing Scilla does not support OpenSSL v3.0.

Clone this wiki locally