Main fails to build on nix #1801

Closed
opened 2026-05-23 08:11:26 +00:00 by illucc · 0 comments

Using the package provided by this flake and the matrix-continuwuity module causes the build to fail with the following

error[E0308]: mismatched types
   --> /nix/store/zjaj5k6hx7dga782akv2h3hh6sganrx7-vendor-cargo-deps/8c12dd1401c4173a6c21fe4e247ae36177180b877c3af48be7fd7e5b6040626c/rust-rocksdb-0.49.1/src/slice_transform.rs:54:22
    |
 54 |                 Some(slice_transform_name_callback),
    |                 ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters
    |                 |
    |                 arguments to this enum variant are incorrect
    |
    = note: expected fn pointer `unsafe extern "C" fn(*mut c_void, *const i8, usize) -> u8`
                  found fn item `unsafe extern "C" fn(*mut c_void) -> *const i8 {slice_transform_name_callback}`
help: the type constructed contains `unsafe extern "C" fn(*mut c_void) -> *const i8 {slice_transform_name_callback}` due to the type of the argument passed
   --> /nix/store/zjaj5k6hx7dga782akv2h3hh6sganrx7-vendor-cargo-deps/8c12dd1401c4173a6c21fe4e247ae36177180b877c3af48be7fd7e5b6040626c/rust-rocksdb-0.49.1/src/slice_transform.rs:54:17
    |
 54 |                 Some(slice_transform_name_callback),
    |                 ^^^^^-----------------------------^
    |                      |
    |                      this argument influences the type of `Some`
note: tuple variant defined here
   --> /nix/store/07r1r5f75hg2zs3pbndhfpl4dgihbkin-rust-1.95.0/lib/rustlib/src/rust/library/core/src/option.rs:608:5
    |
608 |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
    |     ^^^^

error[E0061]: this function takes 6 arguments but 5 arguments were supplied
  --> /nix/store/zjaj5k6hx7dga782akv2h3hh6sganrx7-vendor-cargo-deps/8c12dd1401c4173a6c21fe4e247ae36177180b877c3af48be7fd7e5b6040626c/rust-rocksdb-0.49.1/src/slice_transform.rs:49:13
   |
49 |               ffi::rocksdb_slicetransform_create(
   |  _____________^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
50 | |                 cb as *mut c_void,
51 | |                 Some(slice_transform_destructor_callback),
52 | |                 Some(transform_callback),
53 | |                 Some(in_domain_callback),
54 | |                 Some(slice_transform_name_callback),
55 | |             )
   | |_____________- argument #6 of type `Option<unsafe extern "C" fn(*mut c_void) -> *const i8>` is missing
   |
note: function defined here
  --> /build/source/target/release/build/rust-librocksdb-sys-79e09ff7e0944f90/out/bindings.rs:3:154331
   |
 3 | ...ut libc :: c_char) ; } unsafe extern "C" { pub fn rocksdb_slicetransform_create (state : * mut libc :: c_void , destructor : :: s...
   |                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: provide the argument
   |
49 |             ffi::rocksdb_slicetransform_create(
...
54 |                 Some(slice_transform_name_callback),
55 ~                 /* Option<unsafe extern "C" fn(*mut c_void) -> *const i8> */,
56 ~             )
Using the package provided by this flake and the `matrix-continuwuity` module causes the build to fail with the following ``` error[E0308]: mismatched types --> /nix/store/zjaj5k6hx7dga782akv2h3hh6sganrx7-vendor-cargo-deps/8c12dd1401c4173a6c21fe4e247ae36177180b877c3af48be7fd7e5b6040626c/rust-rocksdb-0.49.1/src/slice_transform.rs:54:22 | 54 | Some(slice_transform_name_callback), | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters | | | arguments to this enum variant are incorrect | = note: expected fn pointer `unsafe extern "C" fn(*mut c_void, *const i8, usize) -> u8` found fn item `unsafe extern "C" fn(*mut c_void) -> *const i8 {slice_transform_name_callback}` help: the type constructed contains `unsafe extern "C" fn(*mut c_void) -> *const i8 {slice_transform_name_callback}` due to the type of the argument passed --> /nix/store/zjaj5k6hx7dga782akv2h3hh6sganrx7-vendor-cargo-deps/8c12dd1401c4173a6c21fe4e247ae36177180b877c3af48be7fd7e5b6040626c/rust-rocksdb-0.49.1/src/slice_transform.rs:54:17 | 54 | Some(slice_transform_name_callback), | ^^^^^-----------------------------^ | | | this argument influences the type of `Some` note: tuple variant defined here --> /nix/store/07r1r5f75hg2zs3pbndhfpl4dgihbkin-rust-1.95.0/lib/rustlib/src/rust/library/core/src/option.rs:608:5 | 608 | Some(#[stable(feature = "rust1", since = "1.0.0")] T), | ^^^^ error[E0061]: this function takes 6 arguments but 5 arguments were supplied --> /nix/store/zjaj5k6hx7dga782akv2h3hh6sganrx7-vendor-cargo-deps/8c12dd1401c4173a6c21fe4e247ae36177180b877c3af48be7fd7e5b6040626c/rust-rocksdb-0.49.1/src/slice_transform.rs:49:13 | 49 | ffi::rocksdb_slicetransform_create( | _____________^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- 50 | | cb as *mut c_void, 51 | | Some(slice_transform_destructor_callback), 52 | | Some(transform_callback), 53 | | Some(in_domain_callback), 54 | | Some(slice_transform_name_callback), 55 | | ) | |_____________- argument #6 of type `Option<unsafe extern "C" fn(*mut c_void) -> *const i8>` is missing | note: function defined here --> /build/source/target/release/build/rust-librocksdb-sys-79e09ff7e0944f90/out/bindings.rs:3:154331 | 3 | ...ut libc :: c_char) ; } unsafe extern "C" { pub fn rocksdb_slicetransform_create (state : * mut libc :: c_void , destructor : :: s... | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: provide the argument | 49 | ffi::rocksdb_slicetransform_create( ... 54 | Some(slice_transform_name_callback), 55 ~ /* Option<unsafe extern "C" fn(*mut c_void) -> *const i8> */, 56 ~ ) ```
Jade closed this issue 2026-05-23 18:50:17 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
continuwuation/continuwuity#1801
No description provided.