Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meson.build: support building with ICU 76 #2140

Merged
merged 1 commit into from
Oct 27, 2024

Conversation

cho-m
Copy link
Contributor

@cho-m cho-m commented Oct 27, 2024

ICU 76 decided to reduce overlinking1 thus icu-i18n will no longer add icu-uc when linking to shared libraries. This results in failure:

src/lib/icu/libicu.a.p/Converter.cxx.o: undefined reference to symbol 'ucnv_fromUnicode_76'

ICU 76:

$ objdump -p libicui18n.so | grep icuuc
  NEEDED               libicuuc.so.76

$ pkg-config --libs-only-l icu-i18n
-licui18n

$ pkg-config --libs-only-l --static icu-i18n
-licui18n -licuuc -licudata -lpthread -lm

$ pkg-config --libs-only-l icu-i18n icu-uc
-licui18n -licuuc

ICU 75

$ objdump -p libicui18n.so | grep icuuc
  NEEDED               libicuuc.so.75

$ pkg-config --libs-only-l icu-i18n
-licui18n -licuuc -licudata

$ pkg-config --libs-only-l --static icu-i18n
-licui18n -licuuc -licudata -lpthread -lm

$ pkg-config --libs-only-l icu-i18n icu-uc
-licui18n -licuuc -licudata

Footnotes

  1. https://github.com/unicode-org/icu/commit/199bc827021ffdb43b6579d68e5eecf54c7f6f56

conf.set('HAVE_ICU', icu_dep.found())
icu_i18n_dep = dependency('icu-i18n', version: '>= 50', required: get_option('icu'))
icu_uc_dep = dependency('icu-uc', version: '>= 50', required: get_option('icu'))
conf.set('HAVE_ICU', icu_i18n_dep.found())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if icu-i18n was found but not icu_uc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can update to check both.

In theory, should be an unlikely scenario as icu-i18n has always used icu-uc. Though I guess there is no guarantee on what ICU will do in future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, this should be both available, but since this is out of our control, and users may do stupid things (and some will do), let's be sure, and it's so simple to check both...

ICU 76 decided to reduce overlinking[^1] thus `icu-i18n` will no longer
add `icu-uc` when linking to shared libraries. This results in failure:
```
src/lib/icu/libicu.a.p/Converter.cxx.o: undefined reference to symbol 'ucnv_fromUnicode_76'
```

[^1]: unicode-org/icu@199bc82
@MaxKellermann MaxKellermann merged commit 1930ed1 into MusicPlayerDaemon:master Oct 27, 2024
@cho-m cho-m deleted the icu76-support branch October 27, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants