-
Notifications
You must be signed in to change notification settings - Fork 470
Dune 3.4+ broken in esy on Windows #6098
Copy link
Copy link
Closed
ocaml/opam-repository
#22317Description
Expected Behavior
Dune 3.4+ should build inside esy on Windows.
Actual Behavior
Dune fails to build with this log:
# esy-build-package: building: @opam/dune@opam:3.4.1
# esy-build-package: pwd: C:\Users\grain\.esy\3\b\opam__s__dune-opam__c__3.4.1-4a143223
# esy-build-package: running: "ocaml" "bootstrap.ml" "-j" "4"
ocamlc -output-complete-exe -w -24 -g -o .duneboot.exe -I boot unix.cma boot/libs.ml boot/duneboot.ml
.\.duneboot.exe -j 4
cd _boot && C:\Users\grain\.esy\3_\i\ocaml-4.14.0-cd77a8d9\bin\ocamlopt.opt.exe -o ..\dune.exe -g -I +threads unix.cmxa threads.cmxa -no-alias-deps -w -49-6 readdir.c wait3_stubs.c xdg_stubs.c spawn_stubs.c dune_stats_stubs.c fsevents_stubs.c inotify_stubs.c pthread_chdir_stubs.c -args mods_list -cclib -lshell32 -cclib -lole32 -cclib -luuid -alert -unstable
otherlibs/xdg\xdg_stubs.c: In function 'dune_xdg__get_known_folder_path':
otherlibs/xdg\xdg_stubs.c:35:9: warning: implicit declaration of function 'SHGetKnownFolderPath'; did you mean 'SHGetFolderPath'? [-Wimplicit-function-declaration]
otherlibs/xdg\xdg_stubs.c:41:38: error: 'WC_ERR_INVALID_CHARS' undeclared (first use in this function); did you mean 'MB_ERR_INVALID_CHARS'?
otherlibs/xdg\xdg_stubs.c:41:38: note: each undeclared identifier is reported only once for each function it appears in
error: command failed: "ocaml" "bootstrap.ml" "-j" "4"
The issues seem to be SHGetKnownFolderPath and WC_ERR_INVALID_CHARS in the xdg stubs.
Reproduction
- On Windows, create an esy.json with the following:
{
"dependencies": {
"ocaml": "4.14.0",
"@opam/dune": "3.4.1"
},
"esy": {
"build": [
"dune build -p #{self.name}"
]
}
}- Try to build the project by running
esy - You'll see the same error as posted above
Specifications
- Version of
dune(output ofdune --version): 3.4.1 - Version of
ocaml(output ofocamlc --version) 4.14.0 - Operating system (distribution and version): Windows (Server 2019)
Additional information
- Link to gist with verbose output (run
dunewith the--verboseflag):
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels