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

rust-qoriq: Update to 1.82.0 rust toolchain #6307

Merged
merged 5 commits into from
Nov 7, 2024

Conversation

th0ma7
Copy link
Contributor

@th0ma7 th0ma7 commented Nov 5, 2024

Description

rust-qoriq: Update generation and use of 1.82.0 rust toolchain

Fixes #6297

Versions available: https://releases.rs/docs/

Checklist

  • Build rule all-supported completed successfully
  • New installation of package completed successfully
  • Package upgrade completed successfully (Manually install the package again)
  • Package functionality was tested
  • Any needed documentation is updated/created

Type of change

  • Bug fix
  • Includes small framework changes
  • This change requires a documentation update (e.g. Wiki)

@th0ma7
Copy link
Contributor Author

th0ma7 commented Nov 5, 2024

@hgy59 I haven't tested, but that may also work on 1.82/83 but fails on nightly being next targetted version (i.e. 1.84). Tested is 1.80.1 and ability to build cross/bat afterwards.

Todo, package this resulting rust toolchain + publish on line to then update the toolchain/syno-qoriq-6.2.4-rust.

@th0ma7 th0ma7 mentioned this pull request Nov 5, 2024
10 tasks
@hgy59
Copy link
Contributor

hgy59 commented Nov 5, 2024

@th0ma7 I did (almost) the same yesterday 😆

small differences:
Instead of hard coding the version, I named the variable RUST_BUILD_TAG instead of RUSTUP_DEFAULT_TOOLCHAIN and made it optional instead of hard coded (and I prefere the long version of git arguments here).

mk/spksrc.rust-env.mk:
under @$(MSG) "Building Tier-3 rust target: $(RUST_TARGET)"

ifneq ($(RUST_BUILD_TAG),)
	@$(MSG) "Checkout rust tag $(RUST_BUILD_TAG)"
	@(cd $(WORK_DIR) && [ ! -d rust ] && git clone --branch $(RUST_BUILD_TAG) --depth 1  https://github.com/rust-lang/rust.git)
else        
	@$(MSG) "Build latests release (current HEAD)"
	@(cd $(WORK_DIR) && [ ! -d rust ] && git clone --depth 1 https://github.com/rust-lang/rust.git || true)
endif

so to create a toolchain call (in toolchain/syno-qoriq-6.2.4-rust):

make RUST_BUILD_TOOLCHAIN=1 RUST_TARGET=1.80.1

The name of the variable is subject to change, but I dislike the DEFAULT part in your version (RUSTUP_DEFAULT_TOOLCHAIN).
If we must set RUSTUP_DEFAULT_TOOLCHAIN for qoriq for other reason, it should not be hard coded in mk/spksrc.cross-rust-env.mk
We have to find a way to use the same value as PKG_VERS defined in toolchain/syno-qoriq-6.2.4-rust/Makefile.


Further I would like to include the toolchain version in the final archive name to omit the need of a release tag for every version and create all further releases under something like https://github.com/SynoCommunity/spksrc/releases/download/toolchains/rust

But my final tests did not work and I planned to validate the whole cycle with a plain environment (later).
And I didn't want create a PR before everything works as expected...

Open questions:

  • is it possible to name the qoriq toolchain like 1.80.1-stage2_powerpc-unknown-linux-gnuspe (or even omit the stage2 part) or must it be called exactly stage2_powerpc-unknown-linux-gnuspe?
  • can we name the archive with the version like 1.80.1-powerpc-unknown-linux-gnuspe.tar.xz independent of the answer to the question above?

@th0ma7
Copy link
Contributor Author

th0ma7 commented Nov 6, 2024

@hgy59 I've updated the version to 1.82.0 and it works well. I've also implemented pretty much all of your suggested changes. toolchain/syno-qoriq-6.2.4-rust/Makefile is obviously untested and will probably require a bit more love once you upload an updated qoriq rust package online.

Let me know what you think of the changes (and feel free to chime in additional subtilities you feel would be worth it).

Lastly, reminder, we need to change back RUST_BUILD_TOOLCHAIN = 0 before merging.

hgy59 added 2 commits November 6, 2024 22:51
- use published rust 1.82.0 for qoriq
- revert force of RUST_BUILD_TOOLCHAIN
- add diyspk/pngquant (part of spk/imagemagick)
- temp build with all wheels
@hgy59
Copy link
Contributor

hgy59 commented Nov 6, 2024

@th0ma7 congrats: nice work, and good news!

everything works as expected.

successfully built all diyspk of tools created with rust (bandwhich bat bottom dua dutree eza fd lsd procs ripgrep sd pngquant) for qoriq-6.2.4.

and python311 including all wheels succeeded.

for python310 I had to adjust setuptools for numpy and to add crossenv/bin to the path for cryptography and other wheels using maturin.

only ffsync (i.e. syncstorage-rs) failed to build for qoriq-6.2.4 (so I left it unsupported)

PS
github failed when creating the tag toolchains/rust (500) so I had to create a different tag (rust/qoriq).
probably a conflict with the existing tag toolchains/rust/1.77.0-nightly

@hgy59
Copy link
Contributor

hgy59 commented Nov 6, 2024

Lastly, reminder, we need to change back WHEELS_TEST_ALL = 0 in spk/python310/Makefile before merging.

@hgy59
Copy link
Contributor

hgy59 commented Nov 6, 2024

@th0ma7 as long as non of the packages (tools) require a different rust toolchain version, this solution works.

So far we need a different version only for the hi3535 arch, this is not a problem either.

Only when different tools require different toolchains for the same arch, this will be a problem.
Hopefully this will never apply for qoirq...

- revert WHEELS_TEST_ALL
- avoid variable in DEPENDS
Copy link
Contributor

@hgy59 hgy59 left a comment

Choose a reason for hiding this comment

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

LGTM

@th0ma7
Copy link
Contributor Author

th0ma7 commented Nov 6, 2024

@th0ma7 as long as non of the packages (tools) require a different rust toolchain version, this solution works.

So far we need a different version only for the hi3535 arch, this is not a problem either.

Only when different tools require different toolchains for the same arch, this will be a problem. Hopefully this will never apply for qoirq...

I have a feeling that armv5 and armv7l may require a home build as well before long... wait to be seen. But as long as it works we're good!

@hgy59 hgy59 changed the title rust-qoriq: Enable generation of a 1.80.1 rust toolchain rust-qoriq: Update to 1.82.0 rust toolchain Nov 7, 2024
@hgy59 hgy59 merged commit ac27e7a into SynoCommunity:master Nov 7, 2024
15 checks passed
@th0ma7 th0ma7 deleted the qoriq-rust-update branch November 7, 2024 10:22
@mreid-tt mreid-tt mentioned this pull request Nov 7, 2024
10 tasks
urosch pushed a commit to urosch/spksrc that referenced this pull request Dec 9, 2024
* rust-qoriq: update to 1.82.0-powerpc-unknown-linux-gnuspe
- use published rust 1.82.0 for qoriq
- add diyspk/pngquant (part of spk/imagemagick)

* python310: fix build for numpy wheel

---------

Co-authored-by: hgy59 <[email protected]>
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.

rust builds for qoriq do not work anymore
2 participants