google / rust_icu

rust_icu: rust bindings for ICU (International Components for Unicode) library
Apache License 2.0
117 stars 28 forks source link

Does not build in OpenSuSe when versioned_function is used #267

Open rostamn739 opened 1 year ago

rostamn739 commented 1 year ago

I'm trying to port Rust software to Opensuse

One of the crates uses rust_icu_sys directly When any code tries to use the macro versioned_function! with some ICU symbol, a build error appears:

error[E0425]: cannot find function `ucol_strcoll_65` in crate `$crate`
    --> ...
     |
322  |           let result = versioned_function!(ucol_strcoll)(
     |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `ucol_strcoll_65_1`

It seems that on opensuse ICU defines it own symbols with both MAJOR and MINOR versions included in the name of the symbol, however the rust_icu_sys crate uses only MAJOR version suffix

rostamn739 commented 1 year ago

Yep, I've tried to just run cargo build on opensuse with your repository cloned from github: It does not build, fails with the same errors. How would I fix that?

filmil commented 1 year ago

We probably need a build flag to support the SUSE version encoding.

I wonder why they must reinvent the wheel.

filmil commented 1 year ago

Care to contribute a fix here? I have no immediate contact with SuSE, so don't feel very comfortable proposing a resolution here.