Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

maturin develop failed with Mac M1 #38

Open
heroWang opened this issue Jun 7, 2023 · 1 comment
Open

maturin develop failed with Mac M1 #38

heroWang opened this issue Jun 7, 2023 · 1 comment

Comments

@heroWang
Copy link

heroWang commented Jun 7, 2023

> maturin develop

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

error: could not compile `datafusion-python` due to previous error
💥 maturin failed
  Caused by: Failed to build a native library through cargo
  Caused by: Cargo build finished with "exit status: 101": `MACOSX_DEPLOYMENT_TARGET="11.0" PYO3_ENVIRONMENT_SIGNATURE="cpython-3.9-64bit" PYO3_PYTHON="/Users/hawkinswong/HOME/git/ray-sql/venv/bin/python" PYTHON_SYS_EXECUTABLE="/Users/hawkinswong/HOME/git/ray-sql/venv/bin/python" "cargo" "rustc" "--message-format" "json-render-diagnostics" "--manifest-path" "/Users/hawkinswong/HOME/git/ray-sql/Cargo.toml" "--lib" "--crate-type" "cdylib" "--" "-C" "link-arg=-undefined" "-C" "link-arg=dynamic_lookup" "-C" "link-args=-Wl,-install_name,@rpath/raysql.abi3.so"

What I have tried:
change version of datafusion-python datafusion-proto datafusion to 25.0.0.
not working.

@Ivankings
Copy link
Contributor

@heroWang If you have ld errors on mac M1, you can try to add the following config to your $CARGO_HOME/config or ~/.cargo/config . Or refer to this link error: linking with cc failed: exit code: 1

[target.x86_64-apple-darwin]
rustflags = [
  "-C", "link-arg=-undefined",
  "-C", "link-arg=dynamic_lookup",
]

[target.aarch64-apple-darwin]
rustflags = [
  "-C", "link-arg=-undefined",
  "-C", "link-arg=dynamic_lookup",
]

This can solve the above problem, but I have encountered a new issue with interface conflicts as below。

 Compiling raysql v0.6.0 (/Users/ivanfan/repos/ray-sql)
error[E0603]: struct `CombinedRecordBatchStream` is private
  --> src/shuffle/ray_shuffle/reader.rs:8:39
   |
8   | use datafusion::physical_plan::union::CombinedRecordBatchStream;
   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^ private struct
   ……
Some errors have detailed explanations: E0308, E0599, E0603.
For more information about an error, try `rustc --explain E0308`.
warning: `raysql` (lib) generated 1 warning
error: could not compile `raysql` (lib) due to 12 previous errors; 1 warning emitted
💥 maturin failed
 Caused by: Failed to build a native library through cargo
 Caused by: Cargo build finished with "exit status: 101": `CARGO_ENCODED_RUSTFLAGS="-C\u{1f}link-arg=-undefined\u{1f}-C\u{1f}link-arg=dynamic_lookup" MACOSX_DEPLOYMENT_TARGET="11.0" PYO3_ENVIRONMENT_SIGNATURE="cpython-3.8-64bit" PYO3_PYTHON="/Users/ivanfan/repos/ray-sql/venv/bin/python" PYTHON_SYS_EXECUTABLE="/Users/ivanfan/repos/ray-sql/venv/bin/python" "cargo" "rustc" "--message-format" "json-render-diagnostics" "--manifest-path" "/Users/ivanfan/repos/ray-sql/Cargo.toml" "--lib" "--crate-type" "cdylib" "--" "-C" "link-arg=-undefined" "-C" "link-arg=dynamic_lookup" "-C" "link-args=-Wl,-install_name,@rpath/raysql.abi3.so"`

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants