Closed jetjinser closed 6 months ago
This should be a problem with the dune file of cf...
diff --git a/lib_gen/dune b/lib_gen/dune
index 83883f0..85faa46 100644
--- a/lib_gen/dune
+++ b/lib_gen/dune
@@ -28,9 +28,7 @@
(targets detect.exe)
(enabled_if
(= %{system} macosx))
- (deps
- detect.c
- (package ctypes))
+ (deps detect.c)
(action
(run %{cc} -I %{ocaml_where} -I %{lib:ctypes:} -o %{targets} %{deps})))
Describe the bug The cf is a OCaml bindings to macOS CoreFoundation that is depends on ctypes.
When I try to build a package that depends on
cf
, I get a lot of errors like:`nix log /nix/store/sc20b74lvbin9qns41fxggw5fmwwbrmn-cf-0.5.0.drv`
@nix { "action": "setPhase", "phase": "unpackPhase" } unpacking sources unpacking source archive /nix/store/b1rbpaikwf7mpcgqihpway4gpdfyi393-cf-lwt-0.5.0.tbz source root is cf-lwt-0.5.0 setting SOURCE_DATE_EPOCH to timestamp 1648823425 of file cf-lwt-0.5.0/lwt/dune @nix { "action": "setPhase", "phase": "patchPhase" } patching sources @nix { "action": "setPhase", "phase": "configurePhase" } configuring patching script interpreter paths in . @nix { "action": "setPhase", "phase": "buildPhase" } building Done: 31% (18/58, 40 left) (jobs: 0)^M ^MFile "lib_gen/dune", line 27, characters 0-185: 27 | (rule 28 | (targets detect.exe) 29 | (enabled_if 30 | (= %{system} macosx)) 31 | (deps 32 | detect.c 33 | (package ctypes)) 34 | (action 35 | (run %{cc} -I %{ocaml_where} -I %{lib:ctypes:} -o %{targets} %{deps}))) Error: File unavailable: /nix/store/xb81cf7qgnyvsyvp9nfj15dmqchc24gk-ctypes-0.22.0/doc/ctypes/CHANGES.md Done: 31% (18/58, 40 left) (jobs: 0)^M ^MFile "lib_gen/dune", line 27, characters 0-185: 27 | (rule 28 | (targets detect.exe) 29 | (enabled_if 30 | (= %{system} macosx)) 31 | (deps 32 | detect.c 33 | (package ctypes)) 34 | (action 35 | (run %{cc} -I %{ocaml_where} -I %{lib:ctypes:} -o %{targets} %{deps}))) Error: File unavailable: /nix/store/xb81cf7qgnyvsyvp9nfj15dmqchc24gk-ctypes-0.22.0/doc/ctypes/LICENSE ... repeated n times similar error ... Done: 31% (18/58, 40 left) (jobs: 0)^M ^MFile "lib_gen/dune", line 27, characters 0-185: 27 | (rule 28 | (targets detect.exe) 29 | (enabled_if 30 | (= %{system} macosx)) 31 | (deps 32 | detect.c 33 | (package ctypes)) 34 | (action 35 | (run %{cc} -I %{ocaml_where} -I %{lib:ctypes:} -o %{targets} %{deps}))) Error: File unavailable: /nix/store/xb81cf7qgnyvsyvp9nfj15dmqchc24gk-ctypes-0.22.0/lib/stublibs/dllctypes_stubs.so Done: 31% (18/58, 40 left) (jobs: 0)^M ^MDone: 33% (35/105, 70 left, 221 failed) (jobs: 5)^M > /nix/store/j645h2bcqjww615dfkka4v4q1nyyy5m1-cctools-port-973.0.1/libexec/as/x86_64/as: this system assembler is deprecated. Please migrate to> Done: 33% (35/105, 70 left, 221 failed) (jobs: 5)^M ^MDone: 45% (51/113, 62 left, 221 failed)> /nix/store/j645h2bcqjww615dfkka4v4q1nyyy5m1-cctools-port-973.0.1/libexec/as/x86_64/as: this system assembler is deprecated. Please migrate to> Done: 45% (51/113, 62 left, 221 failed) (jobs: 3)^M ^M(cd _build/default && /nix/store/b7pfan> /nix/store/j645h2bcqjww615dfkka4v4q1nyyy5m1-cctools-port-973.0.1/libexec/as/x86_64/as: this system assembler is deprecated. Please migrate to> Done: 45% (51/113, 62 left, 221 failed) (jobs: 3)^M ^M(cd _build/default && /nix/store/b7pfan> /nix/store/j645h2bcqjww615dfkka4v4q1nyyy5m1-cctools-port-973.0.1/libexec/as/x86_64/as: this system assembler is deprecated. Please migrate to> Done: 45% (51/113, 62 left, 221 failed) (jobs: 3)^M ^MDone: 49% (56/113, 57 left, 221 failed)> clang-11: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument] Done: 49% (56/113, 57 left, 221 failed) (jobs: 2)^M ^MDone: 50% (57/113, 56 left, 221 failed)> /nix/store/j645h2bcqjww615dfkka4v4q1nyyy5m1-cctools-port-973.0.1/libexec/as/x86_64/as: this system assembler is deprecated. Please migrate to> Done: 50% (57/113, 56 left, 221 failed) (jobs: 1)^MThe path
/nix/store/xb81cf7qgnyvsyvp9nfj15dmqchc24gk-ctypes-0.22.0/doc/ctypes/CHANGES.md
does not exist, I think the correct path is:And the content of
nix-support/setup-hook
is:To Reproduce
OR
I made a minimal example that depends on
cf
: with_cf.or only cf:
Expected behavior build successfully
Environment
Additional context Add any other context about the problem here.