Open jepify opened 1 year ago
Hi @jepify, it looks like Watchman hasn't been installed according to the logs and your setup steps. You can try to install it with Sorry, I misread what was going on here. We're discussing this internally to get a better idea of what's going on here.brew install watchman
or with the official installation instructions.
When will there be progress?
Sorry, this totally fell off my radar. Let me bring this back up to the team and see what they think. In the meantime, we released a new version of Pyre, so try updating to that and let me know if it helps.
Sorry, this totally fell off my radar. Let me bring this back up to the team and see what they think. In the meantime, we released a new version of Pyre, so try updating to that and let me know if it helps.
I try it in new version of Pyre and it still occurs error.
So it looks like the issue is that an x86_64 executable is being run in an arm64 architecture, which are incompatible. The best case solution here is that we need to push a new release with an arm64 build, but we unfortunately don't have the infrastructure to do that at the moment. We'll begin to look into doing that so we can start publishing for more platforms.
My recommendation at the moment is to try building from source in Docker yourself. Let me know if you have any questions or issues with that, and sorry that we don't have an easier solution for you at the moment.
when building from source in an linux/arm64 Docker container,I encountered the following error, any help is appreciated.
$ ./scripts/setup.sh --local
[2024-04-09 02:48:31,252] [INFO] ['opam', 'switch', 'set', '4.14.0', '--root', '/home/opam/.opam']
[2024-04-09 02:48:32,900] [INFO] Activating opam
[2024-04-09 02:48:32,901] [INFO] ['opam', 'env', '--yes', '--switch', '4.14.0', '--root', '/home/opam/.opam', '--set-root', '--set-switch']
[2024-04-09 02:48:32,929] [INFO] OPAMROOT="/home/opam/.opam"
[2024-04-09 02:48:32,929] [INFO] OPAMSWITCH="4.14.0"
[2024-04-09 02:48:32,929] [INFO] OPAM_SWITCH_PREFIX="/home/opam/.opam/4.14.0"
[2024-04-09 02:48:32,929] [INFO] CAML_LD_LIBRARY_PATH="/home/opam/.opam/4.14.0/lib/stublibs:/home/opam/.opam/4.14.0/lib/ocaml/stublibs:/home/opam/.opam/4.14.0/lib/ocaml"
[2024-04-09 02:48:32,929] [INFO] OCAML_TOPLEVEL_PATH="/home/opam/.opam/4.14.0/lib/toplevel"
[2024-04-09 02:48:32,930] [INFO] MANPATH=":/home/opam/.opam/4.14.0/man"
[2024-04-09 02:48:32,930] [INFO] PATH="/home/opam/.opam/4.14.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
[2024-04-09 02:48:32,930] [INFO] ['opam', 'install', '--yes', 'base64.3.5.0', 'core.v0.15.1', 'core_unix.v0.15.2', 're2.v0.15.0', 'dune.3.4.1', 'yojson.2.0.2', 'ppx_deriving_yojson.3.7.0', 'ounit.2.2.6', 'menhir.20220210', 'lwt.5.6.1', 'lwt_ppx.2.1.0', 'ounit2-lwt.2.2.6', 'pyre-ast.0.1.8', 'mtime.1.4.0']
[ERROR] The compilation of ocaml_intrinsics failed at "/home/opam/.opam/4.14.0/bin/dune build -p ocaml_intrinsics -j 63".
#=== ERROR while compiling ocaml_intrinsics.v0.15.2 ===========================#
# context 2.0.10 | linux/arm64 | ocaml-base-compiler.4.14.0 | git+https://mirrors.sjtug.sjtu.edu.cn/git/opam-repository.git
# path ~/.opam/4.14.0/.opam-switch/build/ocaml_intrinsics.v0.15.2
# command ~/.opam/4.14.0/bin/dune build -p ocaml_intrinsics -j 63
# exit-code 1
# env-file ~/.opam/log/ocaml_intrinsics-22-041a[19](https://scsdev.antiy.cn/sast/pyre-check/-/jobs/35015#L19).env
# output-file ~/.opam/log/ocaml_intrinsics-22-041a19.out
### output ###
# File "src/dune", line 2, characters 46-55:
# 2 | (c_names int_stubs float_stubs perfmon_stubs crc_stubs ext_pointer_stubs
# ^^^^^^^^^
# (cd _build/default/src && /usr/bin/gcc -std=gnu99 -O2 -fno-strict-aliasing -fwrapv -fno-builtin-memcmp -pthread -fPIC -D_FILE_OFFSET_BITS=64 -std=gnu99 -O2 -fno-strict-aliasing -fwrapv -fno-builtin-memcmp -pthread -fPIC -g -I /home/opam/.opam/4.14.0/lib/ocaml -o crc_stubs.o -c crc_stubs.c)
# crc_stubs.c: In function 'crc64':
# crc_stubs.c:16:2: error: #error "Target not supported"
# #error "Target not supported"
# ^
# (cd _build/default/src && /usr/bin/gcc -std=gnu99 -O2 -fno-strict-aliasing -fwrapv -fno-builtin-memcmp -pthread -fPIC -D_FILE_OFFSET_BITS=64 -std=gnu99 -O2 -fno-strict-aliasing -fwrapv -fno-builtin-memcmp -pthread -fPIC -g -I /home/opam/.opam/4.14.0/lib/ocaml -o prefetch_stubs.o -c prefetch_stubs.c)
# prefetch_stubs.c: In function 'caml_pause_hint':
# prefetch_stubs.c:271:2: warning: #warning "This target does not support PAUSE hints, emit NOP instead." [-Wcpp]
# #warning "This target does not support PAUSE hints, emit NOP instead."
# ^
The former state can be restored with:
opam switch import "/home/opam/.opam/4.14.0/.opam-switch/backup/state-[20](https://scsdev.antiy.cn/sast/pyre-check/-/jobs/35015#L20)240409024834.export"
Traceback (most recent call last):
File "/builds/sast/pyre-check/./scripts/setup.py", line 347, in <module>
setup(Setup)
File "/builds/sast/pyre-check/./scripts/setup.py", line 339, in setup
runner.full_setup(
File "/builds/sast/pyre-check/./scripts/setup.py", line 241, in full_setup
] = self.set_opam_switch_and_install_dependencies()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builds/sast/pyre-check/./scripts/setup.py", line 225, in set_opam_switch_and_install_dependencies
self.run(
File "/builds/sast/pyre-check/./scripts/setup.py", line 279, in run
output = subprocess.check_output(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['opam', 'install', '--yes', 'base64.3.5.0', 'core.v0.15.1', 'core_unix.v0.15.2', 're2.v0.15.0', 'dune.3.4.1', 'yojson.2.0.2', 'ppx_deriving_yojson.3.7.0', 'ounit.2.2.6', 'menhir.20220[21](https://scsdev.antiy.cn/sast/pyre-check/-/jobs/35015#L21)0', 'lwt.5.6.1', 'lwt_ppx.2.1.0', 'ounit2-lwt.2.2.6', 'pyre-ast.0.1.8', 'mtime.1.4.0']' returned non-zero exit status 31.
Set the container platform to be amd64: https://stackoverflow.com/questions/65612411/forcing-docker-to-use-linux-amd64-platform-by-default-on-macos
And you can set the "Use Rosetta for x86_64/amd64 emulation on Apple Silicon" option under in docker desktop -> settings -> general, which hopefully makes it faster.
Pyre Bug
Bug description Running pyre inside a Linux Docker container fails.
Reproduction steps
inside container:
Expected behavior Once .pyre_configuration has been created the binary fails to execute Expected type checking to start
Logs Please include any relevant logs here:
Please run your reproduction steps followed by
pyre rage > pyre_rage.log
, and upload the file here:pyre_rage.log:
Additional context