Skip to content

x86_64-unknown-linux-gnux32 target fails to compile #1645

Description

@xtqqczze

The following targets fail to compile since #1594:

  • x86_64-unknown-linux-gnux32 (Tier 2 without Host Tools)
  • mips64-openwrt-linux-musl (Tier 3)
  • sparc-unknown-linux-gnu (Tier 3)
  • aarch64-unknown-linux-gnu_ilp32 (Tier 3)
$ cargo check -q --workspace --target=x86_64-unknown-linux-gnux32 --features=all-apis --all-targets
error[E0308]: mismatched types
    --> src/io_uring/mod.rs:2000:9
     |
2000 |         static_assertions::assert_eq_align!(io_uring_ptr, u64);
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |         |
     |         expected an array with a size of 4, found one with a size of 8
     |         expected due to this
     |
     = note: this error originates in the macro `static_assertions::assert_eq_align` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> src/check_types.rs:9:9
     |
   9 |           ::static_assertions::assert_eq_align!($struct, c::$struct);
     |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |           |
     |           expected an array with a size of 4, found one with a size of 8
     |           expected due to this
     |
    ::: src/io_uring/mod.rs:2086:9
     |
2086 | /         check_struct!(
2087 | |             io_uring_params,
2088 | |             sq_entries,
2089 | |             cq_entries,
...    |
2097 | |             cq_off
2098 | |         );
     | |_________- in this macro invocation
     |
     = note: this error originates in the macro `::static_assertions::assert_eq_align` which comes from the expansion of the macro `check_struct` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> src/check_types.rs:9:9
     |
   9 |           ::static_assertions::assert_eq_align!($struct, c::$struct);
     |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |           |
     |           expected an array with a size of 4, found one with a size of 8
     |           expected due to this
     |
    ::: src/io_uring/mod.rs:2099:9
     |
2099 | /         check_struct!(
2100 | |             io_sqring_offsets,
2101 | |             head,
2102 | |             tail,
...    |
2109 | |             user_addr
2110 | |         );
     | |_________- in this macro invocation
     |
     = note: this error originates in the macro `::static_assertions::assert_eq_align` which comes from the expansion of the macro `check_struct` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> src/check_types.rs:9:9
     |
   9 |           ::static_assertions::assert_eq_align!($struct, c::$struct);
     |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |           |
     |           expected an array with a size of 4, found one with a size of 8
     |           expected due to this
     |
    ::: src/io_uring/mod.rs:2111:9
     |
2111 | /         check_struct!(
2112 | |             io_cqring_offsets,
2113 | |             head,
2114 | |             tail,
...    |
2121 | |             user_addr
2122 | |         );
     | |_________- in this macro invocation
     |
     = note: this error originates in the macro `::static_assertions::assert_eq_align` which comes from the expansion of the macro `check_struct` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> src/check_types.rs:9:9
     |
   9 |           ::static_assertions::assert_eq_align!($struct, c::$struct);
     |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |           |
     |           expected an array with a size of 4, found one with a size of 8
     |           expected due to this
     |
    ::: src/io_uring/mod.rs:2130:9
     |
2130 | /         check_struct!(
2131 | |             io_uring_getevents_arg,
2132 | |             sigmask,
2133 | |             sigmask_sz,
2134 | |             min_wait_usec,
2135 | |             ts
2136 | |         );
     | |_________- in this macro invocation
     |
     = note: this error originates in the macro `::static_assertions::assert_eq_align` which comes from the expansion of the macro `check_struct` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> src/check_types.rs:9:9
     |
   9 |         ::static_assertions::assert_eq_align!($struct, c::$struct);
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |         |
     |         expected an array with a size of 4, found one with a size of 8
     |         expected due to this
     |
    ::: src/io_uring/mod.rs:2140:9
     |
2140 |         check_struct!(io_uring_buf, addr, len, bid, resv);
     |         ------------------------------------------------- in this macro invocation
     |
     = note: this error originates in the macro `::static_assertions::assert_eq_align` which comes from the expansion of the macro `check_struct` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
    --> src/check_types.rs:18:9
     |
  18 |           ::static_assertions::assert_eq_align!($to, c::$from);
     |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |           |
     |           expected an array with a size of 4, found one with a size of 8
     |           expected due to this
     |
    ::: src/io_uring/mod.rs:2157:9
     |
2157 | /         check_renamed_type!(
2158 | |             buf_ring_bufs_struct,
2159 | |             io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2
2160 | |         );
     | |_________- in this macro invocation
     |
     = note: this error originates in the macro `::static_assertions::assert_eq_align` which comes from the expansion of the macro `check_renamed_type` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
  --> src/fs/constants.rs:60:9
   |
60 |         static_assertions::assert_eq_size!(FsWord, linux_raw_sys::general::__fsword_t);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: source type: `i64` (64 bits)
   = note: target type: `u32` (32 bits)
   = note: this error originates in the macro `static_assertions::assert_eq_size` (in Nightly builds, run with -Z macro-backtrace for more info)

Some errors have detailed explanations: E0308, E0512.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `rustix` (lib test) due to 8 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions