ldm0 / rspleeter

Rust implementation of Spleeter
MIT License
113 stars 10 forks source link

Build failed on chip M2 Pro (Apple Silicon) #2

Closed ledunguit closed 1 year ago

ledunguit commented 1 year ago

Build failed with error:

error: failed to run custom build command for `rusty_ffmpeg v0.9.5`

Caused by:
  process didn't exit successfully: `/Users/zed/Documents/self/rspleeter/target/debug/build/rusty_ffmpeg-2205ec434d1e9750/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'No linking method set!', /Users/zed/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rusty_ffmpeg-0.9.5/build.rs:339:13
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
ldm0 commented 1 year ago

Please link the full error report and your building command in the issue. Have you ever used cargo xtask build to build the project?

ledunguit commented 1 year ago

@ldm0, thanks for your reply. I have followed the instructions that you provided in the README file, but I'm stuck at building tensorflow-sys for rspleeter. I mean, rspleeter depends on tensorflow, and tensorflow is dependent on tensorflow-sys, but I've tried building it many times and encountered different errors. The one mentioned above is just one of those cases.

I have found out the issue from here and I retry to build with the gist from the issue and it works, it generated tensorflow dylib. But I don't know how to use these dylibs in rspleeter.

After finding many method to get it works, I have realized that I can install tensorflowlibs via homebrew with command: brew install libtensorflow without compile it manually.

It works.

ldm0 commented 1 year ago

That's great! Thanks for your sharing. Building rust projects with FFI is relatively thorny compared to pure rust projects. Feel free to open another issue if you encounter any other problem.