Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants