Skip to content

Comments

[build] Fix s390x compile errors#44

Merged
ming1 merged 1 commit intoublk-org:mainfrom
tasleson:fix_s390x_build
Nov 21, 2025
Merged

[build] Fix s390x compile errors#44
ming1 merged 1 commit intoublk-org:mainfrom
tasleson:fix_s390x_build

Conversation

@tasleson
Copy link
Contributor

see: tokio-rs/io-uring#333

resolves: #43

@tasleson tasleson marked this pull request as draft November 20, 2025 20:55
@tasleson
Copy link
Contributor Author

tasleson commented Nov 20, 2025

Ugh: I was getting this to compile on s390x, now it's not, hold off on merging.

@tasleson
Copy link
Contributor Author

This works if I do something like this on s390x:

io-uring = { version = "^0.7", features = ["bindgen"]  }

But not on x86, and this doesn't work for s390x, but it does for x86

diff --git a/Cargo.toml b/Cargo.toml
index e613a62..f528df2 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -35,7 +35,15 @@ anyhow = "1.0.66"
 
 [dependencies]
 libc = "0.2"
-io-uring = {version="=0.7.9"}
+
+
+[target.'cfg(target_arch = "s390x")'.dependencies]
+io-uring = { version = "=0.7.9", features = ["bindgen"] }
+
+[target.'cfg(not(target_arch = "s390x"))'.dependencies]
+io-uring = { version = "=0.7.9" }
+
+

As I'm using rust2rpm for packaging this needs to be self contained within the cargo build to keep this easier.

see: tokio-rs/io-uring#333

Signed-off-by: Tony Asleson <tasleson@redhat.com>
@tasleson
Copy link
Contributor Author

tasleson commented Nov 20, 2025

Ok this is working now, I had to learn something new the hard way, ugh

@tasleson tasleson marked this pull request as ready for review November 20, 2025 22:29
@ming1 ming1 merged commit 5bb5966 into ublk-org:main Nov 21, 2025
4 checks passed
@ming1
Copy link
Collaborator

ming1 commented Nov 21, 2025

BTW, just be curious, the s390x build failure isn't triggered on Fedora rublk build:

https://koschei.fedoraproject.org/package/rust-rublk?collection=f44

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.

Failure to build on s390x

2 participants