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

ocamlbuild -where is incorrect #70

Open
jonahbeckford opened this issue Sep 19, 2023 · 1 comment
Open

ocamlbuild -where is incorrect #70

jonahbeckford opened this issue Sep 19, 2023 · 1 comment
Labels
bug Something isn't working pending validation Currently a fix is being tested
Milestone

Comments

@jonahbeckford
Copy link
Contributor

This affects the compile of ptime.1.1.0:

#=== ERROR while compiling ptime.1.1.0 ========================================#
# context     2.2.0~alpha0~20221228 | win32/x86_64 | conf-withdkml.2 ocaml-system.4.14.0 | pinned(https://erratique.ch/software/ptime/releases/ptime-1.1.0.tbz)
# path        Z:\source\dkml\build\_deps\dkml-component-opam-src\_opam\.opam-switch\build\ptime.1.1.0
# command     C:\Users\beckf\AppData\Local\Programs\DKMLNA~1\bin\WITH-D~1.EXE ocaml pkg/pkg.ml build --dev-pkg false
# exit-code   1
# env-file    C:\Users\beckf\AppData\Local\opam\log\ptime-14852-cd981d.env
# output-file C:\Users\beckf\AppData\Local\opam\log\ptime-14852-cd981d.out
### output ###
# [...]
# pkg.ml: [ERROR] cmd ["ocamlbuild" "-use-ocamlfind" "-classic-display" "-j" "4" "-tag" "debug"
#      "-build-dir" "_build" "opam" "pkg/META" "CHANGES.md" "LICENSE.md"
#      "README.md" "src/ptime.lib" "src/ptime.cmxs" "src/ptime.cmxa"
#      "src/ptime.cma" "src/ptime.cmx" "src/ptime.cmi" "src/ptime.mli"
#      "src/ptime_top.lib" "src/ptime_top.cmxs" "src/ptime_top.cmxa"
#      "src/ptime_top.cma" "src/ptime_top.cmx" "src/ptime_top_init.ml"
#      "src-clock/ptime_clock.lib" "src-clock/ptime_clock.cmxs"
#      "src-clock/ptime_clock.cmxa" "src-clock/ptime_clock.cma"
#      "src-clock/ptime_clock.cmx" "src-clock/ptime_clock.cmi"
#      "src-clock/ptime_clock.mli" "src-clock/dllptime_clock_stubs.dll"
#      "src-clock/libptime_clock_stubs.lib" "src-clock/runtime.js"
#      "doc/index.mld" "test/min_clock.ml"]: exited with 2

with .out log:

Warning: Won't be able to compile a native plugin
Failure: Cannot find "ocamlbuild.cmo" in ocamlbuild -where directory.
pkg.ml: [ERROR] cmd ["ocamlbuild" "-use-ocamlfind" "-classic-display" "-j" "4" "-tag" "debug"
     "-build-dir" "_build" "opam" "pkg/META" "CHANGES.md" "LICENSE.md"
     "README.md" "src/ptime.lib" "src/ptime.cmxs" "src/ptime.cmxa"
     "src/ptime.cma" "src/ptime.cmx" "src/ptime.cmi" "src/ptime.mli"
     "src/ptime_top.lib" "src/ptime_top.cmxs" "src/ptime_top.cmxa"
     "src/ptime_top.cma" "src/ptime_top.cmx" "src/ptime_top_init.ml"
     "src-clock/ptime_clock.lib" "src-clock/ptime_clock.cmxs"
     "src-clock/ptime_clock.cmxa" "src-clock/ptime_clock.cma"
     "src-clock/ptime_clock.cmx" "src-clock/ptime_clock.cmi"
     "src-clock/ptime_clock.mli" "src-clock/dllptime_clock_stubs.dll"
     "src-clock/libptime_clock_stubs.lib" "src-clock/runtime.js"
     "doc/index.mld" "test/min_clock.ml"]: exited with 2

Root cause

When running opam exec -- ocamlbuild -where I get Z:/source/dkmuild/_deps/dkml-component-opam-src/_opam/lib/ocamlbuild which is incorrect. The source/dkmuild should be source/dkmlbuild which obviously is an earlier unescaping of \b into a backspace.

@jonahbeckford
Copy link
Contributor Author

Have fixed this by having a patched ocamlbuild in diskuv/diskuv-opam-repository@7394a2d, and then moving the diskuv-opam-repository tag 2.0.3.

That does mean that if 2.0.3 users experience this problem and they installed on or before 2023-09-19, then they will need to:

opam update diskuv-2.0.3 # oncde
opam upgrade ocamlbuild # in each local switch

Keeping this open for users to see ...

@jonahbeckford jonahbeckford added the pending validation Currently a fix is being tested label Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending validation Currently a fix is being tested
Development

No branches or pull requests

1 participant