firefox 128.0 fails to build on aarch64 main-n271007-2abea9df0165: <snip> /usr/local/bin/clang++17 -o SkCpu.o -c -I/wrkdirs/usr/ports/www/firefox/work/.build/dist/stl_wrappers -fvisibility=hidden -fvisibility-inlines-hidden -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -DMOZ_SKIA -DSKIA_IMPLEMENTATION=1 -DSK_PDF_USE_HARFBUZZ_SUBSETTING=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/wrkdirs/usr/ports/www/firefox/work/firefox-128.0/gfx/skia -I/wrkdirs/usr/ports/www/firefox/work/.build/gfx/skia -I/wrkdirs/usr/ports/www/firefox/work/firefox-128.0/gfx/skia/skia -I/wrkdirs/usr/ports/www/firefox/work/firefox-128.0/gfx/cairo/cairo/src -I/wrkdirs/usr/ports/www/firefox/work/.build/dist/include -I/usr/local/include/nspr -I/usr/local/include -I/usr/local/include/nss -I/usr/local/include/nspr -I/wrkdirs/usr/ports/www/firefox/work/.build/dist/include/nss -I/usr/local/include -I/usr/local/include/libpng16 -I/usr/local/include/pixman-1 -I/usr/local/include -DMOZILLA_CLIENT -include /wrkdirs/usr/ports/www/firefox/work/.build/mozilla-config.h -DLIBICONV_PLUG -isystem /usr/local/include -fno-rtti -pthread -fno-sized-deallocation -fno-aligned-new -ffunction-sections -fdata-sections -fno-math-errno -fno-exceptions -O2 -pipe -O3 -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -isystem /usr/local/include -fno-exceptions -fPIC -O2 -O3 -fno-omit-frame-pointer -funwind-tables -Wall -Wbitfield-enum-conversion -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtautological-constant-in-range-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wenum-compare-conditional -Wenum-float-conversion -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-deprecated-this-capture -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wno-error=deprecated-builtins -Wformat -Wformat-security -Wno-psabi -Wthread-safety -Wno-error=builtin-macro-redefined -Wno-unknown-warning-option -Wno-deprecated-declarations -Wno-overloaded-virtual -Wno-sign-compare -Wno-unreachable-code -Wno-unused-function -Wno-implicit-fallthrough -Wno-inconsistent-missing-override -Wno-macro-redefined -Wno-unused-private-field -I/usr/local/include/harfbuzz -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/pango-1.0 -I/usr/local/include/harfbuzz -I/usr/local/include -pthread -I/usr/local/include/fribidi -I/usr/local/include/cairo -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -D_THREAD_SAFE -fno-strict-aliasing -ffp-contract=off -MD -MP -MF .deps/SkCpu.o.pp /wrkdirs/usr/ports/www/firefox/work/firefox-128.0/gfx/skia/skia/src/core/SkCpu.cpp gfx/skia/SkMatrix.o /wrkdirs/usr/ports/www/firefox/work/firefox-128.0/gfx/skia/skia/src/core/SkCpu.cpp:86:6: error: expected value in expression 86 | #elif | ^ 1 error generated. <snip> Full log: http://freebsdrpi4.hopto.org/data/15aarch64-main/2024-07-03_20h43m48s/logs/errors/firefox-128.0,2.log
What is at /wrkdirs/usr/ports/www/firefox/work/firefox-128.0/gfx/skia/skia/src/core/SkCpu.cpp:86:6 ?
And the current version of the file doesn't have an #elif: https://github.com/mozilla/gecko-dev/blame/master/gfx/skia/skia/src/core/SkCpu.cpp Is this a patch that no longer applies?
(In reply to Paul Floyd from comment #2) `make patch` in www/firefox: diff work/firefox-128.0/gfx/skia/skia/src/core/SkCpu.cpp.orig work/firefox-128.0/gfx/skia/skia/src/core/SkCpu.cpp 85a86,101 > #elif > #include <machine/armreg.h> > #ifndef ID_AA64ISAR0_CRC32_VAL > #define ID_AA64ISAR0_CRC32_VAL ID_AA64ISAR0_CRC32 > #endif > > static uint32_t read_cpu_features() { > uint32_t features = 0; > uint64_t id_aa64isar0; > > id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1); > if (ID_AA64ISAR0_CRC32_VAL(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) { > features |= SkCpu::CRC32; > } > return features; > } It seems that patch is applied
(...) original file around line 86: #elif defined(SK_CPU_LOONGARCH) #include <sys/auxv.h> static uint32_t read_cpu_features(void) { uint64_t features = 0; uint64_t hwcap = getauxval(AT_HWCAP); if (hwcap & HWCAP_LOONGARCH_LSX) { features |= SkCpu::LOONGARCH_SX; } if (hwcap & HWCAP_LOONGARCH_LASX) { features |= SkCpu::LOONGARCH_ASX; } return features; } #else static uint32_t read_cpu_features() { return 0; } #endif
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3e71978b0790b191fe9324fdd31bd618054a8fde commit 3e71978b0790b191fe9324fdd31bd618054a8fde Author: Christoph Moench-Tegeder <cmt@FreeBSD.org> AuthorDate: 2024-07-04 18:48:51 +0000 Commit: Christoph Moench-Tegeder <cmt@FreeBSD.org> CommitDate: 2024-07-04 18:48:51 +0000 www/firefox: fix botched patch this fixes build on non-amd64 PR: 280120 Reported by: eduardo@ www/firefox/files/patch-gfx_skia_skia_src_core_SkCpu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
A commit in branch 2024Q3 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b3cb5f53ad6fbd9445a8b6666c8a14a44c0b00b1 commit b3cb5f53ad6fbd9445a8b6666c8a14a44c0b00b1 Author: Christoph Moench-Tegeder <cmt@FreeBSD.org> AuthorDate: 2024-07-04 18:48:51 +0000 Commit: Christoph Moench-Tegeder <cmt@FreeBSD.org> CommitDate: 2024-07-04 18:52:18 +0000 www/firefox: fix botched patch this fixes build on non-amd64 PR: 280120 Reported by: eduardo@ (cherry picked from commit 3e71978b0790b191fe9324fdd31bd618054a8fde) www/firefox/files/patch-gfx_skia_skia_src_core_SkCpu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
With patch fixed, a new failure occurs: firefox-128.0_1,2: /wrkdirs/usr/ports/www/firefox/work/firefox-128.0/gfx/skia/skia/src/core/SkCpu.cpp:98:32: error: no member named 'CRC32' in 'SkCpu' 98 | features |= SkCpu::CRC32; | ~~~~~~~^ 1 error generated. Full log: http://freebsdrpi4.hopto.org/data/15aarch64-main/2024-07-04_20h24m40s/logs/errors/firefox-128.0_1,2.log Any clues?
Fixed in https://cgit.freebsd.org/ports/commit/?id=8565550e2557fc339bb8e10f0197c6de36a154d1 Thanks