Problems building Chromium with ninja on Linux - linux

I'm currently trying to build Chromium on Ubuntu 14.10 with Ninja. I've been encountering a few issues so far I've been able to fix, but I've got problems with this one. I'm at the building state.
ninja: Entering directory `out/Release' [3/18153] CC
obj/third_party/flac/src/libFLAC/libflac.float.o FAILED:
../../third_party/llvm-build/Release+Asserts/bin/clang -MMD -MF
obj/third_party/flac/src/libFLAC/libflac.float.o.d
-DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=223108 -DCOMPONENT_BUILD -DTOOLKIT_VIEWS=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DUSE_UDEV -DDONT_EMBED_BUILD_METADATA -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFLAC__NO_DLL -DFLAC__OVERFLOW_DETECT '-DVERSION="1.2.1"' -DUSE_LIBPCI=1 -DUSE_GLIB=1 -DUSE_NSS=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../third_party/flac/include -I../../third_party/flac/src/libFLAC/include -fstack-protector --param=ssp-buffer-size=4 -Werror -pthread -fno-strict-aliasing -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-reserved-user-defined-literal -Xclang -load -Xclang /home/florent/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so
-Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-weak-ptr-factory-order -Xclang -plugin-arg-find-bad-constructs -Xclang strict-virtual-specifiers -momit-leaf-frame-pointer
-mstack-alignment=16 -mstackrealign -fcolor-diagnostics -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-conversion -Wno-format -Wno-unused-result -msse2 -mfpmath=sse -mmmx -m32 -O2 -fno-ident -fdata-sections -ffunction-sections -funwind-tables -c ../../third_party/flac/src/libFLAC/float.c -o
obj/third_party/flac/src/libFLAC/libflac.float.o
../../third_party/llvm-build/Release+Asserts/bin/clang: 1:
../../third_party/llvm-build/Release+Asserts/bin/clang: Syntax error:
")" unexpected [3/18153] CC
obj/third_party/flac/src/libFLAC/libflac.format.o FAILED:
../../third_party/llvm-build/Release+Asserts/bin/clang -MMD -MF
obj/third_party/flac/src/libFLAC/libflac.format.o.d
-DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=223108 -DCOMPONENT_BUILD -DTOOLKIT_VIEWS=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DUSE_UDEV -DDONT_EMBED_BUILD_METADATA -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFLAC__NO_DLL -DFLAC__OVERFLOW_DETECT '-DVERSION="1.2.1"' -DUSE_LIBPCI=1 -DUSE_GLIB=1 -DUSE_NSS=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../third_party/flac/include -I../../third_party/flac/src/libFLAC/include -fstack-protector --param=ssp-buffer-size=4 -Werror -pthread -fno-strict-aliasing -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-reserved-user-defined-literal -Xclang -load -Xclang /home/florent/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so
-Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-weak-ptr-factory-order -Xclang -plugin-arg-find-bad-constructs -Xclang strict-virtual-specifiers -momit-leaf-frame-pointer
-mstack-alignment=16 -mstackrealign -fcolor-diagnostics -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-conversion -Wno-format -Wno-unused-result -msse2 -mfpmath=sse -mmmx -m32 -O2 -fno-ident -fdata-sections -ffunction-sections -funwind-tables -c ../../third_party/flac/src/libFLAC/format.c -o
obj/third_party/flac/src/libFLAC/libflac.format.o
../../third_party/llvm-build/Release+Asserts/bin/clang: 1:
../../third_party/llvm-build/Release+Asserts/bin/clang: Syntax error:
")" unexpected [3/18153] CC
obj/third_party/flac/src/libFLAC/libflac.bitmath.o FAILED:
../../third_party/llvm-build/Release+Asserts/bin/clang -MMD -MF
obj/third_party/flac/src/libFLAC/libflac.bitmath.o.d
-DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=223108 -DCOMPONENT_BUILD -DTOOLKIT_VIEWS=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DUSE_UDEV -DDONT_EMBED_BUILD_METADATA -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFLAC__NO_DLL -DFLAC__OVERFLOW_DETECT '-DVERSION="1.2.1"' -DUSE_LIBPCI=1 -DUSE_GLIB=1 -DUSE_NSS=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../third_party/flac/include -I../../third_party/flac/src/libFLAC/include -fstack-protector --param=ssp-buffer-size=4 -Werror -pthread -fno-strict-aliasing -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-reserved-user-defined-literal -Xclang -load -Xclang /home/florent/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so
-Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-weak-ptr-factory-order -Xclang -plugin-arg-find-bad-constructs -Xclang strict-virtual-specifiers -momit-leaf-frame-pointer
-mstack-alignment=16 -mstackrealign -fcolor-diagnostics -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-conversion -Wno-format -Wno-unused-result -msse2 -mfpmath=sse -mmmx -m32 -O2 -fno-ident -fdata-sections -ffunction-sections -funwind-tables -c ../../third_party/flac/src/libFLAC/bitmath.c -o
obj/third_party/flac/src/libFLAC/libflac.bitmath.o
../../third_party/llvm-build/Release+Asserts/bin/clang: 1:
../../third_party/llvm-build/Release+Asserts/bin/clang: Syntax error:
")" unexpected ninja: build stopped: subcommand failed.
So sorry that it is so ugly to look at it!

Related

Systemd fails to compile on arm environment

Im trying to compile systemd in a qemu chroot environment.
The environment is built with cross compiler and using gcc 11.2.
I have tried with systemd 249, 247 and 246.
They all gives the same error.
meson is succeeded and the options is:
meson --prefix=/usr --sysconfdir=/etc --localstatedir=/var --buildtype=release -Dblkid=true -Ddefault-dnssec=no -Dfirstboot=false -Dinstall-tests=false -Dldconfig=false -Dman=false -Dsysusers=false -Drpmmacrosdir=no -Db_lto=false -Dhomed=false -Duserdb=false -Dmode=release -Dpamconfdir=/etc/pam.d -Defi=false -Dgnu-efi=false -Dtpm=false
When running ninja it complains about assert.
Here are some of the failed:
[13/1524] Compiling C object src/udev/ata_id.p/ata_id_ata_id.c.o
FAILED: src/udev/ata_id.p/ata_id_ata_id.c.o
cc -Isrc/udev/ata_id.p -Isrc/udev -I../src/udev -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I. -I.. -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -Isrc/shared -I../src/shared -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu99 -O3 -Wno-format-signedness -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-result -Wdate-time -Wendif-labels -Werror=format=2 -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=overflow -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wwrite-strings -Wno-maybe-uninitialized -Werror=missing-declarations -Werror=missing-prototypes -fdiagnostics-show-option -ffast-math -fno-common -fno-strict-aliasing -fstack-protector -fstack-protector-strong -fvisibility=hidden --param=ssp-buffer-size=4 -ffunction-sections -fdata-sections -Werror=shadow -include config.h -MD -MQ src/udev/ata_id.p/ata_id_ata_id.c.o -MF src/udev/ata_id.p/ata_id_ata_id.c.o.d -o src/udev/ata_id.p/ata_id_ata_id.c.o -c ../src/udev/ata_id/ata_id.c
In file included from ../src/basic/macro.h:4,
from ../src/basic/fd-util.h:9,
from ../src/udev/ata_id/ata_id.c:27:
../src/fundamental/macro-fundamental.h:38:9: error: static assertion failed: "STRLEN(__FILE__) > STRLEN(RELATIVE_SOURCE_PATH) + 1"
38 | static_assert(expr, #expr)
| ^~~~~~~~~~~~~
../src/basic/log.h:65:1: note: in expansion of macro 'assert_cc'
65 | assert_cc(STRLEN(__FILE__) > STRLEN(RELATIVE_SOURCE_PATH) + 1)
| ^~~~~~~~~
[14/1524] Compiling C object src/core/libcore.a.p/dbus-device.c.o
FAILED: src/core/libcore.a.p/dbus-device.c.o
cc -Isrc/core/libcore.a.p -Isrc/core -I../src/core -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I. -I.. -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -Isrc/shared -I../src/shared -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu99 -O3 -Wno-format-signedness -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-result -Wdate-time -Wendif-labels -Werror=format=2 -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=overflow -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wwrite-strings -Wno-maybe-uninitialized -Werror=missing-declarations -Werror=missing-prototypes -fdiagnostics-show-option -ffast-math -fno-common -fno-strict-aliasing -fstack-protector -fstack-protector-strong -fvisibility=hidden --param=ssp-buffer-size=4 -ffunction-sections -fdata-sections -Werror=shadow -include config.h -fPIC -pthread -MD -MQ src/core/libcore.a.p/dbus-device.c.o -MF src/core/libcore.a.p/dbus-device.c.o.d -o src/core/libcore.a.p/dbus-device.c.o -c ../src/core/dbus-device.c
In file included from ../src/basic/macro.h:4,
from ../src/basic/alloc-util.h:9,
from ../src/basic/hash-funcs.h:4,
from ../src/basic/hashmap.h:8,
from ../src/shared/fdset.h:6,
from ../src/shared/bpf-program.h:9,
from ../src/core/unit.h:10,
from ../src/core/device.h:4,
from ../src/core/dbus-device.c:4:
../src/fundamental/macro-fundamental.h:38:9: error: static assertion failed: "STRLEN(__FILE__) > STRLEN(RELATIVE_SOURCE_PATH) + 1"
38 | static_assert(expr, #expr)
| ^~~~~~~~~~~~~
../src/basic/log.h:65:1: note: in expansion of macro 'assert_cc'
65 | assert_cc(STRLEN(__FILE__) > STRLEN(RELATIVE_SOURCE_PATH) + 1);
| ^~~~~~~~~\
[9/1511] Compiling C object src/libsystemd/libsystemd_static.a.p/sd-bus_bus-creds.c.o
FAILED: src/libsystemd/libsystemd_static.a.p/sd-bus_bus-creds.c.o
cc -Isrc/libsystemd/libsystemd_static.a.p -Isrc/libsystemd -I../src/libsystemd -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I. -I.. -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event
-I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu99
-O3 -Wno-format-signedness -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-result -Wdate-time -Wendif-labels -Werror=format=2 -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=overflow -Werror=return-type -Werror=shift-c
ount-overflow -Werror=shift-overflow=2 -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict
-prototypes -Wsuggest-attribute=noreturn -Wwrite-strings -Wno-maybe-uninitialized -Werror=missing-declarations -Werror=missing-prototypes -fdiagnostics-show-option -ffast-math -fno-common -fno-strict-aliasing -fstack-protector -fstack-protector-strong -fvisibility=hidde
n --param=ssp-buffer-size=4 -ffunction-sections -fdata-sections -Werror=shadow -include config.h -fPIC -pthread -fvisibility=default -MD -MQ src/libsystemd/libsystemd_static.a.p/sd-bus_bus-creds.c.o -MF src/libsystemd/libsystemd_static.a.p/sd-bus_bus-creds.c.o.d -o src/
libsystemd/libsystemd_static.a.p/sd-bus_bus-creds.c.o -c ../src/libsystemd/sd-bus/bus-creds.c
In file included from ../src/basic/macro.h:11,
from ../src/basic/alloc-util.h:9,
from ../src/libsystemd/sd-bus/bus-creds.c:6:
../src/fundamental/macro-fundamental.h:42:22: error: size of array 'x' is negative
42 | char x[(expr) ? 0 : -1]; \
| ^
../src/basic/log.h:65:1: note: in expansion of macro 'assert_cc'
65 | assert_cc(STRLEN(__FILE__) > STRLEN(RELATIVE_SOURCE_PATH) + 1);
| ^~~~~~~~~
Im not very experienced in cross compiling and got some info from https://www.linuxfromscratch.org/lfs/view/stable-systemd/ and https://github.com/LeeKyuHyuk/PiCLFS/\
/Mikael
#define RELATIVE_SOURCE_PATH is being set to absolute path.
Changing it to #define RELATIVE_SOURCE_PATH "../" solves the issue

Error when bitbake on meta-browser layer, gn-native package for Yocto zeus

I am trying to generate a Yocto Linux from a Ubuntu 18.04 but run into an error when compiling gn-native from Chromium inside meta-browser layer. As I just add this layer without modifying it, I am a bit lost and error doesn not talk to me much.
> ERROR: gn-native-80.0.3987.132-r0 do_compile: Execution of '/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/temp/run.do_compile.13120'
> failed with exit code 1:
> ninja: Entering directory `/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/chromium-80.0.3987.132/out/Release/gn_build'
> [1/182] CXX base/callback_internal.o
> FAILED: base/callback_internal.o
> clang++ -MMD -MF base/callback_internal.o.d -I../../../tools/gn -I. -isystem/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/recipe-sysroot-native/usr/include -O2 -pipe -DNDEBUG -O3 -fdata-sections -ffunction-sections -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -isystem/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/recipe-sysroot-native/usr/include -O2 -pipe -std=c++17 -c ../../../tools/gn/base/callback_internal.cc -o base/callback_internal.o
> In file included from ../../../tools/gn/base/callback_internal.cc:5:
> In file included from ../../../tools/gn/base/callback_internal.h:13:
> ../../../tools/gn/base/memory/ref_counted.h:10:10: fatal error: 'utility' file not found
> #include <utility>
> ^~~~~~~~~
> 1 error generated.
> [2/182] CXX base/command_line.o
> FAILED: base/command_line.o
> clang++ -MMD -MF base/command_line.o.d -I../../../tools/gn -I. -isystem/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/recipe-sysroot-native/usr/include -O2 -pipe -DNDEBUG -O3 -fdata-sections -ffunction-sections -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -isystem/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/recipe-sysroot-native/usr/include -O2 -pipe -std=c++17 -c ../../../tools/gn/base/command_line.cc -o base/command_line.o
> In file included from ../../../tools/gn/base/command_line.cc:5:
> ../../../tools/gn/base/command_line.h:19:10: fatal error: 'map' file not found
> #include <map>
> ^~~~~
> 1 error generated.
> [3/182] CXX base/environment.o
> FAILED: base/environment.o
> clang++ -MMD -MF base/environment.o.d -I../../../tools/gn -I. -isystem/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/recipe-sysroot-native/usr/include -O2 -pipe -DNDEBUG -O3 -fdata-sections -ffunction-sections -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -isystem/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/recipe-sysroot-native/usr/include -O2 -pipe -std=c++17 -c ../../../tools/gn/base/environment.cc -o base/environment.o
> In file included from ../../../tools/gn/base/environment.cc:5:
> ../../../tools/gn/base/environment.h:8:10: fatal error: 'map' file not found
> #include <map>
> ^~~~~
> 1 error generated.
> [4/182] CXX base/files/file_path_constants.o
> FAILED: base/files/file_path_constants.o
> clang++ -MMD -MF base/files/file_path_constants.o.d -I../../../tools/gn -I. -isystem/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/recipe-sysroot-native/usr/include -O2 -pipe -DNDEBUG -O3 -fdata-sections -ffunction-sections -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -isystem/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/recipe-sysroot-native/usr/include -O2 -pipe -std=c++17 -c ../../../tools/gn/base/files/file_path_constants.cc -o
> base/files/file_path_constants.o
> In file included from ../../../tools/gn/base/files/file_path_constants.cc:7:
> ../../../tools/gn/base/files/file_path.h:107:10: fatal error: 'iosfwd' file not found
> #include <iosfwd>
> ^~~~~~~~
> 1 error generated.
> [5/182] CXX base/files/file.o
> FAILED: base/files/file.o
> clang++ -MMD -MF base/files/file.o.d -I../../../tools/gn -I. -isystem/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/recipe-sysroot-native/usr/include -O2 -pipe -DNDEBUG -O3 -fdata-sections -ffunction-sections -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -isystem/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/recipe-sysroot-native/usr/include -O2 -pipe -std=c++17 -c ../../../tools/gn/base/files/file.cc -o base/files/file.o
> In file included from ../../../tools/gn/base/files/file.cc:5:
> ../../../tools/gn/base/files/file.h:10:10: fatal error: 'string' file not found
> #include <string>
> ^~~~~~~~
> 1 error generated.
> [6/182] CXX base/files/file_path.o
> FAILED: base/files/file_path.o
> clang++ -MMD -MF base/files/file_path.o.d -I../../../tools/gn -I. -isystem/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/recipe-sysroot-native/usr/include -O2 -pipe -DNDEBUG -O3 -fdata-sections -ffunction-sections -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -isystem/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/recipe-sysroot-native/usr/include -O2 -pipe -std=c++17 -c ../../../tools/gn/base/files/file_path.cc -o base/files/file_path.o
> In file included from ../../../tools/gn/base/files/file_path.cc:5:
> ../../../tools/gn/base/files/file_path.h:107:10: fatal error: 'iosfwd' file not found
> #include <iosfwd>
> ^~~~~~~~
> 1 error generated.
> [7/182] CXX base/files/file_enumerator.o
> FAILED: base/files/file_enumerator.o
> clang++ -MMD -MF base/files/file_enumerator.o.d -I../../../tools/gn -I. -isystem/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/recipe-sysroot-native/usr/include -O2 -pipe -DNDEBUG -O3 -fdata-sections -ffunction-sections -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -isystem/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/recipe-sysroot-native/usr/include -O2 -pipe -std=c++17 -c ../../../tools/gn/base/files/file_enumerator.cc -o
> base/files/file_enumerator.o
> In file included from ../../../tools/gn/base/files/file_enumerator.cc:5:
> ../../../tools/gn/base/files/file_enumerator.h:11:10: fatal error: 'vector' file not found
> #include <vector>
> ^~~~~~~~
> 1 error generated.
> ninja: build stopped: subcommand failed.
> Traceback (most recent call last):
> File "/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/chromium-80.0.3987.132/tools/gn/bootstrap/bootstrap.py", line 138, in <module>
> sys.exit(main(sys.argv[1:]))
> File "/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/chromium-80.0.3987.132/tools/gn/bootstrap/bootstrap.py", line 124, in main
> ['ninja', '-C', gn_build_dir, 'gn', '-w', 'dupbuild=err'])
> File "/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/recipe-sysroot-native/usr/lib/python2.7/subprocess.py",
> line 190, in check_call
> raise CalledProcessError(retcode, cmd)
> subprocess.CalledProcessError: Command '['ninja', '-C', '/home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/chromium-80.0.3987.132/out/Release/gn_build', 'gn', '-w', 'dupbuild=err']' returned non-zero exit status 1
> WARNING: exit code 1 from a shell command.
> ERROR: Logfile of failure stored in: /home/tux/yocto-freescale-zeus/build/tmp/work/x86_64-linux/gn-native/80.0.3987.132-r0/temp/log.do_compile.13120
Any help would be greatly appreciated. Thank you!
My fault...
I had to install g++-multilib that was not installed, so basic libraries were not present...
sudo apt install g++-multilib

Issue when building QT 5.15.2 (w/ QTWebEngine) with cross compile

Over the last few weeks, I've spent a significant amount of effort trying to simplify and streamline the build of QT for the Raspberry Pi, and I'm very close to the finishing line.
In short, I've dockerized and scripted the whole build process to ensure that we can build images for Pi 1 - Pi 4 in an easy and reproducible way without requiring a physical Raspberry Pi.
I've been able to get hardware acceleration to be detected for Pi 3 and Pi 4 as part of the ./configure step of QT, and been able to build QT Base (and a few other depencencies) just fine. However, I'm losing my mind on this last error as part of the error.
The error is very similar to what Enrico Zini descibes here, however his workaround dpkg --purge libraspberrypi-dev (or rather Andreas Gruber's) won't cut it as it will disable hardware acceleration, which I need.
The error appears in the very late stage of the QTWebEngine build:
[...]
[20312/20662] ccache /src/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -MMD -MF obj/QtWebEngineCore/gl_surface_qt.o.d -DCHROMIUM_VERSION=\"83.0.4103.122\" -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCR_SYSROOT_HASH=3fcc1d4e44127006318371002a0f421a4fde2ab4 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DQT_NO_LINKED_LIST -DQT_NO_KEYWORDS -DQT_USE_QSTRINGBUILDER -DQ_FORWARD_DECLARE_OBJC_CLASS=QT_FORWARD_DECLARE_CLASS -DQTWEBENGINECORE_VERSION_STR=\"5.15.2\" -DQTWEBENGINEPROCESS_NAME=\"QtWebEngineProcess\" -DBUILDING_CHROMIUM -DQTWEBENGINE_EMBEDDED_SWITCHES -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_WEBCHANNEL_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WEBENGINECOREHEADERS_LIB -DVK_NO_PROTOTYPES -DUSE_EGL -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 -DU_ENABLE_RESOURCE_TRACING=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -DWEBRTC_USE_BUILTIN_ISAC_FIX=1 -DWEBRTC_USE_BUILTIN_ISAC_FLOAT=0 -DHAVE_SCTP -DNO_MAIN_THREAD_WRAPPING -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_WEBP -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_GL -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_USE_LIBGIFCODEC -DSK_VULKAN_HEADER=\"../../skia/config/SkVulkanConfig.h\" -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DVK_NO_PROTOTYPES -DCRASHPAD_ZLIB_SOURCE_EXTERNAL -DUSE_SYSTEM_ZLIB=1 -DLEVELDB_PLATFORM_CHROMIUM=1 -DLEVELDB_PLATFORM_CHROMIUM=1 -DV8_DEPRECATION_WARNINGS -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/skia/config -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/boringssl/src/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/skia/include/core -Igen -I../../../../../qt5/qtwebengine/src/3rdparty/chromium -I/src/qt5/qtwebengine/src/core -I/src/qt5/qtwebengine/src/core/api -I/src/qt5/qtdeclarative/include/QtQuick/5.15.2 -I/src/qt5/qtdeclarative/include/QtQuick/5.15.2/QtQuick -I/src/pi3/qtdeclarative/include/QtQuick/5.15.2 -I/src/pi3/qtdeclarative/include/QtQuick/5.15.2/QtQuick -I/src/qt5/qtbase/include/QtGui/5.15.2 -I/src/qt5/qtbase/include/QtGui/5.15.2/QtGui -I/src/pi3/qtbase/include/QtGui/5.15.2 -I/src/pi3/qtbase/include/QtGui/5.15.2/QtGui -I/src/qt5/qtdeclarative/include -I/src/qt5/qtdeclarative/include/QtQuick -I/src/pi3/qtdeclarative/include -I/src/pi3/qtdeclarative/include/QtQuick -I/src/qt5/qtbase/include -I/src/qt5/qtbase/include/QtGui -I/src/pi3/qtbase/include -I/src/pi3/qtbase/include/QtGui -I/src/qt5/qtdeclarative/include/QtQmlModels/5.15.2 -I/src/qt5/qtdeclarative/include/QtQmlModels/5.15.2/QtQmlModels -I/src/pi3/qtdeclarative/include/QtQmlModels/5.15.2 -I/src/pi3/qtdeclarative/include/QtQmlModels/5.15.2/QtQmlModels -I/src/qt5/qtdeclarative/include/QtQml/5.15.2 -I/src/qt5/qtdeclarative/include/QtQml/5.15.2/QtQml -I/src/pi3/qtdeclarative/include/QtQml/5.15.2 -I/src/pi3/qtdeclarative/include/QtQml/5.15.2/QtQml -I/src/qt5/qtbase/include/QtCore/5.15.2 -I/src/qt5/qtbase/include/QtCore/5.15.2/QtCore -I/src/pi3/qtbase/include/QtCore/5.15.2 -I/src/pi3/qtbase/include/QtCore/5.15.2/QtCore -I/src/qt5/qtdeclarative/include/QtQmlModels -I/src/pi3/qtdeclarative/include/QtQmlModels -I/src/qt5/qtwebchannel/include -I/src/qt5/qtwebchannel/include/QtWebChannel -I/src/pi3/qtwebchannel/include -I/src/pi3/qtwebchannel/include/QtWebChannel -I/src/qt5/qtdeclarative/include/QtQml -I/src/pi3/qtdeclarative/include/QtQml -I/src/qt5/qtbase/include/QtNetwork -I/src/pi3/qtbase/include/QtNetwork -I/src/qt5/qtbase/include/QtCore -I/src/pi3/qtbase/include/QtCore -I/src/qt5/qtwebengine/include -I/src/qt5/qtwebengine/include/QtWebEngineCore -I/src/qt5/qtwebengine/include/QtWebEngineCore/5.15.2 -I/src/qt5/qtwebengine/include/QtWebEngineCore/5.15.2/QtWebEngineCore -I/src/pi3/qtwebengine/include -I/src/pi3/qtwebengine/include/QtWebEngineCore -I/src/pi3/qtwebengine/include/QtWebEngineCore/5.15.2 -I/src/pi3/qtwebengine/include/QtWebEngineCore/5.15.2/QtWebEngineCore -I.moc -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -Igen/.moc -I/src/qt5/qtbase/mkspecs/devices/linux-rasp-pi3-g++ -Igen -Igen -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/libyuv/include -Igen -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/jsoncpp/source/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/jsoncpp/generated -Igen -Igen -Igen/third_party/dawn/src/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/dawn/src/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/khronos -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/gpu -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/vulkan/include -Igen -Igen -Igen -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/boringssl/src/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/ced/src -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/icu/source/common -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/icu/source/i18n -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/protobuf/src -Igen/protoc_out -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/protobuf/src -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/webrtc_overrides -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/webrtc -Igen/third_party/webrtc -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/abseil-cpp -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/skia -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/libgifcodec -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/vulkan/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/skia/third_party/vulkanmemoryallocator -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/vulkan/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/crashpad/crashpad -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/non_mac -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/non_win -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/libwebm/source -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/leveldatabase -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/leveldatabase/src -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/leveldatabase/src/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/v8/include -Igen/v8/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/mesa_headers -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -march=armv8-a -mfloat-abi=hard -mtune=cortex-a53 -mfpu=neon -mthumb -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-psabi -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/sysroot -O2 -fno-exceptions -Wall -Wextra -D_REENTRANT -I/sysroot/usr/include/nss -I/sysroot/usr/include/nspr -std=gnu++14 -Wno-narrowing -Wno-class-memaccess -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -Wno-invalid-offsetof -Wno-return-type -Wno-deprecated-copy -fno-exceptions -fno-rtti --sysroot=../../../../../../sysroot -fvisibility-inlines-hidden -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/sysroot -O2 -std=gnu++1y -fno-exceptions -Wall -Wextra -D_REENTRANT -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated-declarations -c /src/qt5/qtwebengine/src/core/ozone/gl_surface_qt.cpp -o obj/QtWebEngineCore/gl_surface_qt.o
FAILED: obj/QtWebEngineCore/gl_surface_qt.o
ccache /src/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -MMD -MF obj/QtWebEngineCore/gl_surface_qt.o.d -DCHROMIUM_VERSION=\"83.0.4103.122\" -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCR_SYSROOT_HASH=3fcc1d4e44127006318371002a0f421a4fde2ab4 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DQT_NO_LINKED_LIST -DQT_NO_KEYWORDS -DQT_USE_QSTRINGBUILDER -DQ_FORWARD_DECLARE_OBJC_CLASS=QT_FORWARD_DECLARE_CLASS -DQTWEBENGINECORE_VERSION_STR=\"5.15.2\" -DQTWEBENGINEPROCESS_NAME=\"QtWebEngineProcess\" -DBUILDING_CHROMIUM -DQTWEBENGINE_EMBEDDED_SWITCHES -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_WEBCHANNEL_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_WEBENGINECOREHEADERS_LIB -DVK_NO_PROTOTYPES -DUSE_EGL -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 -DU_ENABLE_RESOURCE_TRACING=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -DWEBRTC_USE_BUILTIN_ISAC_FIX=1 -DWEBRTC_USE_BUILTIN_ISAC_FLOAT=0 -DHAVE_SCTP -DNO_MAIN_THREAD_WRAPPING -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_WEBP -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_GL -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_USE_LIBGIFCODEC -DSK_VULKAN_HEADER=\"../../skia/config/SkVulkanConfig.h\" -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DVK_NO_PROTOTYPES -DCRASHPAD_ZLIB_SOURCE_EXTERNAL -DUSE_SYSTEM_ZLIB=1 -DLEVELDB_PLATFORM_CHROMIUM=1 -DLEVELDB_PLATFORM_CHROMIUM=1 -DV8_DEPRECATION_WARNINGS -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/skia/config -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/boringssl/src/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/skia/include/core -Igen -I../../../../../qt5/qtwebengine/src/3rdparty/chromium -I/src/qt5/qtwebengine/src/core -I/src/qt5/qtwebengine/src/core/api -I/src/qt5/qtdeclarative/include/QtQuick/5.15.2 -I/src/qt5/qtdeclarative/include/QtQuick/5.15.2/QtQuick -I/src/pi3/qtdeclarative/include/QtQuick/5.15.2 -I/src/pi3/qtdeclarative/include/QtQuick/5.15.2/QtQuick -I/src/qt5/qtbase/include/QtGui/5.15.2 -I/src/qt5/qtbase/include/QtGui/5.15.2/QtGui -I/src/pi3/qtbase/include/QtGui/5.15.2 -I/src/pi3/qtbase/include/QtGui/5.15.2/QtGui -I/src/qt5/qtdeclarative/include -I/src/qt5/qtdeclarative/include/QtQuick -I/src/pi3/qtdeclarative/include -I/src/pi3/qtdeclarative/include/QtQuick -I/src/qt5/qtbase/include -I/src/qt5/qtbase/include/QtGui -I/src/pi3/qtbase/include -I/src/pi3/qtbase/include/QtGui -I/src/qt5/qtdeclarative/include/QtQmlModels/5.15.2 -I/src/qt5/qtdeclarative/include/QtQmlModels/5.15.2/QtQmlModels -I/src/pi3/qtdeclarative/include/QtQmlModels/5.15.2 -I/src/pi3/qtdeclarative/include/QtQmlModels/5.15.2/QtQmlModels -I/src/qt5/qtdeclarative/include/QtQml/5.15.2 -I/src/qt5/qtdeclarative/include/QtQml/5.15.2/QtQml -I/src/pi3/qtdeclarative/include/QtQml/5.15.2 -I/src/pi3/qtdeclarative/include/QtQml/5.15.2/QtQml -I/src/qt5/qtbase/include/QtCore/5.15.2 -I/src/qt5/qtbase/include/QtCore/5.15.2/QtCore -I/src/pi3/qtbase/include/QtCore/5.15.2 -I/src/pi3/qtbase/include/QtCore/5.15.2/QtCore -I/src/qt5/qtdeclarative/include/QtQmlModels -I/src/pi3/qtdeclarative/include/QtQmlModels -I/src/qt5/qtwebchannel/include -I/src/qt5/qtwebchannel/include/QtWebChannel -I/src/pi3/qtwebchannel/include -I/src/pi3/qtwebchannel/include/QtWebChannel -I/src/qt5/qtdeclarative/include/QtQml -I/src/pi3/qtdeclarative/include/QtQml -I/src/qt5/qtbase/include/QtNetwork -I/src/pi3/qtbase/include/QtNetwork -I/src/qt5/qtbase/include/QtCore -I/src/pi3/qtbase/include/QtCore -I/src/qt5/qtwebengine/include -I/src/qt5/qtwebengine/include/QtWebEngineCore -I/src/qt5/qtwebengine/include/QtWebEngineCore/5.15.2 -I/src/qt5/qtwebengine/include/QtWebEngineCore/5.15.2/QtWebEngineCore -I/src/pi3/qtwebengine/include -I/src/pi3/qtwebengine/include/QtWebEngineCore -I/src/pi3/qtwebengine/include/QtWebEngineCore/5.15.2 -I/src/pi3/qtwebengine/include/QtWebEngineCore/5.15.2/QtWebEngineCore -I.moc -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -Igen/.moc -I/src/qt5/qtbase/mkspecs/devices/linux-rasp-pi3-g++ -Igen -Igen -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/libyuv/include -Igen -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/jsoncpp/source/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/jsoncpp/generated -Igen -Igen -Igen/third_party/dawn/src/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/dawn/src/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/khronos -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/gpu -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/vulkan/include -Igen -Igen -Igen -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/boringssl/src/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/ced/src -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/icu/source/common -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/icu/source/i18n -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/protobuf/src -Igen/protoc_out -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/protobuf/src -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/webrtc_overrides -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/webrtc -Igen/third_party/webrtc -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/abseil-cpp -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/skia -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/libgifcodec -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/vulkan/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/skia/third_party/vulkanmemoryallocator -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/vulkan/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/crashpad/crashpad -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/non_mac -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/linux -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/crashpad/crashpad/compat/non_win -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/libwebm/source -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/leveldatabase -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/leveldatabase/src -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/leveldatabase/src/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/v8/include -Igen/v8/include -I../../../../../qt5/qtwebengine/src/3rdparty/chromium/third_party/mesa_headers -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -march=armv8-a -mfloat-abi=hard -mtune=cortex-a53 -mfpu=neon -mthumb -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-psabi -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/sysroot -O2 -fno-exceptions -Wall -Wextra -D_REENTRANT -I/sysroot/usr/include/nss -I/sysroot/usr/include/nspr -std=gnu++14 -Wno-narrowing -Wno-class-memaccess -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -Wno-invalid-offsetof -Wno-return-type -Wno-deprecated-copy -fno-exceptions -fno-rtti --sysroot=../../../../../../sysroot -fvisibility-inlines-hidden -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/sysroot -O2 -std=gnu++1y -fno-exceptions -Wall -Wextra -D_REENTRANT -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated-declarations -c /src/qt5/qtwebengine/src/core/ozone/gl_surface_qt.cpp -o obj/QtWebEngineCore/gl_surface_qt.o
In file included from ../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings.h:511:0,
from /src/qt5/qtwebengine/src/core/ozone/gl_surface_qt.cpp:57:
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_egl.h:201:5: error: 'EGLDeviceEXT' has not been declared
EGLDeviceEXT* devices,
^~~~~~~~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_egl.h:204:5: error: typedef 'gl::eglQueryDeviceStringEXTProc' is initialized (use decltype instead)
EGLDeviceEXT device,
^~~~~~~~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_egl.h:204:5: error: 'EGLDeviceEXT' was not declared in this scope
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_egl.h:205:12: error: expected primary-expression before 'name'
EGLint name);
^~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_egl.h:239:5: error: 'EGLSetBlobFuncANDROID' has not been declared
EGLSetBlobFuncANDROID set,
^~~~~~~~~~~~~~~~~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_egl.h:240:5: error: 'EGLGetBlobFuncANDROID' has not been declared
EGLGetBlobFuncANDROID get);
^~~~~~~~~~~~~~~~~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_egl.h:371:3: error: 'eglQueryDeviceStringEXTProc' does not name a type; did you mean 'eglQueryDeviceStringEXT'?
eglQueryDeviceStringEXTProc eglQueryDeviceStringEXTFn;
^~~~~~~~~~~~~~~~~~~~~~~~~~~
eglQueryDeviceStringEXT
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_egl.h:567:43: error: 'EGLDeviceEXT' has not been declared
EGLDeviceEXT* devices,
^~~~~~~~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_egl.h:569:49: error: 'eglQueryDeviceStringEXTFn' declared as a 'virtual' field
virtual const char* eglQueryDeviceStringEXTFn(EGLDeviceEXT device,
^~~~~~~~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_egl.h:569:23: error: expected ';' at end of member declaration
virtual const char* eglQueryDeviceStringEXTFn(EGLDeviceEXT device,
^~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_egl.h:569:62: error: expected ')' before 'device'
virtual const char* eglQueryDeviceStringEXTFn(EGLDeviceEXT device,
^~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_egl.h:599:46: error: 'EGLSetBlobFuncANDROID' has not been declared
EGLSetBlobFuncANDROID set,
^~~~~~~~~~~~~~~~~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_egl.h:600:46: error: 'EGLGetBlobFuncANDROID' has not been declared
EGLGetBlobFuncANDROID get) = 0;
^~~~~~~~~~~~~~~~~~~~~
In file included from ../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_egl_api_implementation.h:31:0,
from /src/qt5/qtwebengine/src/core/ozone/gl_surface_qt.cpp:71:
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_api_autogen_egl.h:164:33: error: 'EGLDeviceEXT' has not been declared
EGLDeviceEXT* devices,
^~~~~~~~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_api_autogen_egl.h:166:13: error: expected ';' at end of member declaration
const char* eglQueryDeviceStringEXTFn(EGLDeviceEXT device,
^~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_api_autogen_egl.h:166:52: error: expected ')' before 'device'
const char* eglQueryDeviceStringEXTFn(EGLDeviceEXT device,
^~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_api_autogen_egl.h:196:36: error: 'EGLSetBlobFuncANDROID' has not been declared
EGLSetBlobFuncANDROID set,
^~~~~~~~~~~~~~~~~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_api_autogen_egl.h:197:36: error: 'EGLGetBlobFuncANDROID' has not been declared
EGLGetBlobFuncANDROID get) override;
^~~~~~~~~~~~~~~~~~~~~
In file included from ../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_egl_api_implementation.h:66:0,
from /src/qt5/qtwebengine/src/core/ozone/gl_surface_qt.cpp:71:
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_api_autogen_egl.h:164:33: error: 'EGLDeviceEXT' has not been declared
EGLDeviceEXT* devices,
^~~~~~~~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_api_autogen_egl.h:166:13: error: expected ';' at end of member declaration
const char* eglQueryDeviceStringEXTFn(EGLDeviceEXT device,
^~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_api_autogen_egl.h:166:52: error: expected ')' before 'device'
const char* eglQueryDeviceStringEXTFn(EGLDeviceEXT device,
^~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_api_autogen_egl.h:196:36: error: 'EGLSetBlobFuncANDROID' has not been declared
EGLSetBlobFuncANDROID set,
^~~~~~~~~~~~~~~~~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_api_autogen_egl.h:197:36: error: 'EGLGetBlobFuncANDROID' has not been declared
EGLGetBlobFuncANDROID get) override;
^~~~~~~~~~~~~~~~~~~~~
In file included from ../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_egl_api_implementation.h:82:0,
from /src/qt5/qtwebengine/src/core/ozone/gl_surface_qt.cpp:71:
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_api_autogen_egl.h:164:33: error: 'EGLDeviceEXT' has not been declared
EGLDeviceEXT* devices,
^~~~~~~~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_api_autogen_egl.h:166:13: error: expected ';' at end of member declaration
const char* eglQueryDeviceStringEXTFn(EGLDeviceEXT device,
^~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_api_autogen_egl.h:166:52: error: expected ')' before 'device'
const char* eglQueryDeviceStringEXTFn(EGLDeviceEXT device,
^~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_api_autogen_egl.h:196:36: error: 'EGLSetBlobFuncANDROID' has not been declared
EGLSetBlobFuncANDROID set,
^~~~~~~~~~~~~~~~~~~~~
../../../../../qt5/qtwebengine/src/3rdparty/chromium/ui/gl/gl_bindings_api_autogen_egl.h:197:36: error: 'EGLGetBlobFuncANDROID' has not been declared
EGLGetBlobFuncANDROID get) override;
^~~~~~~~~~~~~~~~~~~~~
cc1plus: warning: unrecognized command line option '-Wno-deprecated-copy'
cc1plus: warning: unrecognized command line option '-Wno-class-memaccess'
cc1plus: warning: unrecognized command line option '-Wno-class-memaccess'
cc1plus: warning: unrecognized command line option '-Wno-packed-not-aligned'
[...]
ninja: build stopped: subcommand failed.
make[4]: *** [Makefile.gn_run:763: run_ninja] Error 1
make[4]: Leaving directory '/src/pi3/qtwebengine/src/core'
make[3]: *** [Makefile:82: sub-gn_run-pro-make_first] Error 2
make[3]: Leaving directory '/src/pi3/qtwebengine/src/core'
make[2]: *** [Makefile:79: sub-core-make_first] Error 2
make[2]: Leaving directory '/src/pi3/qtwebengine/src'
make[1]: *** [Makefile:49: sub-src-make_first] Error 2
make[1]: Leaving directory '/src/pi3/qtwebengine'
make: *** [Makefile:370: module-qtwebengine-make_first] Error 2
I got the same errors and got it working by adding 3 symlinks:
in sysroot/opt/vc/include/EGL
mv egl.h egl.h-old
mv eglext.h eglext.h-old
mv eglplatform.h eglplatform.h-old
ln -s /<...>/qtwebengine/src/3rdparty/chromium/third_party/khronos/EGL/eglext.h eglext.h
ln -s /<...>/qtwebengine/src/3rdparty/chromium/third_party/khronos/EGL/egl.h egl.h
ln -s /<...>/qtwebengine/src/3rdparty/chromium/third_party/khronos/EGL/eglplatform.h eglplatform.h
where <...> is the path to the qt root directory.
There are many versions of egl.h/eglext.h/eglplatform.h to include and because of the include order the comiler fetches first the files in sysroot/opt/vc/include/EGL
Perhaps a better solution would be to reorder the "-I" flags for the compiler.
i did not
dpkg --purge libraspberrypi-dev

How to enable signed-integer-overflow UBSan in linux kernel?

As I was configuring the kernel 5.4.0 with:
CONFIG_UBSAN=y
UBSAN_SANITIZE_ALL=y
and -fsanitize=signed-integer-overflow also appeared in gcc command during compilation.
However, in the final vmlinux, __ubsan_handle_add_overflow was in the image,
but never called.
In contrast, other non signed-integer-overflow UBSan handlers e.g.
__ubsan_handle_load_invalid_value, __ubsan_handle_shift_out_of_bounds
were called extensively.
I couldn't find any difference between these 2 types of UBSan throughout
the compilation process.
Is it maybe because the compiler optimization assuming that overflow
should never exist, thus didn't instrument these overflow-related UBSan?
I attached a typical gcc command here in case it might be needed:
cmd_fs/ioctl.o := /home/cm/exp/symslice/syzkaller/gcc/bin/gcc -Wp,-MD,fs/.ioctl.o.d -nostdinc -isystem /home/cm/exp/symslice/syzkaller/gcc/bin/../lib/gcc/x86_64-pc-linux-gnu/8.0.1/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -march=core2 -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wimplicit-fallthrough -Wno-unused-const-variable -fomit-frame-pointer -fno-var-tracking-assignments -g -femit-struct-debug-baseonly -fno-var-tracking -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -fsanitize=kernel-address -fasan-shadow-offset=0xdffffc0000000000 --param asan-globals=1 --param asan-instrumentation-with-call-threshold=10000 --param asan-stack=1 --param asan-instrument-allocas=1 -fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable -fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=object-size -fsanitize=bool -fsanitize=enum -Wno-maybe-uninitialized -fsanitize-coverage=trace-pc -fsanitize-coverage=trace-cmp -DKBUILD_BASENAME='"ioctl"' -DKBUILD_MODNAME='"ioctl"' -c -o fs/ioctl.o fs/ioctl.c
You’re compiling with -fno-strict-overflow, meaning overflow when adding signed numbers is not treated as UB.

Compiling with libboost on raspberry pi - undefined reference to `boost::system::system_category()

I'm trying to compile Ocelot tracker on raspberry pi 2 with OS Raspbian Jessie. I have installed libboost1.55-dev-all libraries from apt.
When compiling I get multiple errors : "undefined reference to `boost::system::system_category()".
I've been searching a lot and I found out that in most cases this is a problem with linker and something like -lboost_system should be put somewhere in the Makefile.am, but I'm not sure where to put it.
Also I'm not even sure this is the case here. Any pointer would be much appreciated, this is the first time I'm doing anything like this.
The complete log when compiling:
pi#raspberrypi:~/ocelot-1.0 $ make
g++ -DPACKAGE_NAME=\"ocelot\" -DPACKAGE_TARNAME=\"ocelot\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"ocelot\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBTCMALLOC=1 -I. -I/usr/include -I/usr/include/mysql -I/usr/include/mysql++ -std=c++11 -march=native -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fno-ident -Wall -Wfatal-errors -pthread -I/usr/include -fstack-protector-strong -g -O2 -MT config.o -MD -MP -MF .deps/config.Tpo -c -o config.o config.cpp
mv -f .deps/config.Tpo .deps/config.Po
g++ -DPACKAGE_NAME=\"ocelot\" -DPACKAGE_TARNAME=\"ocelot\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"ocelot\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBTCMALLOC=1 -I. -I/usr/include -I/usr/include/mysql -I/usr/include/mysql++ -std=c++11 -march=native -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fno-ident -Wall -Wfatal-errors -pthread -I/usr/include -fstack-protector-strong -g -O2 -MT db.o -MD -MP -MF .deps/db.Tpo -c -o db.o db.cpp
mv -f .deps/db.Tpo .deps/db.Po
g++ -DPACKAGE_NAME=\"ocelot\" -DPACKAGE_TARNAME=\"ocelot\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"ocelot\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBTCMALLOC=1 -I. -I/usr/include -I/usr/include/mysql -I/usr/include/mysql++ -std=c++11 -march=native -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fno-ident -Wall -Wfatal-errors -pthread -I/usr/include -fstack-protector-strong -g -O2 -MT events.o -MD -MP -MF .deps/events.Tpo -c -o events.o events.cpp
mv -f .deps/events.Tpo .deps/events.Po
g++ -DPACKAGE_NAME=\"ocelot\" -DPACKAGE_TARNAME=\"ocelot\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"ocelot\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBTCMALLOC=1 -I. -I/usr/include -I/usr/include/mysql -I/usr/include/mysql++ -std=c++11 -march=native -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fno-ident -Wall -Wfatal-errors -pthread -I/usr/include -fstack-protector-strong -g -O2 -MT misc_functions.o -MD -MP -MF .deps/misc_functions.Tpo -c -o misc_functions.o misc_functions.cpp
mv -f .deps/misc_functions.Tpo .deps/misc_functions.Po
g++ -DPACKAGE_NAME=\"ocelot\" -DPACKAGE_TARNAME=\"ocelot\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"ocelot\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBTCMALLOC=1 -I. -I/usr/include -I/usr/include/mysql -I/usr/include/mysql++ -std=c++11 -march=native -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fno-ident -Wall -Wfatal-errors -pthread -I/usr/include -fstack-protector-strong -g -O2 -MT ocelot.o -MD -MP -MF .deps/ocelot.Tpo -c -o ocelot.o ocelot.cpp
mv -f .deps/ocelot.Tpo .deps/ocelot.Po
g++ -DPACKAGE_NAME=\"ocelot\" -DPACKAGE_TARNAME=\"ocelot\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"ocelot\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBTCMALLOC=1 -I. -I/usr/include -I/usr/include/mysql -I/usr/include/mysql++ -std=c++11 -march=native -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fno-ident -Wall -Wfatal-errors -pthread -I/usr/include -fstack-protector-strong -g -O2 -MT report.o -MD -MP -MF .deps/report.Tpo -c -o report.o report.cpp
mv -f .deps/report.Tpo .deps/report.Po
g++ -DPACKAGE_NAME=\"ocelot\" -DPACKAGE_TARNAME=\"ocelot\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"ocelot\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBTCMALLOC=1 -I. -I/usr/include -I/usr/include/mysql -I/usr/include/mysql++ -std=c++11 -march=native -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fno-ident -Wall -Wfatal-errors -pthread -I/usr/include -fstack-protector-strong -g -O2 -MT response.o -MD -MP -MF .deps/response.Tpo -c -o response.o response.cpp
mv -f .deps/response.Tpo .deps/response.Po
g++ -DPACKAGE_NAME=\"ocelot\" -DPACKAGE_TARNAME=\"ocelot\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"ocelot\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBTCMALLOC=1 -I. -I/usr/include -I/usr/include/mysql -I/usr/include/mysql++ -std=c++11 -march=native -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fno-ident -Wall -Wfatal-errors -pthread -I/usr/include -fstack-protector-strong -g -O2 -MT schedule.o -MD -MP -MF .deps/schedule.Tpo -c -o schedule.o schedule.cpp
mv -f .deps/schedule.Tpo .deps/schedule.Po
g++ -DPACKAGE_NAME=\"ocelot\" -DPACKAGE_TARNAME=\"ocelot\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"ocelot\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBTCMALLOC=1 -I. -I/usr/include -I/usr/include/mysql -I/usr/include/mysql++ -std=c++11 -march=native -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fno-ident -Wall -Wfatal-errors -pthread -I/usr/include -fstack-protector-strong -g -O2 -MT site_comm.o -MD -MP -MF .deps/site_comm.Tpo -c -o site_comm.o site_comm.cpp
mv -f .deps/site_comm.Tpo .deps/site_comm.Po
g++ -DPACKAGE_NAME=\"ocelot\" -DPACKAGE_TARNAME=\"ocelot\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"ocelot\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBTCMALLOC=1 -I. -I/usr/include -I/usr/include/mysql -I/usr/include/mysql++ -std=c++11 -march=native -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fno-ident -Wall -Wfatal-errors -pthread -I/usr/include -fstack-protector-strong -g -O2 -MT user.o -MD -MP -MF .deps/user.Tpo -c -o user.o user.cpp
mv -f .deps/user.Tpo .deps/user.Po
g++ -DPACKAGE_NAME=\"ocelot\" -DPACKAGE_TARNAME=\"ocelot\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"ocelot\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_BOOST=/\*\*/ -DHAVE_BOOST_IOSTREAMS=/\*\*/ -DHAVE_BOOST_SYSTEM=/\*\*/ -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBTCMALLOC=1 -I. -I/usr/include -I/usr/include/mysql -I/usr/include/mysql++ -std=c++11 -march=native -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fno-ident -Wall -Wfatal-errors -pthread -I/usr/include -fstack-protector-strong -g -O2 -MT worker.o -MD -MP -MF .deps/worker.Tpo -c -o worker.o worker.cpp
worker.cpp: In member function ‘void worker::reap_peers()’:
worker.cpp:1028:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (p->second.last_announced + peers_timeout < cur_time) {
^
worker.cpp:1041:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (p->second.last_announced + peers_timeout < cur_time) {
^
mv -f .deps/worker.Tpo .deps/worker.Po
g++ -std=c++11 -march=native -O2 -fvisibility=hidden -fvisibility-inlines-hidden -fomit-frame-pointer -fno-ident -Wall -Wfatal-errors -pthread -I/usr/include -fstack-protector-strong -g -O2 -Wl,-O1 -Wl,--as-needed -L/usr/lib/arm-linux-gnueabihf/ -L/usr/lib/arm-linux-gnueabihf/ -o ocelot config.o db.o events.o misc_functions.o ocelot.o report.o response.o schedule.o site_comm.o user.o worker.o -lboost_iostreams -ltcmalloc -lmysqlpp -lmysqlclient -lev
site_comm.o: In function `error_code':
/usr/include/boost/system/error_code.hpp:323: undefined reference to `boost::system::system_category()'
/usr/include/boost/system/error_code.hpp:323: undefined reference to `boost::system::system_category()'
/usr/include/boost/system/error_code.hpp:323: undefined reference to `boost::system::system_category()'
/usr/include/boost/system/error_code.hpp:323: undefined reference to `boost::system::system_category()'
site_comm.o: In function `get_system_category':
/usr/include/boost/asio/error.hpp:224: undefined reference to `boost::system::system_category()'
site_comm.o:/usr/include/boost/system/error_code.hpp:323: more undefined references to `boost::system::system_category()' follow
site_comm.o: In function `__static_initialization_and_destruction_0':
/usr/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:224: undefined reference to `boost::system::system_category()'
site_comm.o: In function `get_system_category':
/usr/include/boost/asio/error.hpp:224: undefined reference to `boost::system::system_category()'
events.o: In function `get_system_category':
/usr/include/boost/asio/error.hpp:224: undefined reference to `boost::system::system_category()'
events.o: In function `__static_initialization_and_destruction_0':
/usr/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:224: undefined reference to `boost::system::system_category()'
events.o: In function `get_system_category':
/usr/include/boost/asio/error.hpp:224: undefined reference to `boost::system::system_category()'
ocelot.o: In function `__static_initialization_and_destruction_0':
/usr/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:224: undefined reference to `boost::system::system_category()'
ocelot.o: In function `get_system_category':
/usr/include/boost/asio/error.hpp:224: undefined reference to `boost::system::system_category()'
schedule.o: In function `__static_initialization_and_destruction_0':
/usr/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:224: undefined reference to `boost::system::system_category()'
schedule.o: In function `get_system_category':
/usr/include/boost/asio/error.hpp:224: undefined reference to `boost::system::system_category()'
worker.o: In function `__static_initialization_and_destruction_0':
/usr/include/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:223: undefined reference to `boost::system::generic_category()'
/usr/include/boost/system/error_code.hpp:224: undefined reference to `boost::system::system_category()'
worker.o: In function `get_system_category':
/usr/include/boost/asio/error.hpp:224: undefined reference to `boost::system::system_category()'
collect2: error: ld returned 1 exit status
Makefile:412: recipe for target 'ocelot' failed
make: *** [ocelot] Error 1
Original Makefile.am
ACLOCAL_AMFLAGS = -I m4
bin_PROGRAMS = ocelot ocelot_SOURCES = config.cpp config.h db.cpp db.h events.cpp events.h misc_functions.cpp misc_functions.h \
ocelot.cpp ocelot.h report.cpp report.h response.cpp response.h \
schedule.cpp schedule.h site_comm.cpp site_comm.h user.cpp user.h worker.cpp worker.h
AM_CXXFLAGS = -std=c++11 -march=native -O2 -fvisibility=hidden
-fvisibility-inlines-hidden -fomit-frame-pointer -fno-ident -Wall -Wfatal-errors $(PTHREAD_CFLAGS) $($ ocelot_LDADD = $(PTHREAD_LIBS) $(BOOST_IOSTREAMS_LIB) $(BOOST_SYSTEM_LIB) AM_LDFLAGS = -Wl,-O1
-Wl,--as-needed EXTRA_DIST = CHANGES LICENSE README.md ocelot.conf.dist dist-hook:
touch ${distdir}/configure
patch -p2 -d ${distdir} --no-backup-if-mismatch < ../dist.patch
Boost-related files in m4 folder may be too old, new versions can be downloaded from boost base, boost iostreams, and boost system.
After copying new versions of the files to folder m4, try autoreconf -fvi and then configure and make.
I managed to compile ocelot on debian jessie amd64 after updating those m4 files.

Resources