Created attachment 582252 [details] Build environment and log harfbuzz-2.3.1 fails to build with gcc-8.3.0 on my system. The relevant compile error is: libtool: compile: x86_64-pc-linux-gnu-g++ -m32 -DHAVE_CONFIG_H -I. -I/var/tmp/portage/media-libs/harfbuzz-2.3.1/work/harfbuzz-2.3.1/src -I.. -pthread -I/usr/include/glib-2.0 -I/usr/lib32/glib-2.0/include -I/usr/include/freetype2 -I/var/tmp/portage/media-libs/harfbuzz-2.3.1/work/harfbuzz-2.3.1/src/hb-ucdn -DHB_NDEBUG -fno-rtti -march=native -pipe -fno-builtin-strlen -ggdb -std=c++14 -fno-exceptions -fno-threadsafe-statics -fvisibility-inlines-hidden -c /var/tmp/portage/media-libs/harfbuzz-2.3.1/work/harfbuzz-2.3.1/src/hb-buffer-serialize.cc -fPIC -DPIC -o .libs/libharfbuzz_la-hb-buffer-serialize.o /var/tmp/portage/media-libs/harfbuzz-2.3.1/work/harfbuzz-2.3.1/src/hb-common.cc: In function ‘void _hb_options_init()’: /var/tmp/portage/media-libs/harfbuzz-2.3.1/work/harfbuzz-2.3.1/src/hb-common.cc:70:53: error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare] if (0 == strncmp (c, name, p - c) && strlen (name) == p - c) u.opts.symbol = true; ~~~~~~~~~~~~~~^~~~~~~~ /var/tmp/portage/media-libs/harfbuzz-2.3.1/work/harfbuzz-2.3.1/src/hb-common.cc:72:7: note: in expansion of macro ‘OPTION’ OPTION ("uniscribe-bug-compatible", uniscribe_bug_compatible); ^~~~~~ /var/tmp/portage/media-libs/harfbuzz-2.3.1/work/harfbuzz-2.3.1/src/hb-common.cc:70:53: error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘unsigned int’} and ‘int’ [-Werror=sign-compare] if (0 == strncmp (c, name, p - c) && strlen (name) == p - c) u.opts.symbol = true; ~~~~~~~~~~~~~~^~~~~~~~ /var/tmp/portage/media-libs/harfbuzz-2.3.1/work/harfbuzz-2.3.1/src/hb-common.cc:73:7: note: in expansion of macro ‘OPTION’ OPTION ("aat", aat); ^~~~~~ Which appears to be the result of more strict error checking in newer versions of GCC. I have attached my full build log with the relevant emerge info appended to the top. I am unsure if this should be reported upstream or not.
Created attachment 582254 [details, diff] fix patch This is my (probably naive) very simple patch that fixes it on my system
This harfbuzz version builds fine on my ~amd64 machine with sys-devel/gcc-8.3.0-r1 Please post the output of emerge --info harfbuzz to this bug.
Nevermind, you did put that information into the attachment...
Any specific reason you have "-fno-builtin-strlen" in your C(XX)FLAGS?
Yup, that is what is going on. Removing -fno-builtin-strlen from C(XX)FLAGS allows harfbuzz-2.3.1 to build without my patch. This is kind of odd. Shouldn't the gcc builtin strlen return the same type as the one defined in cstring? Regardless, this isn't really a harfbuzz bug I suppose.
I added -fno-builtin-strlen when I was setting up Valgrind I think. The proper place for that is in an env file for glibc, not system wide.