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

[Bug] Compilation fails for ARCH s390x and ppc64el #394

Closed
troyanov opened this issue Oct 6, 2023 · 3 comments
Closed

[Bug] Compilation fails for ARCH s390x and ppc64el #394

troyanov opened this issue Oct 6, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@troyanov
Copy link

troyanov commented Oct 6, 2023

What are you really trying to do?

I am trying to cross compile core-sdk in order to use python-sdk on s390x and ppc64el architectures

Describe the bug

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

Caused by:
  process didn't exit successfully: `/Users/troyanov/Documents/work/canonical/temporalio/sdk-core/target/debug/build/ring-f698636ef115f979/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /Users/troyanov/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ring-0.16.20/build.rs:358:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

Minimal Reproduction

cargo build --target=s390x-unknown-linux-gnu
cargo build --target=powerpc64le-unknown-linux-gnu

(make sure required targets are installed, if not add them with rustup target add)

Environment/Versions

❯ git rev-parse @
617612aa419d687aebabcf0258ac86f5c36df189

❯ rustc --version
rustc 1.71.0 (8ede3aae2 2023-07-12)

❯ rustup --version
rustup 1.26.0 (5af9b9484 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.71.0 (8ede3aae2 2023-07-12)`

❯ sysctl -n machdep.cpu.brand_string
Apple M1 Pro

Additional context

Compilation issue should be fixed in the recent ring v0.17.0 version.
Judging based on the following issues were marked as fixed:

ring v0.16.20
├── rustls v0.21.7
│   ├── hyper-rustls v0.24.1
│   │   └── reqwest v0.11.21
│   │       └── temporal-sdk-core v0.1.0 (/cyberfarm/temporalio/sdk-core/core)
│   │           ├── temporal-sdk v0.1.0-alpha.1 (/cyberfarm/temporalio/sdk-core/sdk)
│   │           │   └── temporal-sdk-core-test-utils v0.1.0 (/cyberfarm/temporalio/sdk-core/test-utils)
│   │           │       [dev-dependencies]
│   │           │       └── temporal-sdk-core v0.1.0 (/cyberfarm/temporalio/sdk-core/core) (*)
│   │           │   [dev-dependencies]
│   │           │   └── temporal-sdk-core v0.1.0 (/cyberfarm/temporalio/sdk-core/core) (*)
│   │           └── temporal-sdk-core-test-utils v0.1.0 (/cyberfarm/temporalio/sdk-core/test-utils) (*)
│   ├── reqwest v0.11.21 (*)
│   └── tokio-rustls v0.24.1
│       ├── hyper-rustls v0.24.1 (*)
│       ├── reqwest v0.11.21 (*)
│       └── tonic v0.9.2
│           ├── opentelemetry-otlp v0.13.0
│           │   └── temporal-sdk-core v0.1.0 (/cyberfarm/temporalio/sdk-core/core) (*)
│           ├── opentelemetry-proto v0.3.0
│           │   └── opentelemetry-otlp v0.13.0 (*)
│           ├── temporal-client v0.1.0 (/cyberfarm/temporalio/sdk-core/client)
│           │   ├── temporal-sdk v0.1.0-alpha.1 (/cyberfarm/temporalio/sdk-core/sdk) (*)
│           │   ├── temporal-sdk-core v0.1.0 (/cyberfarm/temporalio/sdk-core/core) (*)
│           │   └── temporal-sdk-core-test-utils v0.1.0 (/cyberfarm/temporalio/sdk-core/test-utils) (*)
│           ├── temporal-sdk v0.1.0-alpha.1 (/cyberfarm/temporalio/sdk-core/sdk) (*)
│           ├── temporal-sdk-core v0.1.0 (/cyberfarm/temporalio/sdk-core/core) (*)
│           ├── temporal-sdk-core-api v0.1.0 (/cyberfarm/temporalio/sdk-core/core-api)
│           │   ├── temporal-client v0.1.0 (/cyberfarm/temporalio/sdk-core/client) (*)
│           │   ├── temporal-sdk v0.1.0-alpha.1 (/cyberfarm/temporalio/sdk-core/sdk) (*)
│           │   ├── temporal-sdk-core v0.1.0 (/cyberfarm/temporalio/sdk-core/core) (*)
│           │   └── temporal-sdk-core-test-utils v0.1.0 (/cyberfarm/temporalio/sdk-core/test-utils) (*)
│           └── temporal-sdk-core-protos v0.1.0 (/cyberfarm/temporalio/sdk-core/sdk-core-protos)
│               ├── temporal-client v0.1.0 (/cyberfarm/temporalio/sdk-core/client) (*)
│               ├── temporal-sdk v0.1.0-alpha.1 (/cyberfarm/temporalio/sdk-core/sdk) (*)
│               ├── temporal-sdk-core v0.1.0 (/cyberfarm/temporalio/sdk-core/core) (*)
│               ├── temporal-sdk-core-api v0.1.0 (/cyberfarm/temporalio/sdk-core/core-api) (*)
│               └── temporal-sdk-core-test-utils v0.1.0 (/cyberfarm/temporalio/sdk-core/test-utils) (*)
├── rustls-webpki v0.101.6
│   └── rustls v0.21.7 (*)
└── sct v0.7.0
    └── rustls v0.21.7 (*)

Since core-sdk doesn't depend directly on the ring crate, dependant dependencies should be tracked.
Most of them depend on ring through rustls

@troyanov troyanov added the bug Something isn't working label Oct 6, 2023
@troyanov troyanov changed the title [Bug] Compilation fails for ARCH s390x and ppc64 [Bug] Compilation fails for ARCH s390x and ppc64el Oct 6, 2023
@cretz
Copy link
Member

cretz commented Oct 6, 2023

Thanks for the report! Since this is actually a dependency of a dependency of a dependency and core is a library, there is nothing to do in this repo since there is no Cargo.lock. I am moving this issue to the Python repo.

I don't see why, once rustls merges and tags a release w/ ring updated, we can't then cargo update in temporalio/bridge dir to get updates. I will watch the PR (let us know if the tag happens and we didn't notice though). Reading the comments on that ring PR, it's looking hopeful they will backport this to a 0.21 patch release. If they don't, we'd need https://github.com/rustls/tokio-rustls to accept the update first.

@cretz cretz transferred this issue from temporalio/sdk-core Oct 6, 2023
@troyanov
Copy link
Author

troyanov commented Oct 6, 2023

Thanks for a quick reply. Indeed sdk-python might be a better place for this bug.

Just for the reference, here is a corresponding 0.21 backport PR to track

@troyanov
Copy link
Author

@cretz it seems the issue is solved now as rustls was bumped to 0.21.8 in #400

I was able to cross-compile temporalio/bridge without any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants