Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Build armv5 and armv7l rust 1.82.0 builds #6364

Closed
wants to merge 3 commits into from

Conversation

th0ma7
Copy link
Contributor

@th0ma7 th0ma7 commented Dec 30, 2024

Description

Build armv5 and armv7l rust 1.82.0 builds

Relates to #6357

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
  • New Package
  • Package update
  • Includes small framework changes
  • This change requires a documentation update (e.g. Wiki)

Testing

  • hi3535 (bat with a rust 1.82.0)
  • 88f6281 - FAILS - glibc too old (2.15) - requires getauxval introduced with glibc >= 2.16

@th0ma7
Copy link
Contributor Author

th0ma7 commented Dec 30, 2024

@hgy59 currently testing building a 1.82.0 rust for both armv5 and armv7l

For the moment I:

  1. enabled rust builds
  2. created the syno-hi3535-6.2.4-rust and syno-88f6281-6.2.4-rust placeholders

TODO:
3. confirm it does build (in-progress) - and to be tested with bat
4. adapt syno-hi3535-6.2.4 and syno-88f6281-6.2.4 to depend on their *-rust relative.
5. upload rust build on github
6. update digests file

@th0ma7
Copy link
Contributor Author

th0ma7 commented Dec 30, 2024

@hgy59 so its the end of the road for rust on armv5. I may still work for some use-cases but will fail more and more often as crates are being updated and requires a rust version supporting getauxval (and probably others) from a glibc >= 2.16. Note that I was able to build a rust version 1.81 and 1.82 for armv5 but it failed at building bat afterwards.

   Compiling bat v0.24.0 (/home/spksrc/rust-arm/spksrc/cross/bat/work-88f6281-6.2.4/bat-0.24.0)
error: linking with `/home/spksrc/rust-arm/spksrc/toolchain/syno-88f6281-6.2.4/work/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi-gcc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/spksrc/rust-arm/spksrc/toolchain/syno-88f6281-6.2.4/work/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/spksrc/rust-arm/spksrc/toolchain/syno-88f6281-6.2.4/work/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/spksrc/rust-arm/spksrc/toolchain/syno-88f6281-6.2.4/work/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/spksrc/rust-arm/spksrc/native/cmake/work-native/install/usr/local/bin:/home/spksrc/rust-arm/spksrc/distrib/cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" VSLANG="1033" "/home/spksrc/rust-arm/spksrc/toolchain/syno-88f6281-6.2.4/work/arm-marvell-linux-gnueabi/bin/arm-marvell-linux-gnueabi-gcc" "/tmp/rustceILnJl/symbols.o" "/home/spksrc/rust-arm/spksrc/cross/bat/work-88f6281-6.2.4/bat-0.24.0/target/armv5te-unknown-linux-gnueabi/release/deps/bat-fb55fceb8b1405a9.bat.b59877c9a0f7f0c5-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/home/spksrc/rust-arm/spksrc/cross/bat/work-88f6281-6.2.4/bat-0.24.0/target/armv5te-unknown-linux-gnueabi/release/deps" "-L" "/home/spksrc/rust-arm/spksrc/cross/bat/work-88f6281-6.2.4/bat-0.24.0/target/release/deps" "-L" "/home/spksrc/rust-arm/spksrc/cross/bat/work-88f6281-6.2.4/bat-0.24.0/target/armv5te-unknown-linux-gnueabi/release/build/sys-info-ede4b3b51e629627/out" "-L" "/home/spksrc/rust-arm/spksrc/cross/bat/work-88f6281-6.2.4/bat-0.24.0/target/armv5te-unknown-linux-gnueabi/release/build/libgit2-sys-c3a0e5ce8873f561/out/build" "-L" "/home/spksrc/rust-arm/spksrc/cross/bat/work-88f6281-6.2.4/bat-0.24.0/target/armv5te-unknown-linux-gnueabi/release/build/libz-sys-d557fd06ef8f66d4/out/lib" "-L" "/home/spksrc/rust-arm/spksrc/cross/bat/work-88f6281-6.2.4/bat-0.24.0/target/armv5te-unknown-linux-gnueabi/release/build/libz-sys-d557fd06ef8f66d4/out/lib" "-L" "/home/spksrc/rust-arm/spksrc/cross/bat/work-88f6281-6.2.4/bat-0.24.0/target/armv5te-unknown-linux-gnueabi/release/build/onig_sys-62b26158938dd64e/out" "-L" "/home/spksrc/rust-arm/spksrc/toolchain/syno-88f6281-6.2.4/work/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/armv5te-unknown-linux-gnueabi/lib" "-Wl,-Bstatic" "/tmp/rustceILnJl/libsys_info-64b82ead014a4ff3.rlib" "/tmp/rustceILnJl/liblibgit2_sys-6e365b587a34382b.rlib" "/tmp/rustceILnJl/liblibz_sys-452b500d13f46567.rlib" "/tmp/rustceILnJl/libonig_sys-053cc6a896d823cc.rlib" "/home/spksrc/rust-arm/spksrc/toolchain/syno-88f6281-6.2.4/work/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/armv5te-unknown-linux-gnueabi/lib/libcompiler_builtins-6d9b61e1559a248c.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/spksrc/rust-arm/spksrc/toolchain/syno-88f6281-6.2.4/work/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/armv5te-unknown-linux-gnueabi/lib" "-o" "/home/spksrc/rust-arm/spksrc/cross/bat/work-88f6281-6.2.4/bat-0.24.0/target/armv5te-unknown-linux-gnueabi/release/deps/bat-fb55fceb8b1405a9" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-all" "-nodefaultlibs"
  = note: /home/spksrc/rust-arm/spksrc/cross/bat/work-88f6281-6.2.4/bat-0.24.0/target/armv5te-unknown-linux-gnueabi/release/deps/bat-fb55fceb8b1405a9.bat.b59877c9a0f7f0c5-cgu.0.rcgu.o: In function `sigstack_size':
          /home/spksrc/rust-arm/spksrc/toolchain/syno-88f6281-6.2.4/work/rust/library/std/src/sys/pal/unix/stack_overflow.rs:273: undefined reference to `getauxval'
          /home/spksrc/rust-arm/spksrc/toolchain/syno-88f6281-6.2.4/work/rust/library/std/src/sys/pal/unix/stack_overflow.rs:273: undefined reference to `getauxval'
          collect2: ld returned 1 exit status
          
  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
  = note: use the `-l` flag to specify native libraries to link
  = note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-lib)

