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

Can't build crash-context on arm-unknown-linux-gnueabihf #5

Closed
msirringhaus opened this issue Mar 16, 2022 · 14 comments · Fixed by #7
Closed

Can't build crash-context on arm-unknown-linux-gnueabihf #5

msirringhaus opened this issue Mar 16, 2022 · 14 comments · Fixed by #7
Labels
bug Something isn't working

Comments

@msirringhaus
Copy link

msirringhaus commented Mar 16, 2022

I'm unable to build crash-context on arm-unknown-linux-gnueabihf, either locally (using a raspberry pi) or using github actions: https://github.com/msirringhaus/minidump_writer_linux/actions/runs/1992494641

Unfortunately, the error is only

error: could not compile crash-context

even when running --verbose.
Is this supposed to work?

@msirringhaus msirringhaus added the bug Something isn't working label Mar 16, 2022
@msirringhaus
Copy link
Author

These are working fine:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- i686-unknown-linux-gnu
- aarch64-unknown-linux-gnu

https://github.com/msirringhaus/minidump_writer_linux/actions/runs/1992598643

@Jake-Shadle
Copy link
Member

Hmm, I will install cross locally and try and figure out what the actual error is, as you say the error output from GHA is useless.

@msirringhaus
Copy link
Author

I get the same unhelpful error message locally, too.

@Jake-Shadle
Copy link
Member

I can't even get cross working locally at all because I use podman and using main switched to GHCR which doesn't have proper image tags. 😛

@Jake-Shadle
Copy link
Member

Ahh nvm

[target.arm-unknown-linux-gnueabihf]
image = "ghcr.io/cross-rs/arm-unknown-linux-gnueabihf@sha256:2c7f685d79baa15a6437c9ccb76381ad2f597eec62e1a27f9c11fea5ce2adbf6"

@Jake-Shadle
Copy link
Member

I suspected it was the global_asm! and sure enough I had missed replacing a preprocessor define with its constant during the port. It gives a not great error when building the package directly, but at least show the line that was problematic, but appears to just entirely give up when being compiled as a dependency, even for crates in the same workspace.

@Jake-Shadle
Copy link
Member

I've bumped and published crash-context to 0.0.2.

@msirringhaus
Copy link
Author

Just to confirm: This seems to indeed fix it: https://github.com/msirringhaus/minidump_writer_linux/actions/runs/1993088807
Building locally works now, too.

@dkc6gh
Copy link

dkc6gh commented Jul 16, 2024

@Jake-Shadle @msirringhaus
I am still having the same issue for ARM v7 cross compilatoin. Somehow inserting "nop" into arm.rs source seems to fix the problem for me. Could someone look into this again?

// Return 0
"mov   r0, #0",
"nop",
"bx    lr",

@Jake-Shadle
Copy link
Member

Jake-Shadle commented Jul 22, 2024

Can you please add what target triple doesn't compile and what the compile error actually is? armv7-unknown-linux-gnueabihf compiles just fine.

@dkc6gh
Copy link

dkc6gh commented Jul 23, 2024

Can you please add what target triple doesn't compile and what the compile error actually is? armv7-unknown-linux-gnueabihf compiles just fine.

Here is the mysterious error message:

error: :23:1: invalid instruction, any one of the following would fix this:
bx lr
^

error: could not compile crash-context (lib)

@Jake-Shadle
Copy link
Member

Ok well I'm not seeing that, either you are using a different target triple or you're on an older version of rustc?

@dkc6gh
Copy link

dkc6gh commented Jul 24, 2024

Ok well I'm not seeing that, either you are using a different target triple or you're on an older version of rustc?

The error only occurs when using the 'release' flag. Building without the flag is successful.

@Jake-Shadle
Copy link
Member

#89

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants