oSumAtrIX / DownOnSpot

🎧 A Spotify music and playlist downloader working with free Spotify accounts written in Rust
https://osumatrix.me
GNU General Public License v3.0
548 stars 45 forks source link

Doesn’t compile on MacOS with lame installed #63

Closed iguesspaul closed 9 months ago

iguesspaul commented 9 months ago

Describe the bug After running cargo build —release It returns the error ld: library not found for -lmp3lame clang: error: linker command failed with exit code 1 (use -v to see invocation)

To Reproduce Steps to reproduce the behavior:

  1. Follow the installation instructions upto building
  2. Run cargo build —release

Expected behavior I had run into this error, checked the readme and realized that I needed to install lame. I did, using homebrew. It installed successfully and the command works when I run it. So, I built the project again but it still failed.

Screenshots Screenshot 2023-09-17 at 10 44 22 Screenshot 2023-09-17 at 10 44 35 Screenshot 2023-09-17 at 10 45 07

Desktop (please complete the following information):

oSumAtrIX commented 9 months ago

Is the library present in /usr/local/lib/libmp3lame.dylib? If so, for some reason the /usr/local/lib directory is not added to the library search path. You can try running RUSTFLAGS="-L /usr/local/lib" cargo build --release in this case.

at84x2 commented 9 months ago

Compilation is working on Mac OS (tested in latest Sonoma / M2) BUT with apple Silicon the default Homebrew install path is /opt/homebrew

So you have to launch the compilation by specifying the direct path to the lame lib (installed by Homebrew) by doing : RUSTFLAGS="-L /opt/homebrew/Cellar/lame/3.100/lib" cargo build --release