error: could not compile `bat` (bin "bat") due to 1 previous error
error: failed to compile `bat v0.24.0 (/home/spksrc/rust-arm/spksrc/cross/bat/work-88f6281-6.2.4/bat-0.24.0)`, intermediate artifacts can be found at `/home/spksrc/rust-arm/spksrc/cross/bat/work-88f6281-6.2.4/bat-0.24.0/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
make[2]: *** [../../mk/spksrc.cross-rust.mk:71: rust_install_target] Error 101
make[2]: Leaving directory '/home/spksrc/rust-arm/spksrc/cross/bat'
make[1]: *** [../../mk/spksrc.supported.mk:74: build-arch-88f6281-6.2.4] Error 1
make[1]: Leaving directory '/home/spksrc/rust-arm/spksrc/cross/bat'

The good news is that hi3535 does work.

@th0ma7
Copy link
Contributor Author

th0ma7 commented Dec 30, 2024

@hgy59 would you be able to upload a hi3535 rust toolchain similarly to qoriq using this PR? I'll then be able to complete de work on this. Thnx.

@hgy59
Copy link
Contributor

hgy59 commented Dec 30, 2024

@hgy59 would you be able to upload a hi3535 rust toolchain similarly to qoriq using this PR? I'll then be able to complete de work on this. Thnx.

Is this needed? (sorry didn't read all your notes above)?
I already did some analysis, and there is an issue with fd (fd-find) of synocli-file. If this can't be fixed, I will remove fd for hi3535 archs there.
(don't have access to my dev env for some days).

@th0ma7
Copy link
Contributor Author

th0ma7 commented Dec 30, 2024

@hgy59 for instance bat now fails to build unless having a rust 1.81 toolchain or newer. As hi3535 and armv5 are no longer provided since 1.77.2... we now have to build our own.

@th0ma7
Copy link
Contributor Author

th0ma7 commented Jan 4, 2025

@hgy59 let me know if this is something you want to pursue. As mentioned, we can definitively have a hi3535 updated rust toolchain similarly to qoriq which would fix bat builds and probably other to come.

As for armv5, nothing much we can do any longer.

@hgy59
Copy link
Contributor

hgy59 commented Jan 4, 2025

@th0ma7 no need for custom ARMv7L (hi3535) rust.
Everything (except cross/fd) is ok, when removing line #50 in mk/spksrc.cross-rust-env.mk (i.e. remove RUSTUP_DEFAULT_TOOLCHAIN = 1.77.2 for ARMv7L_ARCHS).

I have an update of synocli-file in progress that does this and drops fd-find (cross/fd) for hi3535,
and it includes bat for hi3535 too (successfully built with original rustc 1.83.0).

@hgy59
Copy link
Contributor

hgy59 commented Jan 4, 2025

The reason to drop fd-find for hi3535 is the issue #6145.
i.e. we do not support to build cross/fd_7.8.0 with rust 1.77.2 and build cross/bat with current rust for hi3535 and both within the synocli-file package.

If we don't want to drop fd for hi3535, we could include a prebuilt binary of fd (but I don't like this).

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

Successfully merging this pull request may close these issues.

2 participants