Skip to content

Conversation

oyv
Copy link

@oyv oyv commented Nov 24, 2024

Include some notes on compiling with armv6.

Include some notes on compiling with armv6.
RUSTFLAGS="-C linker=arm-linux-gnueabihf-gcc" cargo build --no-default-features --target armv7-unknown-linux-gnueabihf
```

Note that this does not work with armv6 (found e.g. in Raspberry Pi 1 and Zero). Previously, you could use the linker in https://github.com/raspberrypi/tools, but this is now too old and will give an error when compiling Librespot (since `3e85d77bfb3520e16c35bb7db3912c76e8cc90d7`). More info: https://github.com/japaric/rust-cross/issues/42
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I compile librespot for armv6 using the official raspi tools no problem. But I don't use cargo cross. I suggest just stating your method doesn't work for pi 1 and zero.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also not using cargo cross. After commit 3e85d77 I get an error from the rpi tools linker saying it found dwarf version 6, but only supports versions 1-4. Maybe I'm using a newer version of Rust (I'm on 1.82.0)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update and see what I get. Does this happen even when compiling with the release profile?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oyv friendly nudge - did you get around to testing what @kingosticks asked?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So whats the current state of things on this?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm wrong, but shouldn't line 118 must be
rustup target add armv7-unknown-linux-gnueabihf ? So with "hf" at the end?

When I try this (to compile it for TinyCore) I get:

warning: openssl-sys@0.9.109: Could not find directory of OpenSSL installation,
and this -sys crate cannot proceed without this knowledge. If OpenSSL is installed
and this crate had trouble finding it,  you can set the OPENSSL_DIR environment
variable for the compilation process. See stderr section below for further information.

error: failed to run custom build command for openssl-sys v0.9.109

@roderickvd roderickvd requested a review from Copilot December 15, 2024 20:29
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants