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

MIPS cross compilation works for GitHub Workflow but not locally...? #1144

Closed
KaraRyougi opened this issue Mar 14, 2023 · 4 comments
Closed

Comments

@KaraRyougi
Copy link

I got the following error using the instructions in .github/workflowsbuild-release.yml:

error: failed to run custom build command for `ring v0.16.20`

Caused by:
  process didn't exit successfully: `/target/release/build/ring-ef45c452e46e5833/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/build.rs:358:10

which seems to be a common one (see briansmith/ring#562). However it seems the GitHub workflow is perfectly fine with compiling it... What am I missing?

@zonyitoo
Copy link
Collaborator

zonyitoo commented Mar 14, 2023

If you compile it with cross exactly like what we did in build-release.yml, then there should be no problem, because it actually run the building process in Docker.

ring-0.16.20/build.rs:358:10 is:

image

Ah, well, MIPS target shouldn't deps on ring at all! Because ring doesn't support MIPS.

[target.'cfg(any(target_arch = "x86_64", target_arch = "aarch64"))'.dependencies]
shadowsocks-crypto = { version = "0.5.1", features = ["ring"] }
[target.'cfg(not(any(target_arch = "x86_64", target_arch = "aarch64")))'.dependencies]
shadowsocks-crypto = { version = "0.5.1", features = [] }

Which version of rustc and cargo are you using?

@KaraRyougi
Copy link
Author

KaraRyougi commented Mar 14, 2023

rustc 1.68.0 (2c8cc3432 2023-03-06)
cargo 1.68.0 (115f34552 2023-02-26)

Yeah I was also suspecting it's a rust version issue...

@zonyitoo
Copy link
Collaborator

Try to run rustup upgrade for all your local tool chain, and then removes those existed containers and images let cross download the latest images.

@KaraRyougi
Copy link
Author

It might be related to my Debian 12 Bookworm environment. I tried again on another Debian 11 machine and everything works fine.

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

No branches or pull requests

2 participants