FS#72831 - [harfbuzz] build failure
Attached to Project:
Arch Linux
Opened by T.J. Townsend (blakkheim) - Wednesday, 24 November 2021, 17:10 GMT
Last edited by Antonio Rojas (arojas) - Thursday, 10 March 2022, 17:48 GMT
Opened by T.J. Townsend (blakkheim) - Wednesday, 24 November 2021, 17:10 GMT
Last edited by Antonio Rojas (arojas) - Thursday, 10 March 2022, 17:48 GMT
|
Details
Description:
I'm trying to build the harfbuzz package with an up-to-date Arch install, including the latest icu package. No makepkg.conf customizations in place. The final line of the build shows: /sbin/ld: /tmp/ccgBpG9y.ltrans0.ltrans.o:(.data.rel.local.DW.ref.__gxx_personality_v0[DW.ref.__gxx_personality_v 0]+0x0): undefined reference to `__gxx_personality_v0' collect2: error: ld returned 1 exit status [101/265] Compiling C++ object src/test-vector.p/hb-static.cc.o ninja: build stopped: subcommand failed. ==> ERROR: A failure occurred in build(). Aborting... |
This task depends upon
ld.lld: error: undefined symbol: __cxa_begin_catch
>>> referenced by ld-temp.o
>>> lto.tmp:(__clang_call_terminate)
ld.lld: error: undefined symbol: std::terminate()
>>> referenced by ld-temp.o
>>> lto.tmp:(__clang_call_terminate)
ld.lld: error: undefined symbol: __gxx_personality_v0
>>> referenced by ld-temp.o
>>> lto.tmp:(DW.ref.__gxx_personality_v0)
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
[74/265] Compiling C++ object src/libharfbuzz-subset.so.0.30101.0.p/hb-subset.cc.o
ninja: build stopped: subcommand failed.
==> ERROR: A failure occurred in build().
Edit:
https://github.com/harfbuzz/harfbuzz/blob/3.1.1/meson.build#L47
CXXFLAGS are applied last so exceptions are enabled
c++ -Isrc/libharfbuzz.so.0.30101.0.p -Isrc -I../harfbuzz/src -I. -I../harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -flto=auto -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++11 -fno-rtti -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -fPIC -pthread -Wno-non-virtual-dtor -MD -MQ src/libharfbuzz.so.0.30101.0.p/hb-draw.cc.o -MF src/libharfbuzz.so.0.30101.0.p/hb-draw.cc.o.d -o src/libharfbuzz.so.0.30101.0.p/hb-draw.cc.o -c ../harfbuzz/src/hb-draw.cc
Building in a clean chroot as per the wiki also allows it to build.
https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot#Convenience_way
Also seems to work. -fexceptions is enabled implicitly for C++ so removing the explicit use of the options should have no effect apart from when -fno-exceptions is used.