www/chromium started failing to build after commit main: git: ee37f64cf875 stable/13: git: dba677d13b26 with errors like below. samu: job failed: cc -MMD -MF obj/third_party/nasm/nasm/regvals.o.d -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DUSE_X11=1 -DOFFICIAL_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DCR_CLANG_REVISION=\"llvmorg-13-init-6429-g0e92cbd6-2\" -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DHAVE_CONFIG_H -I../.. -Igen -I../../third_party/nasm -I../../third_party/nasm/asm -I../../third_party/nasm/disasm -I../../third_party/nasm/include -I../../third_party/nasm/output -I../../third_party/nasm/x86 -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -flto=thin -fsplit-lto-unit -fwhole-program-vtables -m64 -march=x86-64 -msse3 -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -O2 -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wall -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-thread-safety-analysis -Wno-thread-safety-attributes -Wno-unused-function -Wno-string-conversion -Wno-macro-redefined -Wno-sign-compare -Wno-nonnull -Wno-uninitialized -std=c11 -c ../../third_party/nasm/x86/regvals.c -o obj/third_party/nasm/nasm/regvals.o In file included from ../../third_party/nasm/x86/regvals.c:3: In file included from ../../third_party/nasm/include/tables.h:43: ../../third_party/nasm/include/compiler.h:249:21: error: static declaration of 'mempcpy' follows non-static declaration static inline void *mempcpy(void *dst, const void *src, size_t n) ^ /usr/include/string.h:70:7: note: previous declaration is here void *mempcpy(void * __restrict, const void * __restrict, size_t); ^ 1 error generated.
I have the exact same issue building the chromium port on stable 13 as well.
Changed Importance to "Affect Some People", as second person popped in.
(In reply to Tomoaki AOKI from comment #2) Same here on stable/13-n246626-af732203b8f7 and chromium-91.0.4472.164.
Created attachment 226835 [details] AdHoc patch, cannot commit! AdHoc patch only for commits below and later. DO NOT TRY TO APPLY ON OLDER VERSION! main: git ee37f64cf875 stable/13: git dba677d13b26 For applicable versions, apply this on /usr/ports. Actually, this patch removes hunk 3 from freebsd-patch below. www/chromium/files/patch-third__party_nasm_config_config-linux.h But it IS needed for older versions, and there's no bump for above-mentioned commits. So there's no standard way to fix www/chromium/Makefile.
BTW, devel/nasm built fine for me on affected revision. If it's usable for www/chromium build instead of bunlded one on all supported branches, and there's any way to do so, it can be a sane solution. Can anyone try?
(In reply to Tomoaki AOKI from comment #4) With this patch chromium compilles and works fine.
Created attachment 227003 [details] Patch rev.2 Updated patch. *Delete offending hunk from files/patch-third__party_nasm_config_config-linux.h and make deleted hunk an extra-patch. *Check the existense of mempcpy() in /usr/include/string.h and apply the extra-patch above only when mempcpy() is NOT exist. As this is a build fix, no need to bump revision. Some notes for future: As no bump had done on adding mempcpy() to base, I first tried usual OSVERSION check using later and nearest bump. But this could cause future confusion, as it's not the bump for this change. So I decided to apply unusual tricky way above.
chromium 92.0.4515.159 (git 76daa653245e) has the same issue, and the patch (Patch rev2) here fixes the issue,too. Built OK on stable/13, amd64. (Actually, not yet build-tested for main, but should be OK, too, theoretically.)
(In reply to Tomoaki AOKI from comment #8) I tested a patched 92.0.4515.159 on a recent 14.0 CURRENT amd64 and it builds, installs and runs fine so far :)
Works for me on my 13-STABLE/amd64 system.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=9e6695a71d64d995e6619497626c0a780397b7c9 commit 9e6695a71d64d995e6619497626c0a780397b7c9 Author: Tomoaki AOKI <junchoon@dec.sakura.ne.jp> AuthorDate: 2021-08-30 16:10:28 +0000 Commit: Rene Ladan <rene@FreeBSD.org> CommitDate: 2021-09-01 10:09:23 +0000 www/chromium: fix build on CURRENT ... after mempcpy(3) has been added to base libc. PR: 257352 MFH: 2021Q3 www/chromium/Makefile | 5 +++++ www/chromium/files/extra-patch-no-mempcpy-nasm (new) | 11 +++++++++++ .../files/patch-third__party_nasm_config_config-linux.h | 9 --------- 3 files changed, 16 insertions(+), 9 deletions(-)
Patch committed, thanks!
A commit in branch 2021Q3 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=5218b91edff502d736eec1e4db6eb23b44638839 commit 5218b91edff502d736eec1e4db6eb23b44638839 Author: Tomoaki AOKI <junchoon@dec.sakura.ne.jp> AuthorDate: 2021-08-30 16:10:28 +0000 Commit: Rene Ladan <rene@FreeBSD.org> CommitDate: 2021-09-01 20:35:55 +0000 www/chromium: fix build on CURRENT ... after mempcpy(3) has been added to base libc. PR: 257352 MFH: 2021Q3 (cherry picked from commit 9e6695a71d64d995e6619497626c0a780397b7c9) www/chromium/Makefile | 5 +++++ www/chromium/files/extra-patch-no-mempcpy-nasm (new) | 11 +++++++++++ .../files/patch-third__party_nasm_config_config-linux.h | 9 --------- 3 files changed, 16 insertions(+), 9 deletions(-)
(In reply to commit-hook from comment #13) This change will result in an error message in a non-problematic environment (12.2-STABLE). The following might be better? ... BASE_MEMPCPY!= ${GREP} -q mempcpy ${CROSS_SYSROOT}/usr/include/string.h && echo 1 || echo 0 .if ${BASE_MEMPCPY} ...
(In reply to Tatsuki Makino from comment #14) Thanks for pointing this out. I've tested the patch only on affected base only. (Testing the reverse condition by changing "mempcpy" on patch to something nonexistent, i.e. "mempcpie", and see the extra patch IS applied. Didn't see outputs itself from make.) But unfortunately, the logic is reversed. The extra patch is needed only if string.h doesn't have mempcpy() definition. So `echo 1` and `echo 0` should be swapped.
(In reply to Tomoaki AOKI from comment #15) Yes, I wrote my comment #14 without thinking about the conditions of true and false :) To be precise, it would look like following. Or, .if ! ${BASE_MEMPCPY}. Also, I forgot to write that the error message is: make: "/usr/ports/www/chromium/Makefile" line 210: warning: "/usr/bin/grep mempcpy /usr/include/string.h" returned non-zero status diff --git www/chromium/Makefile www/chromium/Makefile index d60012118b..fd471f4d78 100644 --- www/chromium/Makefile +++ www/chromium/Makefile @@ -207,8 +207,8 @@ TEST_ALL_TARGET= ${TEST_TARGETS} .include <bsd.port.options.mk> .include <bsd.port.pre.mk> -BASE_MEMPCPY!= ${GREP} mempcpy ${CROSS_SYSROOT}/usr/include/string.h -.if empty(BASE_MEMPCPY) +BASE_MEMPCPY!= ${GREP} -q mempcpy ${CROSS_SYSROOT}/usr/include/string.h && echo 0 || echo 1 +.if ${BASE_MEMPCPY} EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-no-mempcpy-nasm .endif
(In reply to Tatsuki Makino from comment #16) devel/electron12 includes an internal chromium build that also gets the following in my attempted builds based on: # cd /usr/ports # ~/fbsd-based-on-what-commit.sh branch: main merge-base: 59611d61d70a85f4418f3f701db1b7baf58560ba merge-base: CommitDate: 2021-09-29 09:39:17 +0000 59611d61d70a (HEAD -> main) databases/postgresql14-server: fix openssl dependency n560161 (--first-parent --count for merge-base) The examples: In file included from ../../third_party/nasm/asm/directbl.c:6: In file included from ../../third_party/nasm/asm/directiv.h:9: In file included from ../../third_party/nasm/include/perfhash.h:37: ../../third_party/nasm/include/compiler.h:249:21: error: static declaration of 'mempcpy' follows non-static declaration static inline void *mempcpy(void *dst, const void *src, size_t n) ^ /usr/include/string.h:70:7: note: previous declaration is here void *mempcpy(void * __restrict, const void * __restrict, size_t); ^ 1 error generated. and: In file included from ../../third_party/nasm/asm/error.c:38: ../../third_party/nasm/include/compiler.h:249:21: error: static declaration of 'mempcpy' follows non-static declaration static inline void *mempcpy(void *dst, const void *src, size_t n) ^ /usr/include/string.h:70:7: note: previous declaration is here void *mempcpy(void * __restrict, const void * __restrict, size_t); ^ 1 error generated. and: In file included from ../../third_party/nasm/asm/directiv.c:38: ../../third_party/nasm/include/compiler.h:249:21: error: static declaration of 'mempcpy' follows non-static declaration static inline void *mempcpy(void *dst, const void *src, size_t n) ^ /usr/include/string.h:70:7: note: previous declaration is here void *mempcpy(void * __restrict, const void * __restrict, size_t); ^ 1 error generated. and: In file included from ../../third_party/nasm/asm/assemble.c:178: ../../third_party/nasm/include/compiler.h:249:21: error: static declaration of 'mempcpy' follows non-static declaration static inline void *mempcpy(void *dst, const void *src, size_t n) ^ /usr/include/string.h:70:7: note: previous declaration is here void *mempcpy(void * __restrict, const void * __restrict, size_t); ^ 1 error generated. and: In file included from ../../third_party/nasm/asm/eval.c:38: ../../third_party/nasm/include/compiler.h:249:21: error: static declaration of 'mempcpy' follows non-static declaration static inline void *mempcpy(void *dst, const void *src, size_t n) ^ /usr/include/string.h:70:7: note: previous declaration is here void *mempcpy(void * __restrict, const void * __restrict, size_t); ^ 1 error generated.
(In reply to Mark Millard from comment #17) I forgot to list the Freebsd vintage: # uname -apKU FreeBSD amd64_ZFS 14.0-CURRENT FreeBSD 14.0-CURRENT #2 main-n249019-0637070b5bca-dirty: Tue Aug 31 01:27:48 PDT 2021 root@amd64_ZFS:/usr/obj/BUILDs/main-amd64-nodbg-clang/usr/main-src/amd64.amd64/sys/GENERIC-NODBG amd64 amd64 1400032 1400032
(In reply to Mark Millard from comment #17) Please try patch on Bug 257378. I've already ported the patch here for devel/electron12 and is reported to fix it. *I myself cannot test it as installed default node conflicts with required one. It's just waiting for QA now.
(In reply to Tomoaki AOKI from comment #19) The patch allowed my attempt to build via poudriere-devel on amd64 to finish. I do not use electron12 but I've been testing doing bulk -a runs on a HoneyComb (16 Cortex-A72's) and wanted the activity to span bulding large things like electron12.
*** Bug 262111 has been marked as a duplicate of this bug. ***
^Triage: Re-open given comment 14 onward and bug 262111. Request feedback from committer that originally resolved
(In reply to Kubilay Kocak from comment #22) > comment 14 onward Is it me? :) I'm 12.3-STABLE, so I've successfully slipped past this problem in 98.0.4758.102. If it points to bug 258271 comment #14, then that is also a duplicate.
This was fixed in main and quarterly.