Closed barndoor2276 closed 1 year ago
This looks like #726 -- the build's failing when building some bits on the host using your distro's libstdc++, which is too old for what Chromium needs.
We're trying to solve that by working on a dunfell-clang14 branch in meta-clang that would use meta-clang's libc++ rather than the distro's libstdc++, but in the meantime you could try using a more recent Ubuntu release on your host (18.04 is EOL anyway) or using a newer GCC release on 18.04.
Thanks for the info. I was mistakenly using the default crops/poky docker container which still defaults to 18.04. But I still can't build Chromium 114. It ran significantly longer before failing and then spent hours spitting out clang warnings until I aborted it after 8 hours, I couldn't find the actual error though.
I see your other thread about creating a clang14 branch so I will keep on eye on that progress too.
The lots of warnings are unfortunately expected, and will remain until we can use clang >= 15. I'd be happy to help with fixing the build error, but I would need the error message for that :sweat_smile: do you still have the temp files of your build? They should contain the logs of Chromium's compile step, and you could look for the error message there.
Here are some more detailed instructions: bitbake -e chromium-ozone-wayland | grep ^T=
should give you the path to Chromium's temp directory. In there should be a log.do_compile
file. You can now open that file with less
, press Shift+g to jump to the end, type /error:
and press Enter to search for error messages (it won't find any, because it's already at EOF), and finally press Shift+n to search backwards to jump to the last error message. (Alternatively, you could grep for 'error:' in the file, but that way it's a bit more difficult to get all the context for the error message.)
Took all day for the build to run. I'm not sure if it really exited properly in the end. The log file was over 6GB. But I did manage to pull the below snippet using your method of searching.
../../gpu/command_buffer/service/gles2_cmd_decoder.cc:11533:1: warning: unknown attribute 'always_inline' ignored [-Wunknown-attributes]
ALWAYS_INLINE error::Error GLES2DecoderImpl::DoMultiDrawElements(
In file included from ../../gpu/command_buffer/service/gles2_cmd_decoder.cc:61:
In file included from ../../gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h:26:
../../gpu/command_buffer/service/client_service_map.h:85:3: warning: unknown attribute 'always_inline' ignored [-Wunknown-attributes]
ALWAYS_INLINE bool HasClientID(ClientType client_id) const {
^~~~~~~~~~~~~
../../base/compiler_specific.h:55:25: note: expanded from macro 'ALWAYS_INLINE'
#define ALWAYS_INLINE [[clang::always_inline]] inline
^~~~~~~~~~~~~~~~~~~~
../../gpu/command_buffer/service/gles2_cmd_decoder.cc:11165:1: warning: unknown attribute 'always_inline' ignored [-Wunknown-attributes]
ALWAYS_INLINE bool GLES2DecoderImpl::CheckMultiDrawArraysVertices(
^~~~~~~~~~~~~
../../base/compiler_specific.h:55:25: note: expanded from macro 'ALWAYS_INLINE'
#define ALWAYS_INLINE [[clang::always_inline]] inline
^~~~~~~~~~~~~~~~~~~~
../../gpu/command_buffer/service/gles2_cmd_decoder.cc:11226:1: warning: unknown attribute 'always_inline' ignored [-Wunknown-attributes]
ALWAYS_INLINE bool GLES2DecoderImpl::CheckTransformFeedback(
^~~~~~~~~~~~~
../../base/compiler_specific.h:55:25: note: expanded from macro 'ALWAYS_INLINE'
#define ALWAYS_INLINE [[clang::always_inline]] inline
^~~~~~~~~~~~~~~~~~~~
../../gpu/command_buffer/service/gles2_cmd_decoder.cc:11268:1: warning: unknown attribute 'always_inline' ignored [-Wunknown-attributes]
ALWAYS_INLINE error::Error GLES2DecoderImpl::DoMultiDrawArrays(
^~~~~~~~~~~~~
../../base/compiler_specific.h:55:25: note: expanded from macro 'ALWAYS_INLINE'
#define ALWAYS_INLINE [[clang::always_inline]] inline
^~~~~~~~~~~~~~~~~~~~
../../gpu/command_buffer/service/gles2_cmd_decoder.cc:11464:1: warning: unknown attribute 'always_inline' ignored [-Wunknown-attributes]
ALWAYS_INLINE bool GLES2DecoderImpl::CheckMultiDrawElementsVertices(
^~~~~~~~~~~~~
../../base/compiler_specific.h:55:25: note: expanded from macro 'ALWAYS_INLINE'
#define ALWAYS_INLINE [[clang::always_inline]] inline
^~~~~~~~~~~~~~~~~~~~
../../gpu/command_buffer/service/gles2_cmd_decoder.cc:11533:1: warning: unknown attribute 'always_inline' ignored [-Wunknown-attributes]
ALWAYS_INLINE error::Error GLES2DecoderImpl::DoMultiDrawElements(
^~~~~~~~~~~~~
../../base/compiler_specific.h:55:25: note: expanded from macro 'ALWAYS_INLINE'
#define ALWAYS_INLINE [[clang::always_inline]] inline
^~~~~~~~~~~~~~~~~~~~
223 warnings generated.
Here we go, ran it again, got a faster result. And a better looking error.
[4270/4278] rm -f obj/chrome/browser/libbrowser.a && "aarch64-oe-linux-llvm-ar" -T -r -c -s -D obj/chrome/browser/libbrowser.a @"obj/chrome/browser/libbrowser.a.rsp"
[4271/4278] python3 ../../build/gn_run_binary.py ./v8-qemu-wrapper.sh ./v8_context_snapshot_generator --output_file=v8_context_snapshot.bin
[4272/4278] touch obj/tools/v8_context_snapshot/generate_v8_context_snapshot.stamp
[4273/4278] touch obj/tools/v8_context_snapshot/v8_context_snapshot.stamp
[4274/4278] rm -f obj/chrome/renderer/librenderer.a && "aarch64-oe-linux-llvm-ar" -T -r -c -s -D obj/chrome/renderer/librenderer.a @"obj/chrome/renderer/librenderer.a.rsp"
[4275/4278] touch obj/chrome/dependencies.stamp
[4276/4278] rm -f obj/headless/libheadless_non_renderer.a && "aarch64-oe-linux-llvm-ar" -T -r -c -s -D obj/headless/libheadless_non_renderer.a @"obj/headless/libheadless_non_renderer.a.rsp"
[4277/4278] rm -f obj/headless/libheadless_shell_lib.a && "aarch64-oe-linux-llvm-ar" -T -r -c -s -D obj/headless/libheadless_shell_lib.a @"obj/headless/libheadless_shell_lib.a.rsp"
[4278/4278] "python3" "../../build/toolchain/gcc_link_wrapper.py" --output="./chrome" -- aarch64-oe-linux-clang++ -target aarch64-oe-linux -mcpu=cortex-a53+crc+crypto -rtlib=compiler-rt --unwindlib=libgcc -stdlib=libc++ -mlittle-endian -Qunused-arguments --sysroot=/workdir/build-image-ross/yoctobuild/tmp-glibc/work/aarch64-mx8mp-oe-linux/chromium-ozone-wayland/114.0.5735.198-r0/recipe-sysroot -Wl,--version-script=../../build/linux/chrome.map -fuse-ld=lld -Wl,--fatal-warnings -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--icf=all -Wl,--color-diagnostics -Wl,-mllvm,-instcombine-lower-dbg-declare=0 -flto=thin -Wl,--thinlto-jobs=14 -Wl,--thinlto-cache-dir=thinlto-cache -Wl,--thinlto-cache-policy=cache_size=10\%:cache_size_bytes=40g:cache_size_files=100000 -Wl,-mllvm,-import-instr-limit=30 -fwhole-program-vtables -Wl,--undefined-version -Wl,--no-call-graph-profile-sort -Wl,-mllvm,-enable-machine-outliner=never -Wl,-O2 -Wl,--gc-sections -rdynamic -Wl,-z,defs -Wl,--as-needed -pie -Wl,--disable-new-dtags -Wl,--lto-O2 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o "./chrome" -Wl,--start-group @"./chrome.rsp" -Wl,--end-group -latomic -ldl -lpthread -lrt -lgmodule-2.0 -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lsmime3 -lnss3 -lsoftokn3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -latk-1.0 -latk-bridge-2.0 -lgio-2.0 -ldbus-1 -lresolv -lexpat -ljpeg -luuid -ldrm -lxkbcommon -latspi -lpci -lffi -lgbm -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -lcairo -lasound -lFLAC -lm -lz -lxslt -lxml2
FAILED: chrome
"python3" "../../build/toolchain/gcc_link_wrapper.py" --output="./chrome" -- aarch64-oe-linux-clang++ -target aarch64-oe-linux -mcpu=cortex-a53+crc+crypto -rtlib=compiler-rt --unwindlib=libgcc -stdlib=libc++ -mlittle-endian -Qunused-arguments --sysroot=/workdir/build-image-ross/yoctobuild/tmp-glibc/work/aarch64-mx8mp-oe-linux/chromium-ozone-wayland/114.0.5735.198-r0/recipe-sysroot -Wl,--version-script=../../build/linux/chrome.map -fuse-ld=lld -Wl,--fatal-warnings -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--icf=all -Wl,--color-diagnostics -Wl,-mllvm,-instcombine-lower-dbg-declare=0 -flto=thin -Wl,--thinlto-jobs=14 -Wl,--thinlto-cache-dir=thinlto-cache -Wl,--thinlto-cache-policy=cache_size=10\%:cache_size_bytes=40g:cache_size_files=100000 -Wl,-mllvm,-import-instr-limit=30 -fwhole-program-vtables -Wl,--undefined-version -Wl,--no-call-graph-profile-sort -Wl,-mllvm,-enable-machine-outliner=never -Wl,-O2 -Wl,--gc-sections -rdynamic -Wl,-z,defs -Wl,--as-needed -pie -Wl,--disable-new-dtags -Wl,--lto-O2 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o "./chrome" -Wl,--start-group @"./chrome.rsp" -Wl,--end-group -latomic -ldl -lpthread -lrt -lgmodule-2.0 -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lsmime3 -lnss3 -lsoftokn3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -latk-1.0 -latk-bridge-2.0 -lgio-2.0 -ldbus-1 -lresolv -lexpat -ljpeg -luuid -ldrm -lxkbcommon -latspi -lpci -lffi -lgbm -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -lcairo -lasound -lFLAC -lm -lz -lxslt -lxml2
aarch64-oe-linux-ld.lld: error: undefined symbol: gl::NativeViewGLSurfaceEGL::NativeViewGLSurfaceEGL(gl::GLDisplayEGL*, void*, std::__1::unique_ptr<gfx::VSyncProvider, std::__1::default_delete<gfx::VSyncProvider> >)
>>> referenced by gl_surface_wayland.cc:35 (./../../ui/ozone/platform/wayland/gpu/gl_surface_wayland.cc:35)
>>> thinlto-cache/Thin-955ab7.tmp.o:(ui::GLSurfaceWayland::GLSurfaceWayland(gl::GLDisplayEGL*, std::__1::unique_ptr<wl_egl_window, ui::EGLWindowDeleter>, ui::WaylandWindow*))
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
WARNING: /workdir/build-image-ross/yoctobuild/tmp-glibc/work/aarch64-mx8mp-oe-linux/chromium-ozone-wayland/114.0.5735.198-r0/temp/run.do_compile.261:1 exit 1 from 'ninja -v -j 14 chrome chrome_sandbox chromedriver.unstripped'
ERROR: Execution of '/workdir/build-image-ross/yoctobuild/tmp-glibc/work/aarch64-mx8mp-oe-linux/chromium-ozone-wayland/114.0.5735.198-r0/temp/run.do_compile.261' failed with exit code 1
Not sure why that might happen... my only idea would be to inspect the object files and see what's defined/exported and compare that to what's being referenced. Although I haven't figured out how to do so on my machine yet, because apparently the .o files that make up out/WaylandRelease/obj/ui/gl/libgl_wrapper.a
- including gl_surface_egl.o
, where the symbol in question symbol should be defined - are LLVM IR bitcode, and I don't know how to use that[^1]. It might be different for your build, though, because I only have a regular Linux desktop release build (I don't have a Yocto build ready right now).
Alternatively, I think you might have success using the already mentioned dunfell-clang14 branch (rakuco/meta-clang/tree/dunfell-clang14
instead of kraj/meta-clang/tree/dunfell-clang12
), but of course I understand if you don't want to use that experimental branch.
[^1]: llvm-dis
gives me this error: Unknown attribute kind (86) (Producer: 'LLVM17.0.0git' Reader: 'LLVM 15.0.7')
, and I don't want to compile it from source.
Uninformed guess here: every now and then people file issues related to undefined GL symbols, and IIRC most of the time they seem related to imx and different GL implementations. I wonder if that's the case here?
Could be. I'm building for an imx8 device. I'll give dunfell-clang14 a try and see. Not sure I would be willing to proceed with that in a production setting.
We're going to stick with the tried and true version 90 until we either change hardware or migrate our BSP to a newer version of Yocto (currently on dunfell). We've actually been testing version 83 with better results for hardware acceleration. I'm wondering if this just might be the boat we're stuck in due to our custom hardware.
I'll close this issue.
Just recently attempted to upgrade from chromium v90 to latest in master and am getting the below compilation error. Figured I'd start here and move the issue to meta-clang if needed. I'm pretty sure I had a newer version building earlier this year so I may step backwards a few versions of chromium and see what results I get.
I set preferred version of nodejs/nodejs-native to 14.% and and am using dunfell-clang12 branch of meta-clang. I have no modifications to the chromium-ozone-wayland recipe other than
DEPENDS += "at-spi2-atk"
in a bbappend.