Skip to content

Build error on Fedora 41 #305

@vmiklos

Description

@vmiklos

Hi,

I ran into a weird problem while using the rust_icu_ucol crate. Fedora 40 with rustc 1.82.0 compiles this just fine:

  • Cargo.toml:
[package]
name = "test"
version = "0.1.0"
edition = "2021"
[dependencies]
rust_icu_ucol = "5.0.0"
  • src/main.rs:
fn main() {
}

And then on Fedora 40 cargo run passes fine. (After dnf install libicu-devel and dnf install clang-devel.)

The same fails on Fedora 41 with:

# cargo run
   Compiling rust_icu_ustring v5.0.0
   Compiling rust_icu_uenum v5.0.0
error[E0425]: cannot find function `u_strFromUTF8_74` in crate `$crate`
   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rust_icu_ustring-5.0.0/src/lib.rs:161:13
    |
161 |             versioned_function!(u_strFromUTF8)(
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `$crate`
    |
    = note: this error originates in the macro `versioned_function` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0425]: cannot find function `u_strFromUTF8_74` in crate `$crate`
   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rust_icu_ustring-5.0.0/src/lib.rs:180:13
    |
180 |             versioned_function!(u_strFromUTF8)(
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `$crate`
    |
    = note: this error originates in the macro `versioned_function` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0425]: cannot find function `u_strToUTF8_74` in crate `$crate`
   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rust_icu_ustring-5.0.0/src/lib.rs:210:13
    |
210 |             versioned_function!(u_strToUTF8)(
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `$crate`
    |
    = note: this error originates in the macro `versioned_function` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0425]: cannot find function `u_strToUTF8_74` in crate `$crate`
   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rust_icu_ustring-5.0.0/src/lib.rs:235:13
    |
235 |             versioned_function!(u_strToUTF8)(
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `$crate`
    |
    = note: this error originates in the macro `versioned_function` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0425]: cannot find function `uenum_openCharStringsEnumeration_74` in crate `$crate`
  --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rust_icu_uenum-5.0.0/src/lib.rs:67:13
   |
67 |             versioned_function!(uenum_openCharStringsEnumeration)(
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `$crate`
   |
   = note: this error originates in the macro `versioned_function` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0425]: cannot find function `uenum_close_74` in crate `$crate`
  --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rust_icu_uenum-5.0.0/src/lib.rs:89:18
   |
89 |         unsafe { versioned_function!(uenum_close)(self.rep) };
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `$crate`
   |
   = note: this error originates in the macro `versioned_function` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0425]: cannot find function `uenum_next_74` in crate `$crate`
   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rust_icu_uenum-5.0.0/src/lib.rs:104:28
    |
104 |         let raw = unsafe { versioned_function!(uenum_next)(self.rep, &mut len, &mut status) };
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `$crate`
    |
    = note: this error originates in the macro `versioned_function` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0425]: cannot find function `ucal_openCountryTimeZones_74` in crate `$crate`
   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rust_icu_uenum-5.0.0/src/lib.rs:156:9
    |
156 |         versioned_function!(ucal_openCountryTimeZones)(asciiz_country.as_ptr(), &mut status)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `$crate`
    |
    = note: this error originates in the macro `versioned_function` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0412]: cannot find type `USystemTimeZoneType` in crate `sys`
   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rust_icu_uenum-5.0.0/src/lib.rs:170:21
    |
170 |     zone_type: sys::USystemTimeZoneType,
    |                     ^^^^^^^^^^^^^^^^^^^ not found in `sys`

error[E0425]: cannot find function `ucal_openTimeZoneIDEnumeration_74` in crate `$crate`
   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rust_icu_uenum-5.0.0/src/lib.rs:185:9
    |
185 |         versioned_function!(ucal_openTimeZoneIDEnumeration)(
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `$crate`
    |
    = note: this error originates in the macro `versioned_function` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0425]: cannot find function `ucal_openTimeZones_74` in crate `$crate`
   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rust_icu_uenum-5.0.0/src/lib.rs:217:9
    |
217 |         versioned_function!(ucal_openTimeZones)(&mut status)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `$crate`
    |
    = note: this error originates in the macro `versioned_function` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0425]: cannot find function `uloc_openKeywords_74` in crate `$crate`
   --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rust_icu_uenum-5.0.0/src/lib.rs:234:9
    |
234 |         versioned_function!(uloc_openKeywords)(asciiz_locale.as_ptr(), &mut status)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `$crate`
    |
    = note: this error originates in the macro `versioned_function` (in Nightly builds, run with -Z macro-backtrace for more info)

Some errors have detailed explanations: E0412, E0425.
For more information about an error, try `rustc --explain E0412`.
For more information about this error, try `rustc --explain E0425`.
error: could not compile `rust_icu_uenum` (lib) due to 8 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `rust_icu_ustring` (lib) due to 4 previous errors

The icu version in Fedora 41 is 74.2, but Fedora 40 had the same icu version. The issue is visible in fedora:40 and fedora:41 containers as well, no need to actually install any Fedora.

Once difference I found is that:

  • Fedora 40 target/debug/build/rust_icu_sys-fedfbe3148238247/out/lib.rs does contain a pub fn u_strToUTF8_74 f40-lib.rs.txt

  • Fedora 41 target/debug/build/rust_icu_sys-6cca77e9f12ff643/out/lib.rs indeed doesn't contain any mention of u_strToUTF8 f41-lib.rs.txt

But I'm not sure how this difference is possible, once the icu and clang development headers are installed. Do you have any guess what might be the problem?

Thanks.

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