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
I encountered multiple issues while trying to install OCaml and OPAM on my Windows 10 system. Despite following the recommended steps, I faced several errors related to the installation of the OCaml base compiler and other dependencies. Below are the details of the steps I followed and the errors I encountered.
Steps to Reproduce:
Installed Cygwin with the follwing packages:
gcc-core
make
autoconf
automake
libtool
Added Cygwin's bin directory to the system PATH.
Installed OPAM and initialized it using:
opam init
Attempted to create a new OPAM switch with OCaml version 4.12.0:
opam switch create 4.12.0 --jobs=1
Encountered the following error during the switch creation:
configure: error: no acceptable C compiler found in $PATH
Error Logs:
=== ERROR while compiling ocaml-base-compiler.4.12.0 ========================= context 2.3.0 | win32/x86_64 | | https://opam.ocaml.org#3531767c50e60953b103a19f8a8a461a0d57fe77 path ~\AppData\Local\opam\4.12.0\.opam-switch\build\ocaml-base-compiler.4.12.0 command ~\AppData\Local\opam\4.12.0\.opam-switch\build\ocaml-base-compiler.4.12.0\./configure --prefix=C:\Users\User\AppData\Local\opam\4.12.0 -C exit-code 1 env-file ~\AppData\Local\opam\log\ocaml-base-compiler-13196-4a252b.env output-file ~\AppData\Local\opam\log\ocaml-base-compiler-13196-4a252b.out ### output ### [...] checking build system type... x86_64-pc-cygwin checking host system type... x86_64-pc-cygwin checking target system type... x86_64-pc-cygwin checking for ld... no checking for link... link checking how to print strings... printf checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in /cygdrive/c/Users/User/AppData/Local/opam/4.12.0/.opam-switch/build/ocaml-base-compiler.4.12.0': configure: error: no acceptable C compiler found in $PATH See config.log' for more details `
Additional Information:
Windows 10 OS
Cygwin installed with the required packages
OPAM version: 2.3.0
OCaml version attempted: 4.12.0
Expected Behavior: The OCaml base compiler and other dependencies should install successfully without errors.
Actual Behavior: The installation fails with errors indicating that no acceptable C compiler was found in the $PATH.
The text was updated successfully, but these errors were encountered:
The OCaml packages < 4.13 do not support Windows (yet). The support for Windows in opam-repository was only backported up to 4.13 (see #25861)
As a side note, installing Cygwin manually is not part of the recommended step. Which setup guide did you follow?
All that said, the incompatible compilers should probably have available: os != "win32" to avoid having that kind of error message and refuse to install those packages earlier. What do you think @dra27 ?
Description:
I encountered multiple issues while trying to install OCaml and OPAM on my Windows 10 system. Despite following the recommended steps, I faced several errors related to the installation of the OCaml base compiler and other dependencies. Below are the details of the steps I followed and the errors I encountered.
Steps to Reproduce:
Installed Cygwin with the follwing packages:
gcc-core
make
autoconf
automake
libtool
Added Cygwin's bin directory to the system PATH.
Installed OPAM and initialized it using:
opam init
Attempted to create a new OPAM switch with OCaml version 4.12.0:
opam switch create 4.12.0 --jobs=1
Encountered the following error during the switch creation:
configure: error: no acceptable C compiler found in $PATH
Error Logs:
=== ERROR while compiling ocaml-base-compiler.4.12.0 ========================= context 2.3.0 | win32/x86_64 | | https://opam.ocaml.org#3531767c50e60953b103a19f8a8a461a0d57fe77 path ~\AppData\Local\opam\4.12.0\.opam-switch\build\ocaml-base-compiler.4.12.0 command ~\AppData\Local\opam\4.12.0\.opam-switch\build\ocaml-base-compiler.4.12.0\./configure --prefix=C:\Users\User\AppData\Local\opam\4.12.0 -C exit-code 1 env-file ~\AppData\Local\opam\log\ocaml-base-compiler-13196-4a252b.env output-file ~\AppData\Local\opam\log\ocaml-base-compiler-13196-4a252b.out ### output ### [...] checking build system type... x86_64-pc-cygwin checking host system type... x86_64-pc-cygwin checking target system type... x86_64-pc-cygwin checking for ld... no checking for link... link checking how to print strings... printf checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in
/cygdrive/c/Users/User/AppData/Local/opam/4.12.0/.opam-switch/build/ocaml-base-compiler.4.12.0': configure: error: no acceptable C compiler found in $PATH Seeconfig.log' for more details
`Additional Information:
Windows 10 OS
Cygwin installed with the required packages
OPAM version: 2.3.0
OCaml version attempted: 4.12.0
Expected Behavior: The OCaml base compiler and other dependencies should install successfully without errors.
Actual Behavior: The installation fails with errors indicating that no acceptable C compiler was found in the $PATH.
The text was updated successfully, but these errors were encountered: