You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing opam via both pacman and through the curl command (NOTE: They were not both installed at the same time, I made sure to remove one before installing another), running opam init on both of them and updating the shell environment, when I run opam switch create 4.07.0 the process fails when compiling ocaml-base-compiler 4.07.0 , giving me the following output:
[ERROR] The compilation of ocaml-base-compiler.4.07.0 failed at "make -j1 world".
#=== ERROR while compiling ocaml-base-compiler.4.07.0 =========================#
# context 2.1.5 | linux/x86_64 | | https://opam.ocaml.org#6ed19e32
# path ~/.opam/4.07.0/.opam-switch/build/ocaml-base-compiler.4.07.0
# command ~/.opam/opam-init/hooks/sandbox.sh build make -j1 world
# exit-code 2
# env-file ~/.opam/log/ocaml-base-compiler-20872-850fd1.env
# output-file ~/.opam/log/ocaml-base-compiler-20872-850fd1.out
### output ###
# [...]
# /usr/bin/ld: main.o: in function `create_file_names':
# main.c:(.text+0x54d): warning: the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
# make[1]: Leaving directory '/home/Max/.opam/4.07.0/.opam-switch/build/ocaml-base-compiler.4.07.0/yacc'
# cp yacc/ocamlyacc boot/ocamlyacc
# make -C stdlib \
# COMPILER="../boot/ocamlc -use-prims ../byterun/primitives" all
# make[1]: Entering directory '/home/Max/.opam/4.07.0/.opam-switch/build/ocaml-base-compiler.4.07.0/stdlib'
# ../boot/ocamlrun ../boot/ocamlc -use-prims ../byterun/primitives -strict-sequence -absname -w +a-4-9-41-42-44-45-48 -g -warn-error A -bin-annot -nostdlib -safe-string -strict-formats -nopervasives -c camlinternalFormatBasics.mli
# Fatal error: exception Invalid_argument("Sys.getcwd not implemented")
# make[1]: *** [Makefile:237: camlinternalFormatBasics.cmi] Error 2
# make[1]: Leaving directory '/home/Max/.opam/4.07.0/.opam-switch/build/ocaml-base-compiler.4.07.0/stdlib'
# make: *** [Makefile:393: coldstart] Error 2
I have also tried running it with the -jobs=1 flag, but to no avail. Running it under root also doesn't help.
A Google search of the fatal error yields barely any results.
For debugging's sake, I also ran the same command with verbose logs
I remember a similar issue in the past, I think the issue was a missing -Wno-implicit-function-declaration in the CC invocation. Unfortunately, if that is the issue I cannot provide a solution, does it work if you try to use 4.08.1? Do you really need 4.07?
After installing opam via both pacman and through the curl command (NOTE: They were not both installed at the same time, I made sure to remove one before installing another), running
opam init
on both of them and updating the shell environment, when I runopam switch create 4.07.0
the process fails when compilingocaml-base-compiler 4.07.0
, giving me the following output:I have also tried running it with the
-jobs=1
flag, but to no avail. Running it under root also doesn't help.A Google search of the fatal error yields barely any results.
For debugging's sake, I also ran the same command with verbose logs
My laptop setup FWIW is as follows:
The text was updated successfully, but these errors were encountered: