Trouble building a rust-python package on aarch64-darwin

Hi everyone,

I am trying to install the latest version of orjson using a python override, which I based off of the nixpkgs derviation for the older version:

    pyfinal: pyprev: {
          orjson = let
            pname = "orjson";
            version = "3.7.5";
            src = fetchFromGitHub {
              owner = "ijl";
              repo = "orjson";
              rev = version;
              sha256 = "sha256-N0PbBU4PRqR2CAd5Ndm+vabQfaSXHBxAATwRuC+5peo=";
            };
          in
            with pkgs;
              pyfinal.buildPythonPackage {
                inherit pname version src;
                format = "pyproject";
                cargoDeps = rustPlatform.fetchCargoTarball {
                  inherit src;
                  name = "${pname}-${version}";
                  sha256 = "sha256-IXwz8BleoDSnf4EKZJPpHHHUxnbjUhKcIPG2QzDha54=";
                };
                buildInputs = lib.optionals stdenv.isDarwin [
                  libiconv
                ];
                nativeBuildInputs = with rustPlatform; [
                  cargoSetupHook
                  maturinBuildHook
                ];
              };
      }

But it fails during linking, complaining about missing symbols for my architecture:

  ...
  Undefined symbols for architecture arm64:
            "_PyBuffer_IsContiguous", referenced from:
                _loads in orjson.orjson.892e4fe1-cgu.0.rcgu.o
            "_PyErr_SetObject", referenced from:
                orjson::raise_loads_exception::he8e648ab34420f9b in orjson.orjson.892e4fe1-cgu.0.rcgu.o
                orjson::raise_dumps_exception::h7ad6d88736c30fd1 in orjson.orjson.892e4fe1-cgu.0.rcgu.o
  ...

After searching I found this thread which to suggests that I need to include a path with a python framework, but Iā€™m not sure how to do that in a nix-appropriate way.

Thank you for your help!

full nix log for the failed build
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pip-build-hook
Using pipBuildPhase
Using pipShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/xqg3cxyp59gbd6i34i0s853kxxvzik8x-source
source root is source
Executing cargoSetupPostUnpackHook
unpacking source archive /nix/store/iarqf7kaqiz9k538lj3bn7jjjcwz07mj-orjson-3.7.5-vendor.tar.gz
Finished cargoSetupPostUnpackHook
setting SOURCE_DATE_EPOCH to timestamp 315619200 of file source/test/util.py
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
Executing cargoSetupPostPatchHook
Validating consistency between /private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source//Cargo.lock and /private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/orjson-3.7.5-vendor.tar.gz/Cargo.lock
Finished cargoSetupPostPatchHook
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Executing maturinBuildHook
++ env CC_aarch64-apple-darwin=/nix/store/y1ijzmik13ak5vpb19rqsdkbv2lm2imb-clang-wrapper-11.1.0/bin/cc CXX_aarch64-apple-darwin=/nix/store/y1ijzmik13ak5vpb19rqsdkbv2lm2imb-clang-wrapper-11.1.0/bin/c++ CC_aarch64-apple-darwin=/nix/store/y1ijzmik13ak5vpb19rqsdkbv2lm2imb-clang-wrapper-11.1.0/bin/cc CXX_aarch64-apple-darwin=/nix/store/y1ijzmik13ak5vpb19rqsdkbv2lm2imb-clang-wrapper-11.1.0/bin/c++ maturin build '--cargo-extra-args=-j 10 --frozen' --target aarch64-apple-darwin --manylinux off --strip --release
šŸ Using CPython 3.9 at python3 to generate the cffi bindings
šŸ“¦ Including files matching "build.rs"
šŸ“¦ Including files matching "Cargo.lock"
šŸ“¦ Including files matching "include"
šŸ“¦ Built source distribution to /private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/wheels/orjson-3.7.5.tar.gz
   Compiling target-lexicon v0.12.4
   Compiling autocfg v1.1.0
   Compiling once_cell v1.12.0
   Compiling libc v0.2.126
   Compiling serde v1.0.137
   Compiling version_check v0.9.4
   Compiling cfg-if v1.0.0
   Compiling encoding_rs v0.8.31
   Compiling serde_json v1.0.81
   Compiling ryu v1.0.10
   Compiling itoa v1.0.2
   Compiling associative-cache v1.0.1
   Compiling simdutf8 v0.1.4
   Compiling bytecount v0.6.3
   Compiling inlinable_string v0.1.15
   Compiling smallvec v1.8.1
   Compiling ahash v0.7.6
   Compiling num-traits v0.2.15
   Compiling num-integer v0.1.45
   Compiling getrandom v0.2.7
   Compiling pyo3-build-config v0.16.5
   Compiling chrono v0.4.19
   Compiling pyo3-ffi v0.16.5
   Compiling orjson v3.7.5 (/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source)
   Compiling arrayvec v0.7.2
   Compiling beef v0.5.2
error: linking with `/nix/store/y1ijzmik13ak5vpb19rqsdkbv2lm2imb-clang-wrapper-11.1.0/bin/cc` failed: exit status: 1
  |
  = note: "/nix/store/y1ijzmik13ak5vpb19rqsdkbv2lm2imb-clang-wrapper-11.1.0/bin/cc" "-Wl,-exported_symbols_list,/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/rustcrfFoCK/list" "-arch" "arm64" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.411a6qwsdjsaex2b.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.addr2line-34388ddb6780a650.addr2line.98b7638a-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.addr2line-34388ddb6780a650.addr2line.98b7638a-cgu.1.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.addr2line-34388ddb6780a650.addr2line.98b7638a-cgu.2.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.addr2line-34388ddb6780a650.addr2line.98b7638a-cgu.3.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.addr2line-34388ddb6780a650.addr2line.98b7638a-cgu.4.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.addr2line-34388ddb6780a650.addr2line.98b7638a-cgu.5.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.addr2line-34388ddb6780a650.addr2line.98b7638a-cgu.6.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.addr2line-34388ddb6780a650.addr2line.98b7638a-cgu.7.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.addr2line-34388ddb6780a650.addr2line.98b7638a-cgu.8.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.addr2line-34388ddb6780a650.addr2line.98b7638a-cgu.9.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.adler-228807b41837d703.adler.0b29668d-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.adler-228807b41837d703.adler.0b29668d-cgu.1.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.adler-228807b41837d703.adler.0b29668d-cgu.2.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.adler-228807b41837d703.adler.0b29668d-cgu.3.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.adler-228807b41837d703.adler.0b29668d-cgu.4.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.adler-228807b41837d703.adler.0b29668d-cgu.5.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.ahash-af2c0a12ac197bea.ahash.8c186972-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.alloc-c9f4809e0976fe76.alloc.315077e7-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.alloc-c9f4809e0976fe76.alloc.315077e7-cgu.1.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.alloc-c9f4809e0976fe76.alloc.315077e7-cgu.2.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.alloc-c9f4809e0976fe76.alloc.315077e7-cgu.3.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.alloc-c9f4809e0976fe76.alloc.315077e7-cgu.4.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.alloc-c9f4809e0976fe76.alloc.315077e7-cgu.5.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.alloc-c9f4809e0976fe76.alloc.315077e7-cgu.6.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.alloc-c9f4809e0976fe76.alloc.315077e7-cgu.7.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.alloc-c9f4809e0976fe76.alloc.315077e7-cgu.8.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.alloc-c9f4809e0976fe76.alloc.315077e7-cgu.9.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.arrayvec-bf76217c3ae25679.arrayvec.9e9ed506-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.associative_cache-e596a744681f33da.associative_cache.765fadfd-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.beef-5cd2a88a9544bbcc.beef.e03a9b26-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.bytecount-ef29520a6079b345.bytecount.85892fae-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.cfg_if-333288e3b88d5979.cfg_if.5762d943-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.cfg_if-e245cd36c1ea66a5.cfg_if.7097b77e-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.chrono-d01ce9c3df4d0368.chrono.187a94b9-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.core-681b9f2e5107258d.core.a3099c1d-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.core-681b9f2e5107258d.core.a3099c1d-cgu.1.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.core-681b9f2e5107258d.core.a3099c1d-cgu.2.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.core-681b9f2e5107258d.core.a3099c1d-cgu.3.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.core-681b9f2e5107258d.core.a3099c1d-cgu.4.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.core-681b9f2e5107258d.core.a3099c1d-cgu.5.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.core-681b9f2e5107258d.core.a3099c1d-cgu.6.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.core-681b9f2e5107258d.core.a3099c1d-cgu.7.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.core-681b9f2e5107258d.core.a3099c1d-cgu.8.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.core-681b9f2e5107258d.core.a3099c1d-cgu.9.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.encoding_rs-37dde55060f3972e.encoding_rs.d5831831-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.getrandom-4021d14af42ad76d.getrandom.6fcec49f-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.gimli-20ab9c756d31b4f6.gimli.12d30a8b-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.gimli-20ab9c756d31b4f6.gimli.12d30a8b-cgu.1.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.gimli-20ab9c756d31b4f6.gimli.12d30a8b-cgu.2.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.gimli-20ab9c756d31b4f6.gimli.12d30a8b-cgu.3.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.gimli-20ab9c756d31b4f6.gimli.12d30a8b-cgu.4.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.gimli-20ab9c756d31b4f6.gimli.12d30a8b-cgu.5.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.gimli-20ab9c756d31b4f6.gimli.12d30a8b-cgu.6.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.gimli-20ab9c756d31b4f6.gimli.12d30a8b-cgu.7.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.gimli-20ab9c756d31b4f6.gimli.12d30a8b-cgu.8.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.gimli-20ab9c756d31b4f6.gimli.12d30a8b-cgu.9.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.hashbrown-f3b25d5a88732629.hashbrown.2b359f1e-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.hashbrown-f3b25d5a88732629.hashbrown.2b359f1e-cgu.1.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.hashbrown-f3b25d5a88732629.hashbrown.2b359f1e-cgu.2.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.inlinable_string-13a2cd529c2ca256.inlinable_string.932a3cc1-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.itoa-75856f8797827cec.itoa.751d3c6f-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.libc-7cd877ec6446b528.libc.b77966a6-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.libc-7cd877ec6446b528.libc.b77966a6-cgu.1.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.libc-7cd877ec6446b528.libc.b77966a6-cgu.2.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.libc-7cd877ec6446b528.libc.b77966a6-cgu.3.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.libc-7cd877ec6446b528.libc.b77966a6-cgu.4.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.libc-7cd877ec6446b528.libc.b77966a6-cgu.5.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.libc-7cd877ec6446b528.libc.b77966a6-cgu.6.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.libc-c251b5b7e277e417.libc.f8e15f9c-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.memchr-bf27d52f69d1df04.memchr.fb9e56a2-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.memchr-bf27d52f69d1df04.memchr.fb9e56a2-cgu.1.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.memchr-bf27d52f69d1df04.memchr.fb9e56a2-cgu.2.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.memchr-bf27d52f69d1df04.memchr.fb9e56a2-cgu.3.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.memchr-bf27d52f69d1df04.memchr.fb9e56a2-cgu.4.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.memchr-bf27d52f69d1df04.memchr.fb9e56a2-cgu.5.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.memchr-bf27d52f69d1df04.memchr.fb9e56a2-cgu.6.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.memchr-bf27d52f69d1df04.memchr.fb9e56a2-cgu.7.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.memchr-bf27d52f69d1df04.memchr.fb9e56a2-cgu.8.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.memchr-bf27d52f69d1df04.memchr.fb9e56a2-cgu.9.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.miniz_oxide-640008c9db210d7b.miniz_oxide.d7e4144f-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.miniz_oxide-640008c9db210d7b.miniz_oxide.d7e4144f-cgu.1.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.miniz_oxide-640008c9db210d7b.miniz_oxide.d7e4144f-cgu.2.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.miniz_oxide-640008c9db210d7b.miniz_oxide.d7e4144f-cgu.3.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.miniz_oxide-640008c9db210d7b.miniz_oxide.d7e4144f-cgu.4.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.miniz_oxide-640008c9db210d7b.miniz_oxide.d7e4144f-cgu.5.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.miniz_oxide-640008c9db210d7b.miniz_oxide.d7e4144f-cgu.6.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.miniz_oxide-640008c9db210d7b.miniz_oxide.d7e4144f-cgu.7.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.miniz_oxide-640008c9db210d7b.miniz_oxide.d7e4144f-cgu.8.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.miniz_oxide-640008c9db210d7b.miniz_oxide.d7e4144f-cgu.9.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.num_integer-093e9927bc229f4f.num_integer.ef68fc26-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.num_traits-6023ffe37ea76117.num_traits.8402fcb3-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.object-480b374f20bf3704.object.5de98ed7-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.object-480b374f20bf3704.object.5de98ed7-cgu.1.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.object-480b374f20bf3704.object.5de98ed7-cgu.2.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.object-480b374f20bf3704.object.5de98ed7-cgu.3.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.object-480b374f20bf3704.object.5de98ed7-cgu.4.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.object-480b374f20bf3704.object.5de98ed7-cgu.5.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.object-480b374f20bf3704.object.5de98ed7-cgu.6.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.object-480b374f20bf3704.object.5de98ed7-cgu.7.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.object-480b374f20bf3704.object.5de98ed7-cgu.8.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.object-480b374f20bf3704.object.5de98ed7-cgu.9.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.once_cell-467878b9ba3a6852.once_cell.c49f4f2b-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.orjson.892e4fe1-cgu.0.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.panic_abort-ff4fb5b8f2207433.panic_abort.d7f04fdb-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.panic_abort-ff4fb5b8f2207433.panic_abort.d7f04fdb-cgu.1.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.pyo3_ffi-52acbee661f1764b.pyo3_ffi.9101d91b-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.rustc_demangle-b9ceadbcef4635eb.rustc_demangle.63ce00b5-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.rustc_demangle-b9ceadbcef4635eb.rustc_demangle.63ce00b5-cgu.1.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.rustc_demangle-b9ceadbcef4635eb.rustc_demangle.63ce00b5-cgu.2.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.rustc_demangle-b9ceadbcef4635eb.rustc_demangle.63ce00b5-cgu.3.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.rustc_demangle-b9ceadbcef4635eb.rustc_demangle.63ce00b5-cgu.4.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.rustc_demangle-b9ceadbcef4635eb.rustc_demangle.63ce00b5-cgu.5.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.rustc_demangle-b9ceadbcef4635eb.rustc_demangle.63ce00b5-cgu.6.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.rustc_demangle-b9ceadbcef4635eb.rustc_demangle.63ce00b5-cgu.7.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.rustc_demangle-b9ceadbcef4635eb.rustc_demangle.63ce00b5-cgu.8.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.rustc_demangle-b9ceadbcef4635eb.rustc_demangle.63ce00b5-cgu.9.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.rustc_std_workspace_alloc-990483eebc80406d.rustc_std_workspace_alloc.8f6711fb-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.rustc_std_workspace_core-76fd3ce58ae59080.rustc_std_workspace_core.a3452da8-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.ryu-dcfe77976b16f9c3.ryu.2a3a3aad-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.serde-38b22445ed11c54a.serde.29b68adc-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.serde_json-e8b580d5197fcef4.serde_json.c9c9104e-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.smallvec-996950c0900f5054.smallvec.bd16b5ba-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.std-5d35eb636b1d14b3.std.c0003418-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.std-5d35eb636b1d14b3.std.c0003418-cgu.1.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.std-5d35eb636b1d14b3.std.c0003418-cgu.2.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.std-5d35eb636b1d14b3.std.c0003418-cgu.3.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.std-5d35eb636b1d14b3.std.c0003418-cgu.4.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.std-5d35eb636b1d14b3.std.c0003418-cgu.5.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.std-5d35eb636b1d14b3.std.c0003418-cgu.6.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.std-5d35eb636b1d14b3.std.c0003418-cgu.7.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.std-5d35eb636b1d14b3.std.c0003418-cgu.8.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.std-5d35eb636b1d14b3.std.c0003418-cgu.9.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.std_detect-9007d1b50b423cc5.std_detect.cc5f8dfb-cgu.0.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.std_detect-9007d1b50b423cc5.std_detect.cc5f8dfb-cgu.1.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.std_detect-9007d1b50b423cc5.std_detect.cc5f8dfb-cgu.2.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.std_detect-9007d1b50b423cc5.std_detect.cc5f8dfb-cgu.3.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.std_detect-9007d1b50b423cc5.std_detect.cc5f8dfb-cgu.4.rcgu.o.rcgu.o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/orjson.unwind-b2fc65303669bea9.unwind.74a29e5e-cgu.0.rcgu.o.rcgu.o" "-L" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps" "-L" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/release/deps" "-L" "/nix/store/x5vskw6v5hvih991xnnys8sj9v1qn2cl-rustc-1.61.0/lib/rustlib/aarch64-apple-darwin/lib" "/nix/store/x5vskw6v5hvih991xnnys8sj9v1qn2cl-rustc-1.61.0/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-2c3a0cc128bcaaa8.rlib" "-liconv" "-lSystem" "-lresolv" "-lc" "-lm" "-liconv" "-L" "/nix/store/x5vskw6v5hvih991xnnys8sj9v1qn2cl-rustc-1.61.0/lib/rustlib/aarch64-apple-darwin/lib" "-o" "/private/tmp/nix-build-python3.9-orjson-3.7.5.drv-0/source/target/aarch64-apple-darwin/release/deps/liborjson.dylib" "-Wl,-dead_strip" "-dynamiclib" "-Wl,-dylib" "-nodefaultlibs" "-s"
  = note: ld: warning: option -s is obsolete and being ignored
          Undefined symbols for architecture arm64:
            "_PyBuffer_IsContiguous", referenced from:
                _loads in orjson.orjson.892e4fe1-cgu.0.rcgu.o
            "_PyErr_SetObject", referenced from:
                orjson::raise_loads_exception::he8e648ab34420f9b in orjson.orjson.892e4fe1-cgu.0.rcgu.o
                orjson::raise_dumps_exception::h7ad6d88736c30fd1 in orjson.orjson.892e4fe1-cgu.0.rcgu.o
            "_PyModuleDef_Init", referenced from:
                _PyInit_orjson in orjson.orjson.892e4fe1-cgu.0.rcgu.o
            "_PyUnicode_FromStringAndSize", referenced from:
                _orjson_init_exec in orjson.orjson.892e4fe1-cgu.0.rcgu.o
                orjson::raise_loads_exception::he8e648ab34420f9b in orjson.orjson.892e4fe1-cgu.0.rcgu.o
                orjson::raise_dumps_exception::h7ad6d88736c30fd1 in orjson.orjson.892e4fe1-cgu.0.rcgu.o
            "_PyCMethod_New", referenced from:
                _orjson_init_exec in orjson.orjson.892e4fe1-cgu.0.rcgu.o
            "_PyModule_AddObject", referenced from:
                _orjson_init_exec in orjson.orjson.892e4fe1-cgu.0.rcgu.o
            "_PyImport_ImportModule", referenced from:
                orjson::typeref::look_up_json_exc::h05150778bc6a0fae in orjson.orjson.892e4fe1-cgu.0.rcgu.o
                orjson::typeref::load_numpy_types::hc5ae274cd07f5ea5 in orjson.orjson.892e4fe1-cgu.0.rcgu.o
                orjson::typeref::look_up_field_type::hb3af92876b503745 in orjson.orjson.892e4fe1-cgu.0.rcgu.o
                orjson::typeref::look_up_enum_type::h498430fcbbdf895f in orjson.orjson.892e4fe1-cgu.0.rcgu.o
                orjson::typeref::look_up_uuid_type::h6e43636e2d320f4c in orjson.orjson.892e4fe1-cgu.0.rcgu.o
                orjson::typeref::look_up_zoneinfo_type::h613242bb0f165c38 in orjson.orjson.892e4fe1-cgu.0.rcgu.o
            "_PyModule_AddIntConstant", referenced from:
                _orjson_init_exec in orjson.orjson.892e4fe1-cgu.0.rcgu.o
            "__PyBytes_Resize", referenced from:
                orjson::serialize::writer::BytesWriter::grow::h251b6f94af583edc in orjson.orjson.892e4fe1-cgu.0.rcgu.o
                _dumps in orjson.orjson.892e4fe1-cgu.0.rcgu.o
            "_PyLong_AsUnsignedLongLong", referenced from:
                orjson::serialize::dict::DictNonStrKey::pyobject_to_string::h11776a57f27f8db6 in orjson.orjson.892e4fe1-cgu.0.rcgu.o
                    orjson..serialize..int..UIntSerializer$u20$as$u20$serde..ser..Serialize$GT$::serialize::h65d88eaefdbc6228 in orjson.orjson.892e4fe1-cgu.0.rcgu.o
                    orjson..serialize..int..UIntSerializer$u20$as$u20$serde..ser..Serialize$GT$::serialize::h83f750af338644e8 in orjson.orjson.892e4fe1-cgu.0.rcgu.o
            "_PyByteArray_Size", referenced from:
                _loads in orjson.orjson.892e4fe1-cgu.0.rcgu.o
            "_PyLong_AsLongLong", referenced from:
                orjson::serialize::dict::DictNonStrKey::pyobject_to_string::h11776a57f27f8db6 in orjson.orjson.892e4fe1-cgu.0.rcgu.o
                    orjson..serialize..int..Int53Serializer$u20$as$u20$serde..ser..Serialize$GT$::serialize::h87aafbd80d11e789 in orjson.orjson.892e4fe1-cgu.0.rcgu.o
                    orjson..serialize..int..Int53Serializer$u20$as$u20$serde..ser..Serialize$GT$::serialize::hd29a68967d283c1e in orjson.orjson.892e4fe1-cgu.0.rcgu.o

<<More, similar lines omitted due to Discourse character limit>>


          ld: symbol(s) not found for architecture arm64
          clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
          


error: aborting due to previous error


error: could not compile `orjson` due to 2 previous errors
šŸ’„ maturin failed
  Caused by: Failed to build a native library through cargo
  Caused by: Cargo build finished with "exit status: 101": `cargo rustc --message-format json --manifest-path Cargo.toml -j 10 --frozen --target aarch64-apple-darwin --release --lib -- -C link-arg=-s`
2 Likes