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

Pyre installation from source fails when building. #908

Open
sarraga opened this issue Aug 11, 2024 · 5 comments
Open

Pyre installation from source fails when building. #908

sarraga opened this issue Aug 11, 2024 · 5 comments

Comments

@sarraga
Copy link

sarraga commented Aug 11, 2024

Pyre Bug

Bug description
When following the installation from source steps at https://pyre-check.org/docs/installation/ we get a compile-time error and installation aborts.

Reproduction steps

From my .history:

500 $ git clone https://github.com/facebook/pyre-check
501 git clone https://github.com/facebook/pyre-check
502 cd pyre-check/
503 ./scripts/setup.sh --local

Expected behavior
Compile should succeed and leave us with an installable binary.

Logs

sarraga@nagios:~/pyre-check$ ./scripts/setup.sh --local
[2024-08-11 16:29:05,068] [INFO] ['opam', '--version']
[2024-08-11 16:29:05,081] [INFO] Found opam version 2.0.8
[2024-08-11 16:29:05,081] [INFO] ['opam', 'init', '--bare', '--yes', '--disable-sandboxing', '--root', '/home/sarraga/.opam', 'default', 'https://opam.ocaml.org']
[NOTE] Will configure from built-in defaults.
[2024-08-11 16:29:21,413] [INFO] ['opam', 'update', '--root', '/home/sarraga/.opam']
[2024-08-11 16:29:41,567] [INFO] ['opam', 'switch', 'create', 'pyre-4.14.0', '--packages=ocaml-variants.4.14.0+options,ocaml-option-flambda', '--yes', '--root', '/home/sarraga/.opam']
[ERROR] The compilation of ocaml-variants failed at "/usr/bin/make -j1".

#=== ERROR while compiling ocaml-variants.4.14.0+options ======================#
# context              2.0.8 | linux/x86_64 | ocaml-option-flambda.1 | https://opam.ocaml.org#0f4d0ee5b69b496a4e26f305891c31400f0b4b5f
# path                 ~/.opam/pyre-4.14.0/.opam-switch/build/ocaml-variants.4.14.0+options
# command              /usr/bin/make -j1
# exit-code            2
# env-file             ~/.opam/log/ocaml-variants-29426-0325cb.env
# output-file          ~/.opam/log/ocaml-variants-29426-0325cb.out
### output ###
# signals_osdep.h:33:57: error: ‘REG_R15’ undeclared (first use in this function)
# [...]
#       |                                                         ^~~~~~~
# signals_nat.c:228:39: note: in expansion of macro ‘CONTEXT_YOUNG_PTR’
#   228 |     Caml_state->young_ptr = (value *) CONTEXT_YOUNG_PTR;
#       |                                       ^~~~~~~~~~~~~~~~~
# make[3]: *** [Makefile:366: signals_nat.n.o] Error 1
# make[3]: Leaving directory '/home/sarraga/.opam/pyre-4.14.0/.opam-switch/build/ocaml-variants.4.14.0+options/runtime'
# make[2]: *** [Makefile:826: makeruntimeopt] Error 2
# make[2]: Leaving directory '/home/sarraga/.opam/pyre-4.14.0/.opam-switch/build/ocaml-variants.4.14.0+options'
# make[1]: *** [Makefile:249: opt.opt] Error 2
# make[1]: Leaving directory '/home/sarraga/.opam/pyre-4.14.0/.opam-switch/build/ocaml-variants.4.14.0+options'
# make: *** [Makefile:312: world.opt] Error 2

[2024-08-11 16:32:22,051] [INFO] Command: ['opam', 'switch', 'create', 'pyre-4.14.0', '--packages=ocaml-variants.4.14.0+options,ocaml-option-flambda', '--yes', '--root', '/home/sarraga/.opam'] returned non zero exit code.
stdout:
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ocaml-config.2/gen_ocaml_config.ml.in] downloaded from https://opam.ocaml.org/cache
[ocaml-config.2/ocaml-config.install] downloaded from https://opam.ocaml.org/cache
[ocaml-variants.4.14.0+options] downloaded from cache at https://opam.ocaml.org/cache
[ocaml-variants.4.14.0+options/ocaml-variants.install] downloaded from https://opam.ocaml.org/cache

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base
∗ installed host-arch-x86_64.1
∗ installed host-system-other.1
∗ installed ocaml-option-flambda.1


<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed

Please run your reproduction steps followed by pyre rage > pyre_rage.log, and upload the file here:

Additional context
Add any other context about the problem here. (like dependencies in your venv, third party stub files being used, overall goals, etc.)

@connernilsen
Copy link
Contributor

Hey @sarraga, when you run opam switch list, what do you see?

@sarraga
Copy link
Author

sarraga commented Aug 13, 2024

sarraga@nagios:~/pyre-check$ opam switch list
#  switch  compiler  description
sarraga@nagios:~/pyre-check$

@connernilsen
Copy link
Contributor

Interesting, it looks like the OCaml compiler can't be compiled for you.

See if you run opam switch create pyre-4.14.0 4.14.0. It might work with that (using a slightly different package than what the setup script uses), but if not, then you'll probably have to post on the OCaml forum and get help from OCaml developers and those who really know what's going on here.

Let me know how it goes when you run the command above.

@sarraga
Copy link
Author

sarraga commented Aug 14, 2024 via email

@connernilsen
Copy link
Contributor

Yeah, sorry @sarraga. I'm not familiar with the internals of the OCaml compiler, so I don't be able to help here. Good luck, and let me know if you have any other issues once you get that working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants