Re: [gtk-osx-users] Building freetype: Fatal error: 'hb-ft.h' file not found.



Pascal,

I don't see why you think my previous response was rude. You seem to expect me to be able to diagnose your 
problems through telepathic communion with your computer. That's not a realistic expectation; in fact it's 
not reasonable for you to even expect me to lead you by the hand through troubleshooting your problems. 

As for libbrotlidec I have no idea how you managed to inject that dependency. Here's what freetype2.pc from a 
build a year ago:

prefix=/Users/john/Development/Gnucash-Build/Gnucash-master-git/inst
exec_prefix=/Users/john/Development/Gnucash-Build/Gnucash-master-git/inst
libdir=/Users/john/Development/Gnucash-Build/Gnucash-master-git/inst/lib
includedir=/Users/john/Development/Gnucash-Build/Gnucash-master-git/inst/include

Name: FreeType 2
URL: https://freetype.org
Description: A free, high-quality, and portable font engine.
Version: 23.2.17
Requires:
Requires.private: zlib, libpng
Libs: -L${libdir} -lfreetype
Libs.private:
Cflags: -I${includedir}/freetype2

And here's one from today:

prefix=/Users/john/Development/gtk-build/gtk-stable-10.16-x86_64/inst
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include

Name: FreeType 2
URL: https://freetype.org
Description: A free, high-quality, and portable font engine.
Version: 23.4.17
Requires:
Requires.private: zlib
Libs: -L${libdir} -lfreetype
Libs.private:
Cflags: -I${includedir}/freetype2

Examining the config.log from the year-ago build shows complaints about not finding libbrotlidec, so with 
autotools it's definitely an optional package. Brotli is off by default in CMakeLists.txt (CmakeCache.txt has
 CMakeCache.txt:BROTLIDEC_INCLUDE_DIRS:PATH=BROTLIDEC_INCLUDE_DIRS-NOTFOUND
 CMakeCache.txt:BROTLIDEC_LIBRARIES:FILEPATH=BROTLIDEC_LIBRARIES-NOTFOUND
 CMakeCache.txt:FT_WITH_BROTLI:BOOL=OFF
).

So my guess about Debian is that the packager built freetype2 with libbrotlidec installed but didn't include 
it in the package dependencies. They fixed that by adding it to the package dependencies rather than 
rebuilding it without brotli. As usual, that has nothing whatsoever to do with gtk-osx.

Interestingly https://ports.macports.org/port/freetype/summary shows their freetype2 depends on brotli while 
https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/freetype.rb shows Homebrew's doesn't.

Regards,
John Ralls





On May 18, 2021, at 1:02 PM, Pascal <p p14 orange fr> wrote:


Le 18 mai 2021 à 02:22, John Ralls <jralls ceridwen us> a écrit :

On May 17, 2021, at 1:19 PM, Pascal <p p14 orange fr> wrote:

Le 17 mai 2021 à 05:10, John Ralls <jralls ceridwen us> a écrit :

Pascal,

Yeah. You need to figure out why harfbuzz-no-cairo didn't install the header. Study the logs. Try 
force-rebuilding (e.g. jhbuild buildone -f -c harfbuzz-no-cairo) and paying close attention to any 
errors and to what gets installed. When you find something that looks funny dig in and figure out why it 
did that.

Hello John,

I compare with the last build I've done 20200916:

*** Configuring harfbuzz-no-cairo *** [15/32]
meson --prefix /opt/xnadalib-2021 --libdir lib -Dcoretext=enabled -Ddocs=disabled --wrap-mode=nofallback 
/opt/src-2021/harfbuzz-2.7.1
The Meson build system
Version: 0.55.0
Source dir: /opt/src-2021/harfbuzz-2.7.1
Build dir: /opt/src-2021/cache/jhbuild/build/harfbuzz-2.7.1
Build type: native build
Using 'PKG_CONFIG_PATH' from environment with value: 
'/opt/xnadalib-2021/lib/pkgconfig:/opt/xnadalib-2021/share/pkgconfig:/usr/lib/pkgconfig'
Using 'PKG_CONFIG_PATH' from environment with value: 
'/opt/xnadalib-2021/lib/pkgconfig:/opt/xnadalib-2021/share/pkgconfig:/usr/lib/pkgconfig'
Project name: harfbuzz
Project version: 2.7.1
...
Library m found: YES
Found pkg-config: /opt/xnadalib-2021/bin/pkg-config (0.29.2)
Using 'PKG_CONFIG_PATH' from environment with value: 
'/opt/xnadalib-2021/lib/pkgconfig:/opt/xnadalib-2021/share/pkgconfig:/usr/lib/pkgconfig'
Run-time dependency freetype2 found: YES 23.2.17
Using 'PKG_CONFIG_PATH' from environment with value: 
'/opt/xnadalib-2021/lib/pkgconfig:/opt/xnadalib-2021/share/pkgconfig:/usr/lib/pkgconfig'
Run-time dependency glib-2.0 found: YES 2.64.2

