abba23 / spotify-adblock

Adblocker for Spotify
https://github.com/abba23/spotify-adblock
1.83k stars 89 forks source link

Build fails on Kubuntu 21.04 #36

Open Merrit opened 3 years ago

Merrit commented 3 years ago

Build failure:

Details # cargo build --profile release cargo build --release Updating crates.io index Downloaded aho-corasick v0.7.18 Downloaded toml v0.5.8 Downloaded proc-macro2 v1.0.28 Downloaded syn v1.0.75 Downloaded quote v1.0.9 Downloaded regex-syntax v0.6.25 Downloaded serde_derive v1.0.128 Downloaded serde v1.0.128 Downloaded unicode-xid v0.2.2 Downloaded memchr v2.4.1 Downloaded regex v1.5.4 Downloaded libc v0.2.100 Downloaded lazy_static v1.4.0 Downloaded 13 crates (1.7 MB) in 0.65s Compiling proc-macro2 v1.0.28 Compiling unicode-xid v0.2.2 Compiling syn v1.0.75 Compiling serde_derive v1.0.128 Compiling memchr v2.4.1 Compiling serde v1.0.128 Compiling libc v0.2.100 Compiling regex-syntax v0.6.25 Compiling lazy_static v1.4.0 error: linker `cc` not found | = note: No such file or directory (os error 2) error: aborting due to previous error error: could not compile `memchr` To learn more, run the command again with --verbose. warning: build failed, waiting for other jobs to finish... error: linker `cc` not found | = note: No such file or directory (os error 2) error: aborting due to previous error error: linker `cc` not found | = note: No such file or directory (os error 2) error: aborting due to previous error error: linker `cc` not found | = note: No such file or directory (os error 2) error: aborting due to previous error error: linker `cc` not found | = note: No such file or directory (os error 2) error: aborting due to previous error error: linker `cc` not found | = note: No such file or directory (os error 2) error: aborting due to previous error error: build failed make: *** [Makefile:14: target/release/libspotifyadblock.so] Error 101

The Rust install process doesn't mention it, but sudo apt install build-essential is needed to get it to work. Might be worth a mention in the readme?

Thanks for the excellent app :heart:

abba23 commented 3 years ago

I agree that it's a good idea to mention this in order to preempt future issues, but I'm not sure what the best way to do it would be. I don't want to include installation instructions for every conceivable distribution (i.e. apt install build-essential, pacman -S base-devel, eopkg it -c system.devel etc.), but just telling people to install a linker might not be enough.

I think just adding the gcc toolchain to the prerequisites might be the simplest solution, even though I don't know if that's actually the only linker that works. Sadly there doesn't seem to be any official Rust documentation that could be linked to, which explains this dependency and how best to satisfy it.

Merrit commented 3 years ago

I guess ideally this wouldn't be an issue for this repo, but rather the Rust install instructions should likely be amended to mention this since it seems to just be a requirement for Rust in general.

I am not very familiar with Rust, but it looks like they already have an open issue for this.

ttagoe commented 2 years ago

(Pop_OS and Ubuntu)

Once you have installed the package it throws this error at you, cargo directory missing, tried to find a few solutions but they don't work, i think this might be Pop_OS specific...

user@pop-os:/spotify-adblock$ sudo make install
# cargo build --profile release
cargo build --release
make: cargo: No such file or directory
abba23 commented 2 years ago

@Glitch375 Please make sure that Cargo is installed. It's (now) mentioned in the build prerequisites.