Hi Werner, Wouldn't you need CXX=g++-14? Also try setting LD=g++-14 as well.
behdad http://behdad.org/ On Fri, Jun 19, 2026 at 8:18 AM Werner LEMBERG <[email protected]> wrote: > > [ac0979b6f44b41894c73fd208a0b4f5a8c6dc6ff] > > > Folks, > > > I'm still using an older openSUSE version that comes with g++ 7.5.0 as > the default compiler. For some reason, however, I need the font stack > being compiled with g++ 14, and I want both static and dynamic > libraries. As far as I know it doesn't matter which compiler version > I use for pure C code libraries, so I concentrate on updating C++ > stuff. > > Compilation and installation into `/usr/local` works fine for glib > (and running `meson test` worked, too, which seems to confirm that > linking binaries with glib works). > > I've then configured HarfBuzz as follows. > > ``` > CC=gcc-14 CXX=gcc-14 meson setup --default-library=both build > ``` > > However, the ninja build fails (I've massaged the output to make it > more readable, showing only the first reference error message): > > ``` > [186/434] Linking target src/test-map > FAILED: src/test-map > > gcc-14 -o src/test-map \ > src/test-map.p/test-map.cc.o \ > src/test-map.p/hb-static.cc.o \ > -Wl,--as-needed \ > -Wl,--no-undefined \ > '-Wl,-rpath,$ORIGIN/:/usr/local/lib64' \ > -Wl,-rpath-link,/home/wl/git/harfbuzz/build/src \ > -Wl,-rpath-link,/usr/local/lib64 \ > -Wl,--start-group \ > src/libharfbuzz.so.0.61421.0 \ > -pthread \ > -lm \ > /usr/local/lib64/libfreetype.so \ > /usr/local/lib64/libglib-2.0.so \ > -Wl,--end-group > > /usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: > src/test-map.p/test-map.cc.o: > in function `std::__new_allocator<char>::deallocate(char*, unsigned > long)': > /usr/include/c++/14/bits/new_allocator.h:172: > > (.text._ZN12hb_hashmap_tINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiLb0EE5allocEj[_ZN12hb_hashmap_tINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiLb0EE5allocEj]+0x41f): > undefined reference to `operator delete(void*)' > ... > ``` > > What might be the cause for this problem? Is there another C++ > library dependency that I missed? Just to be sure I installed > FreeType with option `--with-harfbuzz=no`, but I still get the same > HarfBuzz linking error. > > Note also that some HarfBuzz test programs are actually linked > successfully (for example, `test-classdef-graph`) – what is so special > about `test-map`? > > > Werner >
