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

Latest ARM build #425

Closed
er0k opened this issue Nov 6, 2019 · 9 comments
Closed

Latest ARM build #425

er0k opened this issue Nov 6, 2019 · 9 comments
Labels
bug A functionality or parts of a program that do not work as intended

Comments

@er0k
Copy link

er0k commented Nov 6, 2019

I noticed there is no official ARM build for v0.2.20 on the releases page 😢

Maybe it is an issue with the CD workflow?

@er0k
Copy link
Author

er0k commented Nov 6, 2019

I tried compiling myself on a Pi but I couldn't get it to build, using Raspbian buster:

$ uname -srm
Linux 4.19.75+ armv6l

$ rustc --version
rustc 1.38.0 (625451e37 2019-09-23)

$ cargo --version
cargo 1.38.0 (23ef9a4ef 2019-08-20)

$ git show --summary
commit c1afcda5205ddff38d0d84588484afa662dea88e (HEAD -> master, tag: v0.2.20, origin/master, origin/HEAD)
Author: Sven Lechner <SirWindfield@users.noreply.github.com>
Date:   Sun Nov 3 16:53:48 2019 +0100

    bump version to v0.2.20

$ cargo build --release                                                                                                         
   Compiling semver-parser v0.7.0
error: Could not compile `semver-parser`.

Caused by:
  process didn't exit successfully: `rustc --crate-name semver_parser /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/semver-parser-0.7.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C metadata=d61c05a509e7bd82 -C extra-filename=-d61c05a509e7bd82 --out-dir /home/pi/spotifyd/target/release/deps -L dependency=/home/pi/spotifyd/target/release/deps
--cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)

edit: I also tried on a newer Pi 3 and got a similar result:

$ uname -srm
Linux 4.19.75-v7+ armv7l

$ cargo build --release
   Compiling semver-parser v0.7.0
   Compiling libc v0.2.65
   Compiling proc-macro2 v1.0.6
   Compiling byteorder v1.3.2
error: Could not compile `libc`.

Caused by:
  process didn't exit successfully: `rustc --crate-name build_script_build /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.65/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=e7a45c6bd9cf2e76 -C extra-filename=-e7a45c6bd9cf2e76 --out-dir /home/pi/spotifyd/target/release/build/libc-e7a45c6bd9cf2e76 -L dependency=/home/pi/spotifyd/target/release/deps --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: Could not compile `proc-macro2`.

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name build_script_build /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.6/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=7e8798823c7101b3 -C extra-filename=-7e8798823c7101b3 --out-dir /home/pi/spotifyd/target/release/build/proc-macro2-7e8798823c7101b3 -L dependency=/home/pi/spotifyd/target/release/deps --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: Could not compile `semver-parser`.

Caused by:
  process didn't exit successfully: `rustc --crate-name semver_parser /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/semver-parser-0.7.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C metadata=bef76ad9970293e1 -C extra-filename=-bef76ad9970293e1 --out-dir /home/pi/spotifyd/target/release/deps -L dependency=/home/pi/spotifyd/target/release/deps --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: Could not compile `byteorder`.

Caused by:
  process didn't exit successfully: `rustc --crate-name build_script_build /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/byteorder-1.3.2/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=003e47e9f5d72821 -C extra-filename=-003e47e9f5d72821 --out-dir /home/pi/spotifyd/target/release/build/byteorder-003e47e9f5d72821 -L dependency=/home/pi/spotifyd/target/release/deps --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)

@mainrs
Copy link
Member

mainrs commented Nov 6, 2019

Yep, I noticed that the build failed but I have no clue why. It might be that some library needs a bump. Not sure in what changelogs I've read it but someone mentioned that they had to bump libc to make it compile on ARM again. This is probably happening here :(

@mainrs mainrs added the bug A functionality or parts of a program that do not work as intended label Nov 6, 2019
@er0k
Copy link
Author

er0k commented Nov 6, 2019

I used the workaround mentioned in rust-lang/rust#62896 (comment) and added the following to Cargo.toml

[profile.release]
codegen-units = 1

I'm new to rust and that thread is a bit over my head, but this seems to at least get past the previous error and it can now compile successfully on my Pi 3

foxtrotzulu94 added a commit to foxtrotzulu94/LanguageBenchmarkGame that referenced this issue Nov 9, 2019
Today, there are some issues identified in the rust toolchain. This is the recommended workaround from below issues:
Spotifyd/spotifyd#425
rust-lang/rust#62896 (comment)
@boisei0
Copy link

boisei0 commented Nov 19, 2019

I don't know if this is relevant or will help, but I just succeeded in building 0.20.0 on ARM64 (aarch64). Sounds like an issue specific to the other ARM architectures. Here's my set up:

$ uname -srm 
Linux 5.3.0-1012-raspi2 aarch64
$ rustc --version
rustc 1.39.0 (4560ea788 2019-11-04)
$ cargo --version
cargo 1.39.0 (1c6ec66d5 2019-09-30)
$ git show --summary
commit c1afcda5205ddff38d0d84588484afa662dea88e (HEAD -> master, tag: v0.2.20, origin/master, origin/HEAD)
Author: Sven Lechner <SirWindfield@users.noreply.github.com>
Date:   Sun Nov 3 16:53:48 2019 +0100

    bump version to v0.2.20

Not a single error or warning appeared during compiling. Running on ubuntu server 19.10, arm64, on a Pi 4 4gb edition.

@er0k
Copy link
Author

er0k commented Dec 7, 2019

Looks like this was fixed upstream. I did rustup update to get the same version of rustc/cargo as @boisei0 and now I can build on ARMv7 without the workaround I mentioned above 🎉

@mainrs
Copy link
Member

mainrs commented Dec 7, 2019

perfect. Glad that it works again!

@mainrs mainrs closed this as completed Dec 7, 2019
@er0k
Copy link
Author

er0k commented Dec 7, 2019

@sirwindfield assuming this was the problem with the CD workflow not building the latest ARM binary for the releases page, if you kick off a new workflow now, it should fix that, right?

@mainrs
Copy link
Member

mainrs commented Dec 7, 2019

I started the builds again but IIRC they will always checkout the commit that triggered them, meaning that a fix wouldn't be applied to them. However, in the case of the ARM builds this shouldn't be a problem.

@bjo81
Copy link

bjo81 commented Jan 11, 2020

What about ARM builds for 0.2.23?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A functionality or parts of a program that do not work as intended
Projects
None yet
Development

No branches or pull requests

4 participants