== Freetype is found.

and current one:

*** Configuring harfbuzz-no-cairo *** [1/1]
meson --prefix /opt/xnadalib-2021 --libdir lib -Dcoretext=enabled -Ddocs=disabled -Dbenchmark=disabled 
--wrap-mode=nofallback /opt/src-2021/harfbuzz-2.8.0
The Meson build system
Version: 0.58.0
Source dir: /opt/src-2021/harfbuzz-2.8.0
Build dir: /opt/src-2021/cache/jhbuild/build/harfbuzz-2.8.0
Build type: native build
Project name: harfbuzz
Project version: 2.8.0
C compiler for the host machine: /Applications/Xcode.app/Contents/Developer/usr/bin/gcc (clang 12.0.5 
"Apple clang version 12.0.5 (clang-1205.0.22.9)")
C linker for the host machine: /Applications/Xcode.app/Contents/Developer/usr/bin/gcc ld64 650.9
C++ compiler for the host machine: /Applications/Xcode.app/Contents/Developer/usr/bin/g++ (clang 12.0.5 
"Apple clang version 12.0.5 (clang-1205.0.22.9)")
C++ linker for the host machine: /Applications/Xcode.app/Contents/Developer/usr/bin/g++ ld64 650.9
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C++ supports link arguments -Bsymbolic-functions: YES 
Compiler for C++ supports arguments -fno-exceptions: YES 
Compiler for C++ supports arguments -fno-rtti: YES 
Compiler for C++ supports arguments -fno-threadsafe-statics: YES 
Compiler for C++ supports arguments -fvisibility-inlines-hidden: YES 
Library m found: YES
Found pkg-config: /opt/xnadalib-2021/bin/pkg-config (0.29.2)
Found CMake: /opt/xnadalib-2021/bin/cmake (3.20.0)
Run-time dependency freetype2 found: NO (tried pkgconfig, framework and cmake)
Run-time dependency freetype2 found: NO (tried pkgconfig, framework and cmake)
Not looking for a fallback subproject for the dependency freetype2 because:
Use of fallback dependencies is disabled.
Run-time dependency glib-2.0 found: YES 2.68.0

== Freetype is not found.

Whereas it seem to be there:
% ../xnadalib-2021/bin/pkg-config --modversion freetype2
23.4.17

Is it linked to PKG_CONFIG_PATH?

Pascal,

I don't know. Is it? It's your computer, after all, not mine.

Hello John,

I wouldn't appear rude.

Well, it seems to be pkg-config related, here is the extract of 
/opt/src-2021/cache/jhbuild/build/harfbuzz-2.8.0/meson-logs/meson-log.txt:

Called `/opt/xnadalib-2021/bin/pkg-config --cflags freetype2` -> 1
pkg-config error with 'freetype2': Could not generate cargs for freetype2:
Package libbrotlidec was not found in the pkg-config search path.
Perhaps you should add the directory containing `libbrotlidec.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libbrotlidec', required by 'freetype2', not found

What is libbrotlidec?
I googled https://github.com/google/brotli but not sure it is correct.

Nevertheless, I suppress this dependency in $prefix/lib/pkgconfig/freetype2.pc and rebuild harbuzz before 
all gtk.
(another suppression is needed after freetype build)
*** success *** [32/32]
:-)

I found also that link:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964185

It seems to have been fixed in version freetype 2.10.2 and gtk-osx version is 2.10.4.
Thus, it was weirdly supposed to be ok.

Could you please confirm?

Thanks, Pascal.
https://blady.pagesperso-orange.fr



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]