//tvix/cli doesn't build on MacOS

#240
Opened by flokli at 2023-01-09T11·59+00

I gave it a try to nix-build default.nix -A tvix.cli on a MacOS machine, and ran into the following build error:

building '/nix/store/835mcxixvd8xgp5qgh7rdf2lncrglb46-rust_addr2line-0.17.0.drv'...
unpacking sources
unpacking source archive /nix/store/s3chmi9p3ibzm842d39cri92l2xkszqr-addr2line-0.17.0.tar.gz
source root is addr2line-0.17.0
patching sources
updateAutotoolsGnuConfigScriptsPhase
configuring
Running cd .
building
Building src/lib.rs (addr2line)
Running rustc --crate-name addr2line src/lib.rs --out-dir target/lib -L dependency=target/deps --cap-lints allow -C opt-level=3 -C codegen-units=1 --remap-path-prefix=/private/tmp/nix-build-rust_addr2line-0.17.0.drv-0=/ --extern gimli=/nix/store/0akb93xlxb9vcw6s2k5r68glhvz42lpj-rust_gimli-0.26.2-lib/lib/libgimli-aaf85f1a40.rlib --edition 2015 -C metadata=12385d915b -C extra-filename=-12385d915b --crate-type lib --color always
error[E0786]: found invalid metadata files for crate `gimli`
  --> src/lib.rs:36:1
   |
36 | pub extern crate gimli;
   | ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: no `.rmeta` section in '/nix/store/0akb93xlxb9vcw6s2k5r68glhvz42lpj-rust_gimli-0.26.2-lib/lib/libgimli-aaf85f1a40.rlib'

error: aborting due to previous error

For more information about this error, try `rustc --explain E0786`.
error: builder for '/nix/store/835mcxixvd8xgp5qgh7rdf2lncrglb46-rust_addr2line-0.17.0.drv' failed with exit code 1;
       last 10 log lines:
       >   --> src/lib.rs:36:1
       >    |
       > 36 | pub extern crate gimli;
       >    | ^^^^^^^^^^^^^^^^^^^^^^^
       >    |
       >    = note: no `.rmeta` section in '/nix/store/0akb93xlxb9vcw6s2k5r68glhvz42lpj-rust_gimli-0.26.2-lib/lib/libgimli-aaf85f1a40.rlib'
       >
       > error: aborting due to previous error
       >
       > For more information about this error, try `rustc --explain E0786`.
       For full logs, run 'nix log /nix/store/835mcxixvd8xgp5qgh7rdf2lncrglb46-rust_addr2line-0.17.0.drv'.
error: 1 dependencies of derivation '/nix/store/jk291gvnj3da1kjcvlyh81g8dipxr449-rust_tvix-cli-0.1.0-test.drv' failed to build
error: 1 dependencies of derivation '/nix/store/3qpv2qwsw7j3n73y3vhdpq3h888ssv0q-rust_tvix-cli-0.1.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/srsmnpyiybr2nzp4sd9gbrjdvikxs3ha-rust_tvix-cli-0.1.0-linked.drv' failed to build

This is only one of the build failures, there is more "no .rmeta section" errors in other crates too.

  1. Looks to be an issue with nix. I am able to build it using cargo build.

    aaqaishtyaq at 2023-01-10T17·20+00

  2. You mean, an issue with crate2nix?

    flokli at 2023-01-12T10·45+00

  3. Yup.

    aaqaishtyaq at 2023-01-22T09·20+00