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

RAC Support for RISC-V #4

Open
microhobby opened this issue Jul 14, 2023 · 11 comments
Open

RAC Support for RISC-V #4

microhobby opened this issue Jul 14, 2023 · 11 comments

Comments

@microhobby
Copy link

My dear maintainers, as maybe you know, I'm working on builds for the Common Torizon: https://github.com/commontorizon/meta-common-torizon

One of the targets has riscv64 architecture, I'm having issues when trying to build RAC for this target. I have not investigated the root cause in depth, first I want to ask if I would expect some dependency not supported for RISC-V. Thought I'd ask first before investigating, maybe the maintainers know of some limitation for this architecture 🤔.

Maybe @simao Let me know.

@simao
Copy link
Collaborator

simao commented Jul 14, 2023

Which errors are you getting? I haven't tried to build for that arch...

@microhobby
Copy link
Author

Follow the logs:

error: failed to run custom build command for `ring v0.16.20`
| note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
| 
| Caused by:
|   process didn't exit successfully: `/workdir/torizon/build-torizon/tmp/work/riscv64-tdx-linux/rac/0.0+gitAUTOINC+719afe6b82-r0/build/target/release/build/ring-5e4ed97de4206132/build-script-build` (exit status: 101)
|   --- stderr
|   thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /workdir/torizon/build-torizon/tmp/work/riscv64-tdx-linux/rac/0.0+gitAUTOINC+719afe6b82-r0/cargo_home/bitbake/ring-0.16.20/build.rs:358:10
|   stack backtrace:
|      0: rust_begin_unwind
|      1: core::panicking::panic_fmt
|      2: core::panicking::panic
|      3: core::option::Option<T>::unwrap
|      4: build_script_build::build_c_code
|      5: build_script_build::ring_build_rs_main
|      6: build_script_build::main
|      7: core::ops::function::FnOnce::call_once
|   note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
| warning: build failed, waiting for other jobs to finish...
|     Building [============>            ] 184/335: sysinfo, memoffset(build)...
|     Building [============>            ] 185/335: sysinfo, memoffset(build)...
|     Building [============>            ] 186/335: sysinfo, memoffset(build)...
|     Building [============>            ] 187/335: sysinfo, memoffset(build)...
|     Building [=============>           ] 188/335: sysinfo, proc-macro-error...
|     Building [=============>           ] 189/335: sysinfo, proc-macro-error...
|     Building [=============>           ] 190/335: sysinfo, proc-macro-error...
|     Building [=============>           ] 191/335: sysinfo, proc-macro-error...
|     Building [=============>           ] 192/335: sysinfo, proc-macro-error...
|     Building [=============>           ] 193/335: sysinfo, futures-macro, n...
|     Building [=============>           ] 194/335: sysinfo, futures-macro, n...
|     Building [=============>           ] 195/335: sysinfo, futures-macro, n...
|     Building [=============>           ] 196/335: sysinfo, futures-macro, n...
|     Building [=============>           ] 197/335: futures-macro, num-bigint...
|     Building [=============>           ] 198/335: futures-macro, num-bigint...
|     Building [=============>           ] 199/335: num-bigint, serde_derive,...
|     Building [=============>           ] 200/335: num-bigint, serde_derive,...
|     Building [==============>          ] 201/335: num-bigint, serde_derive
|     Building [==============>          ] 202/335: serde_derive

@microhobby
Copy link
Author

@simao yeah, appears that ring does not support RISC-V: briansmith/ring#1182

@microhobby
Copy link
Author

@simao but no worries, this is very low priority for now.

@simao
Copy link
Collaborator

simao commented Jul 14, 2023

