mina
mina copied to clipboard
[berkeley] Fix nix build in macOS
This pull request fixes a nix build issue on macOS introduced with the latest caqti
bump. An issue with postgres
system package name mapping prevented it from working on macOS systems.
This was fixed on opam-nix
upstream so flake.lock
was updated.
This in turn resulted in a failure in pinning packages defined in opam.export
, which was fixed in nix/ocaml.nix
.
async_ssl
was then failing to build since ctypes
was being built without the ctypes-foreign
interface (and consequently wihout libffi
system dependency), so a ctypes
overlay was added to add a dependency on ctypes-foreign
.
This PR also makes ctypes
an explicit dependency to the rpc_parallel
in the package defined in opam.export
, instead of it being defined in nix (it is an actual dependency of our rpc_parallel
package version).
!ci-build-me
!ci-build-me
!ci-build-me
fails on my system,
error: builder for '/nix/store/m56d5l769jlyk0b8r5085gp5ka32ab55-kimchi_bindings_stubs-0.1.0.drv' failed with exit code 101;
last 17 log lines:
> unpacking sources
> unpacking source archive /nix/store/nfvrszsg0w5b53f3sm9s2av6lv96iy75-source
> source root is source/lib/crypto/kimchi_bindings/stubs
> Executing cargoSetupPostUnpackHook
> unpacking source archive /nix/store/x7ybk9rxfi3yq8n8p3rz7fy8ms81dw5l-cargo-vendor-dir
> Finished cargoSetupPostUnpackHook
> patching sources
> Executing cargoSetupPostPatchHook
> Validating consistency between /private/tmp/nix-build-kimchi_bindings_stubs-0.1.0.drv-0/source/lib/crypto/kimchi_bindings/stubs/Cargo.lock and /private/tmp/nix-build-kimchi_bindings_stubs-0.1.0.drv-0/cargo-vendor-dir/Cargo.lock
> Finished cargoSetupPostPatchHook
> updateAutotoolsGnuConfigScriptsPhase
> configuring
> building
> Executing cargoBuildHook
> ++ env CC_aarch64-apple-darwin=/nix/store/c52qgyvj637p95wq14hm06pjdiw69fcs-clang-wrapper-11.1.0/bin/cc CXX_aarch64-apple-darwin=/nix/store/c52qgyvj637p95wq14hm06pjdiw69fcs-clang-wrapper-11.1.0/bin/c++ CC_aarch64-apple-darwin=/nix/store/c52qgyvj637p95wq14hm06pjdiw69fcs-clang-wrapper-11.1.0/bin/cc CXX_aarch64-apple-darwin=/nix/store/c52qgyvj637p95wq14hm06pjdiw69fcs-clang-wrapper-11.1.0/bin/c++ cargo build -j 12 --target aarch64-apple-darwin --frozen --release
> error: the lock file /private/tmp/nix-build-kimchi_bindings_stubs-0.1.0.drv-0/source/lib/crypto/kimchi_bindings/stubs/Cargo.lock needs to be updated but --frozen was passed to prevent this
> If you want to try to generate the lock file without accessing the network, remove the --frozen flag and use --offline instead.
For full logs, run 'nix log /nix/store/m56d5l769jlyk0b8r5085gp5ka32ab55-kimchi_bindings_stubs-0.1.0.drv'.
error (ignored): error: cannot unlink '/private/tmp/nix-build-plonk_wasm-0.1.0.drv-0/cargo-vendor-dir': Directory not empty
error: 1 dependencies of derivation '/nix/store/hpyc87dxw2l5wq83gdsfvkwd6xdb8xm2-mina-dev.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ghszk8gjgmiqy8dmkn6dk8nrbrzcf0pb-mina-dev-release.drv' failed to build
@emberian What if you run cargo generate-lockfile
in the kimchi_bindings/stubs
directory?
!ci-build-me
This seems related to the issue @emberian is observing https://github.com/rust-lang/rustlings/issues/1430
!ci-build-me
must alsocargo generate-lockfile
in kimchi_bindings/wasm
but then:
warning: Git tree '/Users/ember/dev/mina' is dirty
error: hash mismatch in fixed-output derivation '/nix/store/srb0g2yy10zkzmryq30nwlzlhixdszd9-wasm-bindgen-cli-0.2.87.tar.gz.drv':
specified: sha256-0rK+Yx4/Jy44Fw5VwJ3tG243ZsyOIBBehYU54XP/JGk=
got: sha256-0u9bl+FkXEK2b54n7/l9JOCtKo+pb42GF9E1EnAUQa0=
error: 1 dependencies of derivation '/nix/store/123wxv18fk2izllyxb9z7gvhv2niywbw-wasm-bindgen-cli-0.2.87.drv' failed to build
error: 1 dependencies of derivation '/nix/store/avc2idb6drpkbrkknp4ahbz9648hpicz-plonk_wasm-0.1.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/rk2h505mqz4xbwcf6azi7jji2v889qm2-mina-dev.drv' failed to build
error: 1 dependencies of derivation '/nix/store/nzdpsrm1kjzmv9wn7g8pm1j62632zmd9-mina-dev-release.drv' failed to build