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: "ERROR while compiling opam-depext.1.2.3" #850

Closed
nmote opened this issue Aug 16, 2024 · 3 comments
Closed

Windows: "ERROR while compiling opam-depext.1.2.3" #850

nmote opened this issue Aug 16, 2024 · 3 comments

Comments

@nmote
Copy link

nmote commented Aug 16, 2024

opam-depext 1.2.3 was released today. Since then, we have been consistently encountering failures when using this action on Windows. Here's the beginning of our GitHub Actions config:

jobs:
  job:
    defaults:
      run:
        shell: bash
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v3
        with:
          lfs: true
          submodules: true
      - uses: ocaml/setup-ocaml@v2
        with:
          ocaml-compiler: "4.14"
          opam-local-packages: dont_install_local_packages.opam
          opam-repositories: |
            opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset
            default: https://github.com/ocaml/opam-repository.git

And here is an excerpt of the log failure from the setup-ocaml step:

sh -ex shell/build.sh
+ ocamlc -I src_ext/lib unix.cma cmdliner.cma -o opam-depext $'depext.ml\r'
don't know what to do with depext.ml
Usage: ocamlc <options> <files>
Try 'ocamlc --help' for more information.
  -a  Build a library
  -alert <list>  Enable or disable alerts according to <list>:
        +<alertname>  enable alert <alertname>
        -<alertname>  disable alert <alertname>
        ++<alertname> treat <alertname> as fatal error
        --<alertname> treat <alertname> as non-fatal
        @<alertname>  enable <alertname> and treat it as fatal error
    <alertname> can be 'all' to refer to all alert names

Perhaps this action could pin to the previous version of opam-depext until this is resolved?

@nmote
Copy link
Author

nmote commented Aug 16, 2024

I've just realized that we are using an old version of this action. I will try with the latest and report back.

@nmote
Copy link
Author

nmote commented Aug 16, 2024

Updating to v3 fixed the issue with this job, though now in later steps we are getting issues with carriage returns (\r) in Bash scripts, which weren't causing problems before. For example:

./configure: line 6: $'\r': command not found

Line 6 is just a blank line at the beginning of the script.

Anyway, I'll close this since while this is weird, it's not clear to me that it's due to an issue with setup-ocaml.

@nmote nmote closed this as completed Aug 16, 2024
@cknitt
Copy link

cknitt commented Aug 17, 2024

@nmote Regarding the issue with \r, see #815 (comment).

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