Unfortunately ring is quite important for us :( Maybe riscv support will be merged eventually in ring.

microhobby added a commit to commontorizon/meta-common-torizon that referenced this issue Jul 17, 2023
For risc-v targets there is not support for RAC yet, so
remove it from the image.

Upstream issue: torizon/rac#4

Signed-off-by: Matheus Castello <[email protected]>
microhobby added a commit to commontorizon/meta-common-torizon that referenced this issue Jul 27, 2023
For risc-v targets there is not support for RAC yet, so
remove it from the image.

Upstream issue: torizon/rac#4

Signed-off-by: Matheus Castello <[email protected]>
microhobby added a commit to commontorizon/meta-common-torizon that referenced this issue Oct 3, 2023
For risc-v targets there is not support for RAC yet, so
remove it from the image.

Upstream issue: torizon/rac#4

Signed-off-by: Matheus Castello <[email protected]>
@tkfu
Copy link
Collaborator

tkfu commented Nov 7, 2023

Just pinging on this one @microhobby: it seems ring 0.17.0, released Oct. 6, now supports RISC-V. Do you mind trying out a build with that dependency bumped to check if it works out of the box, since you've already got something set up?

@simao
Copy link
Collaborator

simao commented Nov 8, 2023

upstream tough still depends on ring 16, tried to compile it with 17 but does not compile. All other dependencies seem to have updated to 0.17 though so we could potentially update them.

leonheldattoradex pushed a commit to leonheldattoradex/meta-common-torizon that referenced this issue Dec 13, 2023
For risc-v targets there is not support for RAC yet, so
remove it from the image.

Upstream issue: torizon/rac#4

Signed-off-by: Matheus Castello <[email protected]>
leonheldattoradex pushed a commit to leonheldattoradex/meta-common-torizon that referenced this issue Dec 15, 2023
For risc-v targets there is not support for RAC yet, so
remove it from the image.

Upstream issue: torizon/rac#4

Signed-off-by: Matheus Castello <[email protected]>
leonheldattoradex pushed a commit to leonheldattoradex/meta-common-torizon that referenced this issue Dec 15, 2023
For risc-v targets there is not support for RAC yet, so
remove it from the image.

Upstream issue: torizon/rac#4

Signed-off-by: Matheus Castello <[email protected]>
microhobby added a commit to commontorizon/meta-common-torizon that referenced this issue Jan 11, 2024
For risc-v targets there is not support for RAC yet, so
remove it from the image.

Upstream issue: torizon/rac#4

Signed-off-by: Matheus Castello <[email protected]>
@tkfu
Copy link
Collaborator

tkfu commented Jan 25, 2024

Looks like tough upstream updated to ring 17: awslabs/tough#717

leonheldattoradex pushed a commit to leonheldattoradex/meta-common-torizon that referenced this issue Feb 5, 2024
For risc-v targets there is not support for RAC yet, so
remove it from the image.

Upstream issue: torizon/rac#4

Signed-off-by: Matheus Castello <[email protected]>
microhobby added a commit to commontorizon/meta-common-torizon that referenced this issue Feb 21, 2024
For risc-v targets there is not support for RAC yet, so
remove it from the image.

Upstream issue: torizon/rac#4

Signed-off-by: Matheus Castello <[email protected]>
@microhobby
Copy link
Author

I will tested it for Common Torizon v6.7.0

@simao
Copy link
Collaborator

simao commented Feb 26, 2024

Unfortunately tough also changed his:

    tough: migrate to async

    Depend on tokio for all IO access and convert all related interfaces to
    async.
    Replace `std::io::Read` with `futures_core::stream::Stream` for
    hopefully seamless migration once `std::async_iter` stabilized.
    Use async-compatible locks from tokio and coincidentally fix a locking issue in
    datastore.

    This also affects the crates tough-kms, tough-ssm and tuftool.

so I will need some time to make RAC compile with the latest upstream changes from tough.

@simao
Copy link
Collaborator

simao commented Feb 26, 2024

tough upgraded ring but ring was still being used by other deps.

You can try #9 this branch is using the latest version of ring.

microhobby added a commit to commontorizon/meta-common-torizon that referenced this issue Mar 19, 2024
For risc-v targets there is not support for RAC yet, so
remove it from the image.

Upstream issue: torizon/rac#4

Signed-off-by: Matheus Castello <[email protected]>
microhobby added a commit to commontorizon/meta-common-torizon that referenced this issue Sep 18, 2024
For risc-v targets there is not support for RAC yet, so
remove it from the image.

Upstream issue: torizon/rac#4

Signed-off-by: Matheus Castello <[email protected]>
microhobby added a commit to commontorizon/meta-common-torizon that referenced this issue Sep 19, 2024
For risc-v targets there is not support for RAC yet, so
remove it from the image.

Upstream issue: torizon/rac#4

Signed-off-by: Matheus Castello <[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

No branches or pull requests

3 participants