ocaml / opam

opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.
https://opam.ocaml.org
Other
1.24k stars 359 forks source link

Cannot resolve symbols for win_create_process_native in opam-core on Windows #6148

Closed kit-ty-kate closed 1 month ago

kit-ty-kate commented 2 months ago

Detected in https://github.com/ocaml/opam-repository/pull/26345

 #=== ERROR while compiling opam-0install.0.4.4 ================================#
  # context     2.2.0 | win32/x86_64 | ocaml.5.2.0 | file://D:/a/opam-repository/opam-repository
  # path        D:\opamroot\default\.opam-switch\build\opam-0install.0.4.4
  # command     D:\opamroot\default\bin\dune.exe build -p opam-0install -j 3 @install
  # exit-code   1
  # env-file    D:\opamroot\log\opam-0install-6432-95eca8.env
  # output-file D:\opamroot\log\opam-0install-6432-95eca8.out
  ### output ###
  # File "bin/dune", line 2, characters 7-11:
  # 2 |  (name main)
  #            ^^^^
  # (cd _build/default && D:\opamroot\default\bin\ocamlopt.opt.exe -w -40 -g -o bin/main.exe D:\opamroot\default\lib\re\re.cmxa D:\opamroot\default\lib\stdlib-shims\stdlib_shims.cmxa D:\opamroot\default\lib\ocamlgraph\graph.cmxa D:/opamroot/default/lib/ocaml\unix\unix.cmxa D:\opamroot\default\lib\opam-core\stubs/opam_stubs_win32.cmxa -I D:\opamroot\default\lib\opam-core\stubs D:\opamroot\default\[...]
  # ** Cannot resolve symbols for D:\opamroot\default\lib\opam-core\opam_core.a(opamStubs.o):
  #  win_create_process_native
  # ** Cannot resolve symbols for D:\opamroot\default\lib\opam-core\opam_core.a(opamProcess.o):
  #  win_create_process_native
  # File "caml_startup", line 1:
  # Error: Error during linking (exit code 2)
kit-ty-kate commented 2 months ago

Oh i remember why this issue feels familiar: I encountered it in https://github.com/ocaml/opam/pull/5966 (https://github.com/ocaml/opam/pull/5966/commits/a700803aa7796c95d870fb8f7f0789ba5b6507b9)