Quantcast
Channel: OCaml - Topics tagged dune
Viewing all articles
Browse latest Browse all 537

"dunelongcmd" Linking Error on Windows using ocamlopt

$
0
0

Hello everyone,
Because Opam now supports Windows I have experimented with moving my Ocaml-Workspaces from WSL into Windows proper. This was successful and on my laptop there was a noticeable improvement to the startup time of Visual Studio Code, which no longer needs to connect to WSL.
Since then I have added additional dependencies in order to try and benefit from parallelism. Now I am getting errors like this:

PS D:\Workspaces\aoc\solutions\2023\1> dune runtest --display=short
Entering directory 'D:\Workspaces\aoc'
File "solutions/2023/1/dune", lines 1-7, characters 0-113:
1 | (library
2 |  (name aoc_2023_1)
3 |  (inline_tests)
4 |  (preprocess
5 |   (pps ppx_jane))
6 |  (modes best)
7 |  (libraries re aoc_std))
    ocamlopt solutions/2023/1/.aoc_2023_1.inline-tests/inline_test_runner_aoc_2023_1.exe (exit 2)
/bin/bash: D:TMPbuild_dc7e34_dunelongcmdb2df95: No such file or directory
** Fatal error: Error during linking

File "caml_startup", line 1:
Error: Error during linking (exit code 2)

There have been no changes to the files in the folder but the library aoc_std now has the additional dependencies and an additional module.
If I change (modes best) to (modes byte) (and therefore use ocamlc instead of ocamlopt) it works just fine.
It seems that by adding the dependencies the (very, very long) ocamlopt invocation crossed some threshold which required creating some temporary file which when referred to had some issue with the Windows file separator.
I am not quite sure whether this is a dune bug, an ocamlopt bug, a powershell bug or if I have something in my PATH which gets unexpectedly called instead of the cygwin equivalent.
I am using the sandboxed (powershell) terminal from the Ocaml Platform extension out of Visual Code Studio. Opam uses its own cygwin installation. I use version 5.2.0 of ocaml and mingw-w64.

Thanks in advance.

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 537

Trending Articles