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

Windows: opam fails to install conf-libcurl. #899

Open
yosefAlsuhaibani opened this issue Nov 22, 2024 · 3 comments
Open

Windows: opam fails to install conf-libcurl. #899

yosefAlsuhaibani opened this issue Nov 22, 2024 · 3 comments
Labels
bug Something isn't working upstream

Comments

@yosefAlsuhaibani
Copy link

related: ocaml/opam-repository#26894.

Using setup-ocaml@v3 on a windows GHA run: trying to install conf-libcurl fails with the error /usr/bin/sh: line 1: curl-config: command not found. SSH-ing into the runner (w/https://github.com/mxschmitt/action-tmate
) I was able to find curl-config under /d/cygwin/usr/x86_64-w64-mingw32/sys-root/mingw/bin, which makes me believe that setup-ocaml isn't configuring the PATH correctly.

I've reproduced this here: yosefAlsuhaibani/test-ocaml-setup-windows#4, where in the latest commit this run fails (https://github.com/yosefAlsuhaibani/test-ocaml-setup-windows/actions/runs/11978037743/job/33397219358) which is done by this workflow (https://github.com/yosefAlsuhaibani/test-ocaml-setup-windows/actions/runs/11978037743/workflow).

@yosefAlsuhaibani yosefAlsuhaibani changed the title Windows: opam fails to install conf-libcurl; curl-config: not found Windows: opam fails to install conf-libcurl. Nov 22, 2024
@tobil4sk
Copy link
Contributor

tobil4sk commented Dec 7, 2024

It looks like /usr/x86_64-w64-mingw32/sys-root/mingw/bin should be added to PATH by the mingw-w64-shims package: https://github.com/dra27/mingw-w64-shims/blob/3c4a82700d9b03443ad6f2927449f7a8f25a77cf/mingw-w64-shims.opam#L8, perhaps @dra27 might have some advice on what could be missing here?

@punchagan
Copy link

It looks like the problem here occurs when mingw-w64-shims package is recompiled (when conf-pkg-config, it's optional dependency is being added). mingw-w64-shims package is first being removed, which undoes the PATH changes done by that package, and conf-libcurl build step fails to find the curl-config tool in PATH.

A work around for this is to install run opam install conf-pkg-config before running opam install .

NOTE: You already seem to be running opam install --depext-only conf-pkg-config before opam install ., but this (--depext-only) doesn't trigger the recompile of the mingw-w64-shims package.

@smorimoto smorimoto added bug Something isn't working upstream labels Jan 16, 2025
@smorimoto
Copy link
Member

This looks like an issue that needs to be fixed further upstream.
@dra27 You may have some ideas to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

4 participants