Created attachment 252179 [details] patch v1 Hi, I discovered that on recent head after the changes in [1] and/or [2] qt6-webengine fails to build with the error below. Looks like the base change actually added mempcpy() implementation. I created a patch that conditionally fixes the embedded config.h changing the line for this. This patch works fine here. I did choose the nearest __FreeBSD_version available -------- In file included from ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/third_party/nasm/asm/eval.c:38: ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/third_party/nasm/include/compiler.h:249:21: error: static declaration of 'mempcpy' follows non-static declaration 249 | static inline void *mempcpy(void *dst, const void *src, size_t n) | ^ /usr/include/string.h:71:8: note: previous declaration is here 71 | void *(mempcpy)(void * __restrict, const void * __restrict, size_t); | ^ 1 error generated. -------- [1] https://github.com/freebsd/freebsd-src/commit/cf8e5289a110954600f135024d1515a77d0ae34d [2] https://github.com/freebsd/freebsd-src/commit/0c47b9c211ede221629914ae0c5553586e772109
Thanks for the report and patch, but I think the underlying issue is that the regex in [1] no longer matches after [2], so HAVE_MEMPCPY=1 no longer gets defined and nasm uses it's own implementation instead. The pattern "*\*mempcpy*" will match "*mempcpy", but not "*(mempcpy)". Since all supported versions of FreeBSD have mempcpy(3), we can probably just remove [1] entirely and that part of the patch in [3], but I haven't tested that theory yet. These patches were taken from www/chromium, so it and other chromium-based ports like www/electron*, will also need reworked. CC'ing maintainers of those ports. [1] https://cgit.freebsd.org/ports/tree/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_nasm_BUILD.gn#n9 [2] https://github.com/freebsd/freebsd-src/commit/0c47b9c211ede221629914ae0c5553586e772109 [3] https://cgit.freebsd.org/ports/tree/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_nasm_config_config-linux.h#n36
(In reply to Jason E. Hale from comment #1) Thanks for explaining this to me. I was not aware of such details. I was simply in an hurry to fix the ports build on my machine and thought I could report the issue, a patch also helps defining the issue. Thanks for the fast feedback!
Created attachment 252193 [details] patch v2 I implemented the patch as suggested by jhale. I'm attaching it, it works fine here! Thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=9fd42baef1d67ba2b5be74ec5ca634a044b13cb8 commit 9fd42baef1d67ba2b5be74ec5ca634a044b13cb8 Author: Guido Falsi <madpilot@FreeBSD.org> AuthorDate: 2024-07-21 14:27:05 +0000 Commit: Jason E. Hale <jhale@FreeBSD.org> CommitDate: 2024-07-21 14:50:37 +0000 www/qt6-webengine: Fix build on recent -CURRENT Due to recent changes in string.h, the regex in our local patch for the bundled nasm to check whether mempcpy(3) was available no longer worked. This caused it to use its own implementation which caused an error due to a declaration conflict. Since all currently supported versions of FreeBSD have mempcpy(3), this patch is no longer needed. PR: 280376 ...c_3rdparty_chromium_third__party_nasm_BUILD.gn (gone) | 16 ---------------- ...arty_chromium_third__party_nasm_config_config-linux.h | 11 ++--------- 2 files changed, 2 insertions(+), 25 deletions(-)
(In reply to Guido Falsi from comment #3) Thanks, Guido! I just committed your changes.
(In reply to Jason E. Hale from comment #5) Thanks to you!
(In reply to Guido Falsi from comment #3) I have confirmed the same patch can be applied to devel/electron* as well. They build fine on recent 15-CURRENT with the changes. Thanks for the heads up and the patch!