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

Issues with Installing OCaml and OPAM on Windows 10 #27156

Open
SitaGanesh opened this issue Dec 20, 2024 · 1 comment
Open

Issues with Installing OCaml and OPAM on Windows 10 #27156

SitaGanesh opened this issue Dec 20, 2024 · 1 comment

Comments

@SitaGanesh
Copy link

SitaGanesh commented Dec 20, 2024

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:

  1. Installed Cygwin with the following packages:
    • gcc-core
    • make
    • autoconf
    • automake
    • libtool
  2. Added Cygwin's bin directory to the system PATH.
  3. Installed OPAM and initialized it using:
    `opam init`
    
  4. Attempted to create a new OPAM switch with OCaml version 4.12.0:
    opam switch create 4.12.0 --jobs=1
  5. 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.

@punchagan
Copy link
Contributor

@SitaGanesh Thanks for reporting the issue. It may be better to report it on the opam GitHub repository, possibly with more debug information like your $PATH, etc.

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