While trying to compile www/chromium using poudriere on a Pi4 running FreeBSD nemesis.zefox.com 14.0-CURRENT FreeBSD 14.0-CURRENT #3 main-d72d5ced80: Sun Jul 18 22:25:27 PDT 2021 the build process stopped with FAILED: v8_context_snapshot_generator . The text following the error was python "../../build/toolchain/gcc_link_wrapper.py" --output="./v8_context_snapsh ot_generator" -- c++ -fuse-ld=lld -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack - Wl,-z,relro -Wl,-z,now -Wl,-z,max-page-size=4096 -Wl,--icf=all -Wl,--color-diagn ostics -flto=thin -Wl,--thinlto-jobs=2 -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=5 -fwhole-program-vtables -Wl,-O2 -Wl,--gc-sections -rdynamic -Wl,--lto-O0 -pie -Wl,--disable-new-dtags -Wl,--icf=none -L/usr/local/lib -fstack-protector-strong -L/usr/local/lib -o "./v8_context_snapshot_generator" -Wl,--start-group @"./v8_context_snapshot_generator.rsp" -Wl,--end-group -lpthread -lgmodule-2.0 -lglib-2.0 -lgobject-2.0 -lgthread-2.0 -lintl -lnss3 -lsmime3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -ldl -lexecinfo -lkvm -lutil -lrt -ljpeg -lpng16 -lz -lxml2 -lxslt -llzma -lm -lgio-2.0 -lwebpdemux -lwebpmux -lwebp -lfreetype -lexpat -lfontconfig -lharfbuzz-subset -lharfbuzz -lopus -lavcodec -lavformat -lavutil -lopenh264 -lX11 -lXcomposite -lXdamage -lXext -lXfixes -lXrender -lXrandr -lXtst -lxcb -ldrm -lxkbcommon -lgbm -latk-1.0 -latk-bridge-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgtk-3 -lgdk-3 -lcairo-gobject -lgdk_pixbuf-2.0 -lXi -lGL -lpci -lsndio -lsnappy -lcups -latspi -ldbus-1 ld.lld: error: undefined symbol: dav1d_get_cpu_flags_arm >>> referenced by cpu.c >>> thinlto-cache/Thin-e24afd.tmp.o:(dav1d_init_cpu) c++: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed. ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make: stopped in /usr/ports/www/chromium =>> Cleaning up wrkdir ===> Cleaning for chromium-91.0.4472.164 build of www/chromium | chromium-91.0.4472.164 ended at Fri Jul 23 10:58:54 PDT 2021
Created attachment 226922 [details] v0 it seems caused by lto. It builds fine on my board with this patch (the current behavior is that lto is ON due to the missing LTO_VARS_OFF line) Can you try the attached patch? You may have to clean your workdir first.
Patch applied, waiting for poudriere to quit and clean up before restarting. bob
It just dawned on me that poudriere is untarring chromium, presumably from distfiles. The patch was applied to www/chromium, so it seems clear that my experiment can't work. Can patches be applied to a poudriere build, or is it better in this case to just use make in www/chromium ? That is apt to run afoul of python conflicts but is worth a try if it's the simplest approach. Thanks for your help! bob prohaska
(In reply to Bob Prohaska from comment #3) I don't understand. Make sure that LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false is present in www/chromium/Makefile
As usual, it's I who does not understand. Doing bob@nemesis:/usr/ports/www/chromium % grep LTO_VARS_OFF= Makefile LTO_VARS_OFF= GN_ARGS+=use_thin_lto=false bob@nemesis:/usr/ports/www/chromium % suggests that the patch applied correctly. When I saw bsdtar running in a top window I thought poudriere was repeating something akin to make extract, which would overwrite the patched file. Perhaps not. The logfile is up to [ 68% 32910/47953] The failure was reported in the mid-90% range, so it'll be another day or two for results to emerge. Thanks for your patience! bob prohaska
Looks like the patch worked for me. www/chromium built,installed and runs. The are a few errors reported on startup, but they don't seem fatal. I'll bring those up in a separate thread. Thanks for your help! bob prohaska
@chromium: can you have a look at the patch? thanks in advance.
(In reply to Mikael Urankar from comment #7) let's try a PR in github instead: https://github.com/freebsd/chromium/pull/4
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=447def6dd2c2dd4eb908b4e41ec607e34280bf6c commit 447def6dd2c2dd4eb908b4e41ec607e34280bf6c Author: Bob Prohaska <fbsd@www.zefox.net> AuthorDate: 2021-09-01 10:08:16 +0000 Commit: Rene Ladan <rene@FreeBSD.org> CommitDate: 2021-09-01 10:09:24 +0000 www/chromium: fix build on aarch64 (RPI4) ... by respecting LTO_VARS=off and exlcuding LTO from aarch64 PR: 257468 MFH: 2021Q3 www/chromium/Makefile | 2 ++ 1 file changed, 2 insertions(+)
Patch committed, thanks!
A commit in branch 2021Q3 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=909de6c431b73f6d4c28b818506ae80f62668c21 commit 909de6c431b73f6d4c28b818506ae80f62668c21 Author: Bob Prohaska <fbsd@www.zefox.net> AuthorDate: 2021-09-01 10:08:16 +0000 Commit: Rene Ladan <rene@FreeBSD.org> CommitDate: 2021-09-01 20:35:55 +0000 www/chromium: fix build on aarch64 (RPI4) ... by respecting LTO_VARS=off and exlcuding LTO from aarch64 PR: 257468 MFH: 2021Q3 (cherry picked from commit 447def6dd2c2dd4eb908b4e41ec607e34280bf6c) www/chromium/Makefile | 2 ++ 1 file changed, 2 insertions(+)