Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 880405 - >=media-libs/harfbuzz-5.3.1 with USE="-icu" configures, compiles and links against icu
Summary: >=media-libs/harfbuzz-5.3.1 with USE="-icu" configures, compiles and links ag...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Office Team
URL:
Whiteboard:
Keywords:
Depends on: 880681
Blocks:
  Show dependency tree
 
Reported: 2022-11-08 11:37 UTC by tt_1
Modified: 2022-11-10 05:14 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
output from emerge --info (emerge-info,6.01 KB, text/plain)
2022-11-08 11:37 UTC, tt_1
Details
build log (build.log,7.65 KB, text/x-log)
2022-11-08 14:06 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2022-11-08 11:37:19 UTC
Created attachment 829181 [details]
output from emerge --info

emerge -pv harfbuzz

Calculating dependencies... done!
[ebuild   R    ] media-libs/harfbuzz-5.3.1:0/4.0.0::gentoo  USE="cairo glib graphite truetype -debug -doc -experimental -icu -introspection -test" 17456 KiB

Total: 1 package (1 reinstall), Size of downloads: 17456 KiB


this configures as: -Dicu=disabled
still its searched for and found in configure: Run-time dependency icu-uc found: YES 72.1

and consequently this shows up in summary of configure options: 

  Unicode callbacks (you want at least one)
    Builtin              : YES
    Glib                 : YES
    ICU                  : YES

rightfully harfbuzz will link against systems icu:

equery f harfbuzz | grep icu
/usr/include/harfbuzz/hb-icu.h
/usr/lib/libharfbuzz-icu.so
/usr/lib/libharfbuzz-icu.so.0
/usr/lib/libharfbuzz-icu.so.0.50301.0
/usr/lib/pkgconfig/harfbuzz-icu.pc


ldd /usr/lib/libharfbuzz-icu.so.0.50301.0
        ldd (0xf7d73000)
        libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0xf7c61000)
        libicuuc.so.71 => /usr/lib/libicuuc.so.71 (0xf7ab8000)
        libc.so => ldd (0xf7d73000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xf7a08000)
        libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0xf79dc000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xf78b2000)
        libicudata.so.71 => /usr/lib/libicudata.so.71 (0xf5b9e000)
        libstdc++.so.6 => /usr/lib/gcc/armv7a-unknown-linux-musleabihf/11.3.0/libstdc++.so.6 (0xf59dc000)
        libgcc_s.so.1 => /usr/lib/gcc/armv7a-unknown-linux-musleabihf/11.3.0/libgcc_s.so.1 (0xf59c2000)
        libbz2.so.1 => /lib/libbz2.so.1 (0xf59a3000)
        libpng16.so.16 => /usr/lib/libpng16.so.16 (0xf5964000)
        libz.so.1 => /lib/libz.so.1 (0xf5940000)
        libpcre2-8.so.0 => /usr/lib/libpcre2-8.so.0 (0xf58a2000)



I don't understand whats happening here? 
ebuild disables icu, meson disables icu, still harfbuzz libs end up linking against icu

I only noticed because I upgraded dev-libs/icu to 72.1, where portage didn't catch the revedep rebuild: 

!!! existing preserved libs:
>>> package: dev-libs/icu-72.1
 *  - /usr/lib/libicudata.so.71
 *  - /usr/lib/libicudata.so.71.1
 *  - /usr/lib/libicuuc.so.71
 *  - /usr/lib/libicuuc.so.71.1
 *      used by /usr/lib/libharfbuzz-icu.so.0.50301.0 (media-libs/harfbuzz-5.3.1)
Comment 1 tt_1 2022-11-08 14:06:57 UTC
Created attachment 829241 [details]
build log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-08 17:03:30 UTC
Please use lddtree and not lld so we can see the order and direct/indirect bit.
Comment 3 tt_1 2022-11-08 17:12:29 UTC
sure, this is from 

emerge -pv =media-libs/harfbuzz-5.3.1

Calculating dependencies... done!
[ebuild   R    ] media-libs/harfbuzz-5.3.1:0/4.0.0::gentoo  USE="cairo glib graphite truetype -debug -doc -experimental -icu -introspection -test" 17456 KiB

Total: 1 package (1 reinstall), Size of downloads: 17456 KiB


lddtree /usr/lib/libharfbuzz-icu.so.0.50301.0 
libharfbuzz-icu.so.0.50301.0 => /usr/lib/libharfbuzz-icu.so.0.50301.0 (interpreter => none)
    libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0
        libfreetype.so.6 => /usr/lib/libfreetype.so.6
            libbz2.so.1 => /lib/libbz2.so.1
            libpng16.so.16 => /usr/lib/libpng16.so.16
            libz.so.1 => /lib/libz.so.1
        libgraphite2.so.3 => /usr/lib/libgraphite2.so.3
            libgcc_s.so.1 => /usr/lib/gcc/armv7a-unknown-linux-musleabihf/11.3.0/libgcc_s.so.1
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0
            libpcre2-8.so.0 => /usr/lib/libpcre2-8.so.0
    libicuuc.so.72 => /usr/lib/libicuuc.so.72
        libicudata.so.72 => /usr/lib/libicudata.so.72
        libstdc++.so.6 => /usr/lib/gcc/armv7a-unknown-linux-musleabihf/11.3.0/libstdc++.so.6
    libc.so => /usr/lib/libc.so





on my main amd64 system, where I have USE="+icu" for harfbuzz (libreoffice)

emerge -pv =media-libs/harfbuzz-5.3.1
Calculating dependencies... done!

[ebuild   R    ] media-libs/harfbuzz-5.3.1:0/4.0.0::gentoo  USE="cairo glib graphite icu introspection truetype -debug -doc -experimental -test" ABI_X86="32 (64) (-x32)" 0 KiB


lddtree /usr/lib64/libharfbuzz-icu.so.0.50301.0
libharfbuzz-icu.so.0.50301.0 => /usr/lib64/libharfbuzz-icu.so.0.50301.0 (interpreter => none)
    libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0
        libm.so.6 => /lib64/libm.so.6
            ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
        libfreetype.so.6 => /usr/lib64/libfreetype.so.6
            libbz2.so.1 => /lib64/libbz2.so.1
            libpng16.so.16 => /usr/lib64/libpng16.so.16
            libz.so.1 => /lib64/libz.so.1
        libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3
        libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0
            libpcre2-8.so.0 => /usr/lib64/libpcre2-8.so.0
    libicuuc.so.71 => /usr/lib64/libicuuc.so.71
        libicudata.so.71 => /usr/lib64/libicudata.so.71
        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/10.4.0/libstdc++.so.6
        libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/10.4.0/libgcc_s.so.1
    libc.so.6 => /lib64/libc.so.6



=media-libs/harfbuzz-5.1.0 is not affected
Comment 4 tt_1 2022-11-08 18:29:59 UTC
I believe its this commit, which introduced the behavior: 

https://github.com/harfbuzz/harfbuzz/commit/53a194aa3f5f7de0b40e879e41fcbe0de6e9fefe

what do you think? 

If I revert it locally, I get a working configure with USE="-icu"
Comment 5 Eli Schwartz gentoo-dev 2022-11-08 21:38:26 UTC
Submitted PR upstream to fix it: https://github.com/harfbuzz/harfbuzz/pull/3870
Comment 6 Larry the Git Cow gentoo-dev 2022-11-10 05:14:16 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e5d8576d295164bc6dc9873e68ed94fd46968cf

commit 9e5d8576d295164bc6dc9873e68ed94fd46968cf
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-11-10 05:13:32 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-10 05:14:03 +0000

    media-libs/harfbuzz: backport fix for icu/freetype detection
    
    Bug: https://bugs.gentoo.org/830966
    Closes: https://bugs.gentoo.org/880405
    Closes: https://bugs.gentoo.org/880479
    Thanks-to: Eli Schwartz <eschwartz93@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/harfbuzz-5.3.1-meson-freetype-icu.patch  | 120 +++++++++++++++++++++
 media-libs/harfbuzz/harfbuzz-5.3.1-r1.ebuild       | 104 ++++++++++++++++++
 2 files changed, 224 insertions(+)