Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install on MAC #31

Open
mimoo opened this issue May 17, 2021 · 6 comments
Open

Can't install on MAC #31

mimoo opened this issue May 17, 2021 · 6 comments
Labels
forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system.

Comments

@mimoo
Copy link

mimoo commented May 17, 2021

Hey! I started getting this error that I didn't get previously:

#=== ERROR while compiling re2.v0.12.1 ========================================#
# context     2.0.8 | macos/x86_64 | ocaml-variants.4.07.1+logoom | https://opam.ocaml.org#4ff0fe2a
# path        ~/Work/official_mina/_opam/.opam-switch/build/re2.v0.12.1
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p re2 -j 11
# exit-code   1
# env-file    ~/.opam/log/re2-17770-361372.env
# output-file ~/.opam/log/re2-17770-361372.out
### output ###
# # It must be in the format described in stdlib/sys.mli
# [...]
# In file included from stubs.cpp:1:
# In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:276:
# In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__bit_reference:15:
# In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:643:
# In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:671:
# In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/new:93:
# /Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:1:1: error: expected unqualified-id
# 4.07.1
# ^
# fatal error: too many errors emitted, stopping now [-ferror-limit=]
# 20 errors generated.

I'm still investigating, I'm not sure if the error is on my side or not.

@mimoo
Copy link
Author

mimoo commented May 17, 2021

full output:

      ocamlc src/.re2.objs/byte/re2__Regex.{cmo,cmt}
File "src/regex.ml", line 145, characters 25-46:
Warning 52: Code should not depend on the actual values of
this constructor's arguments. They are only for information
and may change in future versions. (See manual section 9.5)
    ocamlopt src/.re2.objs/native/re2__Regex.{cmx,o}
File "src/regex.ml", line 145, characters 25-46:
Warning 52: Code should not depend on the actual values of
this constructor's arguments. They are only for information
and may change in future versions. (See manual section 9.5)
          cc src/stubs.o (exit 1)
(cd _build/default/src && /usr/bin/cc -O2 -fno-strict-aliasing -fwrapv -I re2_c/libre2 -g -I /Users/davidwong/Work/official_mina/_opam/lib/ocaml -I /Users/davidwong/Work/official_mina/_opam/lib/base -I /Users/davidwong/Work/official_mina/_opam/lib/base/caml -I /Users/davidwong/Work/official_mina/_opam/lib/base/md5 -I /Users/davidwong/Work/official_mina/_opam/lib/base/shadow_stdlib -I /Users/davidwong/Work/official_mina/_opam/lib/base_bigstring -I /Users/davidwong/Work/official_mina/_opam/lib/base_quickcheck -I /Users/davidwong/Work/official_mina/_opam/lib/bin_prot -I /Users/davidwong/Work/official_mina/_opam/lib/bin_prot/shape -I /Users/davidwong/Work/official_mina/_opam/lib/core_kernel -I /Users/davidwong/Work/official_mina/_opam/lib/core_kernel/base_for_tests -I /Users/davidwong/Work/official_mina/_opam/lib/core_kernel/rope -I /Users/davidwong/Work/official_mina/_opam/lib/fieldslib -I /Users/davidwong/Work/official_mina/_opam/lib/jane-street-headers -I /Users/davidwong/Work/official_mina/_opam/lib/parsexp -I /Users/davidwong/Work/official_mina/_opam/lib/ppx_assert/runtime-lib -I /Users/davidwong/Work/official_mina/_opam/lib/ppx_bench/runtime-lib -I /Users/davidwong/Work/official_mina/_opam/lib/ppx_compare/runtime-lib -I /Users/davidwong/Work/official_mina/_opam/lib/ppx_enumerate/runtime-lib -I /Users/davidwong/Work/official_mina/_opam/lib/ppx_expect/collector -I /Users/davidwong/Work/official_mina/_opam/lib/ppx_expect/common -I /Users/davidwong/Work/official_mina/_opam/lib/ppx_expect/config -I /Users/davidwong/Work/official_mina/_opam/lib/ppx_hash/runtime-lib -I /Users/davidwong/Work/official_mina/_opam/lib/ppx_inline_test/config -I /Users/davidwong/Work/official_mina/_opam/lib/ppx_inline_test/runtime-lib -I /Users/davidwong/Work/official_mina/_opam/lib/ppx_module_timer/runtime -I /Users/davidwong/Work/official_mina/_opam/lib/ppx_sexp_conv/runtime-lib -I /Users/davidwong/Work/official_mina/_opam/lib/sexplib -I /Users/davidwong/Work/official_mina/_opam/lib/sexplib0 -I /Users/davidwong/Work/official_mina/_opam/lib/splittable_random -I /Users/davidwong/Work/official_mina/_opam/lib/stdio -I /Users/davidwong/Work/official_mina/_opam/lib/time_now -I /Users/davidwong/Work/official_mina/_opam/lib/typerep -I /Users/davidwong/Work/official_mina/_opam/lib/variantslib -I re2_c -o stubs.o -c stubs.cpp)
In file included from stubs.cpp:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:276:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__bit_reference:14:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/bit:58:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:105:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:417:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:37:
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:1:1: error: expected unqualified-id
4.07.1
^
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:3:3: error: invalid preprocessing directive
# The version string is the first line of this file.
  ^
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:4:3: error: invalid preprocessing directive
# It must be in the format described in stdlib/sys.mli
  ^
In file included from stubs.cpp:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:276:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__bit_reference:14:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/bit:58:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:105:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:418:
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:1:1: error: expected unqualified-id
4.07.1
^
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:3:3: error: invalid preprocessing directive
# The version string is the first line of this file.
  ^
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:4:3: error: invalid preprocessing directive
# It must be in the format described in stdlib/sys.mli
  ^
In file included from stubs.cpp:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:276:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__bit_reference:14:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/bit:58:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/limits:121:
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:1:1: error: expected unqualified-id
4.07.1
^
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:3:3: error: invalid preprocessing directive
# The version string is the first line of this file.
  ^
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:4:3: error: invalid preprocessing directive
# It must be in the format described in stdlib/sys.mli
  ^
In file included from stubs.cpp:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:276:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__bit_reference:14:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/bit:60:
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:1:1: error: expected unqualified-id
4.07.1
^
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:3:3: error: invalid preprocessing directive
# The version string is the first line of this file.
  ^
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:4:3: error: invalid preprocessing directive
# It must be in the format described in stdlib/sys.mli
  ^
In file included from stubs.cpp:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:276:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__bit_reference:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:642:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/utility:205:
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:1:1: error: expected unqualified-id
4.07.1
^
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:3:3: error: invalid preprocessing directive
# The version string is the first line of this file.
  ^
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:4:3: error: invalid preprocessing directive
# It must be in the format described in stdlib/sys.mli
  ^
In file included from stubs.cpp:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:276:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__bit_reference:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:643:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:668:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/typeinfo:60:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/exception:83:
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:1:1: error: expected unqualified-id
4.07.1
^
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:3:3: error: invalid preprocessing directive
# The version string is the first line of this file.
  ^
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:4:3: error: invalid preprocessing directive
# It must be in the format described in stdlib/sys.mli
  ^
In file included from stubs.cpp:1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:276:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__bit_reference:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:643:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:671:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/new:93:
/Users/davidwong/Work/official_mina/_opam/lib/ocaml/version:1:1: error: expected unqualified-id
4.07.1
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

@github-iron github-iron added the forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system. label May 18, 2021
@dwang20151005
Copy link
Contributor

dwang20151005 commented May 18, 2021 via email

@xclerc
Copy link
Contributor

xclerc commented May 19, 2021

The warning issue is probably a red herring as I expect warnings to be non
fatal when the package is installed through opam.

The version issue looks like another instance of ocaml/ocaml#10410 which
is fixed by ocaml/ocaml#9895, but I really doubt it will be backported to 4.07.1.
One can possibly fix it manually by deleting the offending version file (e.g.
with something like rm $(ocamlc -where)/lib/ocaml/version).

@mimoo
Copy link
Author

mimoo commented May 19, 2021

Indeed we are on an old version... issue might resolve itself when we bump. Thanks!

@mimoo
Copy link
Author

mimoo commented May 19, 2021

The proposed fix worked FWIW! (except it's rm $(ocamlc -where)/version)

Is removing that file going to break anything else btw :D?

@xclerc
Copy link
Contributor

xclerc commented May 21, 2021

Indeed, copy/paste mistake; sorry for that.

Given that the file used to be installed, I can imagine some tools
trying to read it, but that does not sound very likely.

facebook-github-bot pushed a commit to facebook/pyre-check that referenced this issue Jul 22, 2021
Summary:
While working on pulling `pyre-ast` in as a dependency, I noticed that our opamcake build is failing for package `re2`: https://www.internalfb.com/intern/sandcastle/log/?instance_id=457949769&step_id=4706069902&step_index=3&name=Build

Apparently this is caused by a [known bug](janestreet/re2#31) in OCaml version < 4.12 on MacOS. As the linked page mentioned, it is unlikely that the patch will be backported to prior version of OCaml. The best workaround we have atm is to either upgrade to 4.12 (which may lead to a perf regression that needs to be investigated first), or remove the extra `version` file ourselves manually. This diff takes the latter approach which is easier to do atm.

Reviewed By: pradeep90

Differential Revision: D29838284

fbshipit-source-id: c49a077accf31a930f974dd0c7a9775762709247
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system.
Projects
None yet
Development

No branches or pull requests

4 participants