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

Update ci.yml to add support for loongarch64 #2461

Closed
wants to merge 9 commits into from

Conversation

donmor
Copy link
Contributor

@donmor donmor commented Jul 21, 2024

What does this PR do

Add CI support for loongarch64 (re-implementation of #2023 ). Ioctl has been implemented in #2045 .

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

Add support for loongarch64
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@SteveLauC
Copy link
Member

Please also add this target to the target support list of Nix as a tier2 target.

Please also add this.

@donmor donmor changed the title Update ci.yml Update ci.yml to add support for loongarch64 Jul 21, 2024
@SteveLauC
Copy link
Member

Any idea about this error?

error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names --cfg qemu -D warnings --target loongarch64-unknown-linux-gnu --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)
  --- stderr
  error: Error loading target specification: Could not find specification for target "loongarch64-unknown-linux-gnu". Run `rustc --print target-list` for a list of built-in targets

@donmor
Copy link
Contributor Author

donmor commented Jul 21, 2024

Any idea about this error?

error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names --cfg qemu -D warnings --target loongarch64-unknown-linux-gnu --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)
  --- stderr
  error: Error loading target specification: Could not find specification for target "loongarch64-unknown-linux-gnu". Run `rustc --print target-list` for a list of built-in targets

loongarch64-unknown-linux-gnu is not supported by rustc 1.69.

Cross.toml Outdated Show resolved Hide resolved
Cross.toml Outdated Show resolved Hide resolved
@@ -13,7 +13,7 @@ permissions:
contents: read

env:
MSRV: 1.69.0
MSRV: 1.71.0
Copy link
Member

Choose a reason for hiding this comment

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

We should not change the MSRV for an architecture, I think we should add a step that will overwrite the MSRV environment variable to 1.71.0 when ${{ matrix.target }} is loongarch64-unknown-linux-gnu, something like:

- name: change Rust toolchain version for Loongarch
  run: echo "MSRV=$(if [ '${{ matrix.target }}' = 'loongarch64-unknown-linux-gnu' ]; then echo '1.71.0'; else echo '${{ env.MSRV }}'; fi)" >> $GITHUB_ENV

@SteveLauC
Copy link
Member

Ok, I have no idea why it still does not work, it should work according to the cross doc:

[target.aarch64-unknown-linux-gnu]
image.name = "alpine:edge"
image.toolchain = ["x86_64-unknown-linux-musl", "linux/arm64=aarch64-unknown-linux-musl"] # Defaults to `x86_64-unknown-linux-gnu`

@Fearyncess
Copy link
Contributor

cross-rs/cross@8c86a98, probably it should use a git-snapshot version cross-rs.

@Fearyncess
Copy link
Contributor

Fearyncess commented Sep 21, 2024

@donmor @SteveLauC

I have rewrite a new config for Loongarch64 CI, and it works. Unfortunately, I face a big problem with the QEMU and testcases below.
Loongarch64 need a newer QEMU after 7.1 version. But before QEMU supported la64, qemu has a commit that has disabled many PRCTL subcodes 3 yrs ago. This commit will cause test_prctl failed in some cases, due to these subcodes has been disabled in newer QEMU.

BTW, I guess some commits in QEMU can change some syscalls' behavior, that brings some weird test results... -> #2418

@Fearyncess Fearyncess mentioned this pull request Sep 21, 2024
3 tasks
@SteveLauC
Copy link
Member

Close as this will be superseded by #2509.

@SteveLauC SteveLauC closed this Sep 22, 2024
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.

3 participants