Bug 1220175 - bcachefs-tools fails to build on 32bit architectures
Summary: bcachefs-tools fails to build on 32bit architectures
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Kernel:Filesystems (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: David Disseldorp
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-22 06:09 UTC by David Disseldorp
Modified: 2024-02-22 11:35 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Disseldorp 2024-02-22 06:09:46 UTC
With the update to upstream v1.6.3 arm7hl and i586 architectures fail to build with:

[   68s]    Compiling bch_bindgen v0.1.0 (/home/abuild/rpmbuild/BUILD/bcachefs-tools-1.6.3/bch_bindgen)
[   68s] error[E0308]: mismatched types
[   68s]     --> src/wrappers/handle.rs:50:61
[   68s]      |
[   68s] 50   |         let ret = unsafe { libc::ioctl(self.inner.ioctl_fd, request as u64, payload_ptr) };
[   68s]      |                            -----------                      ^^^^^^^^^^^^^^ expected `u32`, found `u64`
[   68s]      |                            |
[   68s]      |                            arguments to this function are incorrect
[   68s]      |
[   68s] note: function defined here
[   68s]     --> /home/abuild/rpmbuild/BUILD/bcachefs-tools-1.6.3/vendor/libc/src/unix/linux_like/linux/gnu/mod.rs:1405:12
[   68s]      |
[   68s] 1405 |     pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
[   68s]      |            ^^^^^
[   68s] help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
[   68s]      |
[   68s] 50   |         let ret = unsafe { libc::ioctl(self.inner.ioctl_fd, (request as u64).try_into().unwrap(), payload_ptr) };
[   68s]      |                                                             +              +++++++++++++++++++++

It looks like this has already been fixed upstream via 25e84a99 ("rust: use libc::Ioctl type for ioctl() request argument") so my plan is to pull that in.
Comment 1 David Disseldorp 2024-02-22 11:35:08 UTC
On it's way to Factory via https://build.opensuse.org/request/show/1149116 . Closing...