[Bug 297526] [patch] www/ungoogled-chromium 151.0.7922.137 build failure if CPU lacks AVX-512 support
| Newsgroups | gmane.os.freebsd.devel.ports.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297526
Bug ID: 297526
Summary: [patch] www/ungoogled-chromium 151.0.7922.137 build
failure if CPU lacks AVX-512 support
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: Individual Port(s)
Assignee: [email protected]
Reporter: [email protected]
Flags: maintainer-feedback?([email protected])
Assignee: [email protected]
Created attachment 273752
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=273752&action=edit
Reverse "allow_avx512" and contitionally re-enable for opts("ml4")
Hi, having CPUTYPE?=haswell usually adds optimization, but starting with
151.0.7922.137 www/ungoogled-chromium defaults to optimize for "ml4" (Machine
Learning?) in the 2D graphics library Skia.
Example fallout:
[ 4% 2282/54576] c++ -MD -MF
obj/skia/skcms_TransformSkx/skcms_TransformSkx.o.d -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE
-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VI09:16
[120/19772]
ONS -D_LIBCPP_INSTRUMENTED_WITH_ASAN=0
-DCR_LIBCXX_REVISION=5abc7f839700f0f17338434e1c1c6a8c87c00c11 -DUSE_AURA=1
-DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DNDEBUG -DNVALGRIND
-DDYNAMIC_ANNOTATIONS_ENABLED=0 -DSK_ENABLE_SKSL
-DSK_UNTIL_CRBUG_1187654_IS_FIXED -DSK_USER_CONFIG_HEADER=\"../../skia/
config/SkUserConfig.h\" -DSK_USE_PARTITION_ALLOC
-DSK_WIN_FONTMGR_NO_SIMULATIONS -DSK_ENABLE_LEGACY_SHADERCONTEXT
-DSK_LEGACY_DESERIAL_IMAGE_PROC -DSK_CODEC_DECODES_PNG
-DSK_CODEC_DECODES_PNG_WITH_RUST -DSK_CODEC_ENCODES_PNG
-DSK_CODEC_ENCODES_PNG_WITH_RUST -DSK_CODEC_DECODES_BMP_WITH_RUST -DSK_COD
EC_COLOR_PROFILE_PARSE_WITH_RUST -DSK_EXIF_PARSE_WITH_RUST
-DSK_ENABLE_AVX512_OPTS -DSK_CODEC_DECODES_JPEG -DSK_CODEC_ENCODES_JPEG
-DSK_GAMMA_EXPONENT=1.2 -DSK_GAMMA_CONTRAST=0.2 -DSK_GANESH
-DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\"
-DSK_GL -DSK_VULKAN=1 -DSK_GR
APHITE -DSK_DAWN -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR
-DVK_USE_PLATFORM_WAYLAND_KHR -DIS_SKIA_IMPL=1
-DSK_DISABLE_LEGACY_INIT_DECODERS -DSK_DISABLE_LEGACY_PNG_WRITEBUFFER
-DSK_TYPEFACE_FACTORY_FONTATIONS
-DSK_FREETYPE_MINIMUM_RUNTIME_VERSION_IS_BUILD_VERSION -DSK_TYPEFACE_FACTORY_FR
EETYPE -DSK_FONTMGR_FREETYPE_EMPTY_AVAILABLE
-DSK_DEFAULT_FONT_CACHE_LIMIT=20971520 -DSKCMS_IMPLEMENTATION=1 -I../.. -Igen
-I../../buildtools/third_party/libc++ -I../../third_party/skia
-Igen/third_party/skia -I../../third_party/wuffs/src/release/c
-I../../third_party/vulkan-headers/src/include -I.
./../third_party/wayland/src/src -I../../third_party/wayland/include/src
-Igen/third_party/dawn/include -I../../third_party/dawn/include
-fno-delete-null-pointer-checks -fno-strict-overflow -fno-ident -fno-math-errno
-fno-strict-aliasing -fstack-protector -fno-unwind-tables
-fno-asynchronous-unwind
-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants
-fcomplete-member-pointers -m64 -msse3 -ffile-compilation-dir=.
-no-canonical-prefixes -ftrivial-auto-var-init=zero -fno-omit-frame-pointer -g0
-fvisibility=hidden -Wheader-hygiene -Wstring-conversion
-Wtautological-overlap-compare -w
-std=c11 -march=x86-64-v4 -mprefer-vector-width=512 -O2 -fdata-sections
-ffunction-sections -fno-unique-section-names -Wno-redundant-parens -Wall
-Wno-unused-variable -Wno-c++11-narrowing -Wno-unused-but-set-variable
-Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi
-Wloop-analysis
-Wno-unneeded-internal-declaration -Wno-cast-function-type
-Wno-thread-safety-reference-return -Wno-nontrivial-memcall
-Wexit-time-destructors -Wno-exit-time-destructors -Wno-exit-time-destructors
-std=c++23 -Wno-trigraphs -fno-exceptions -fno-rtti -nostdinc++
-isystem../../third_party/libc++/src/i
nclude -isystem../../third_party/libc++abi/src/include
-fvisibility-inlines-hidden -Wno-invalid-offsetof -Wenum-compare-conditional
-Wno-nullability-completeness -O2 -pipe -march=haswell -fstack-protector-strong
-isystem /usr/local/include -fno-strict-aliasing -march=haswell -isystem
/usr/local/in
clude -I/usr/local/include/libepoll-shim
-I/var/ports.wrkroot/www/ungoogled-chromium/work/pulseaudio-16.1/src
-DPA_MAJOR=16 -fmodule-name="//skia:skcms_TransformSkx_Private" -c
../../third_party/skia/modules/skcms/src/skcms_TransformSkx.cc -o
obj/skia/skcms_TransformSkx/skcms_TransformSkx.o
FAILED: [code=1] obj/skia/skcms_TransformSkx/skcms_TransformSkx.o
c++ -MD -MF obj/skia/skcms_TransformSkx/skcms_TransformSkx.o.d
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE
-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_INST
RUMENTED_WITH_ASAN=0
-DCR_LIBCXX_REVISION=5abc7f839700f0f17338434e1c1c6a8c87c00c11 -DUSE_AURA=1
-DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DNDEBUG -DNVALGRIND
-DDYNAMIC_ANNOTATIONS_ENABLED=0 -DSK_ENABLE_SKSL
-DSK_UNTIL_CRBUG_1187654_IS_FIXED
-DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfi
g.h\" -DSK_USE_PARTITION_ALLOC -DSK_WIN_FONTMGR_NO_SIMULATIONS
-DSK_ENABLE_LEGACY_SHADERCONTEXT -DSK_LEGACY_DESERIAL_IMAGE_PROC
-DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_PNG_WITH_RUST -DSK_CODEC_ENCODES_PNG
-DSK_CODEC_ENCODES_PNG_WITH_RUST -DSK_CODEC_DECODES_BMP_WITH_RUST
-DSK_CODEC_COLOR_PROFILE_P
ARSE_WITH_RUST -DSK_EXIF_PARSE_WITH_RUST -DSK_ENABLE_AVX512_OPTS
-DSK_CODEC_DECODES_JPEG -DSK_CODEC_ENCODES_JPEG -DSK_GAMMA_EXPONENT=1.2
-DSK_GAMMA_CONTRAST=0.2 -DSK_GANESH
-DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\"
-DSK_GL -DSK_VULKAN=1 -DSK_GRAPHITE -DSK_DAWN -
DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR
-DVK_USE_PLATFORM_WAYLAND_KHR -DIS_SKIA_IMPL=1
-DSK_DISABLE_LEGACY_INIT_DECODERS -DSK_DISABLE_LEGACY_PNG_WRITEBUFFER
-DSK_TYPEFACE_FACTORY_FONTATIONS
-DSK_FREETYPE_MINIMUM_RUNTIME_VERSION_IS_BUILD_VERSION
-DSK_TYPEFACE_FACTORY_FREETYPE -DSK_FONTMG
R_FREETYPE_EMPTY_AVAILABLE -DSK_DEFAULT_FONT_CACHE_LIMIT=20971520
-DSKCMS_IMPLEMENTATION=1 -I../.. -Igen -I../../buildtools/third_party/libc++
-I../../third_party/skia -Igen/third_party/skia
-I../../third_party/wuffs/src/release/c
-I../../third_party/vulkan-headers/src/include -I../../third_party/w
ayland/src/src -I../../third_party/wayland/include/src
-Igen/third_party/dawn/include -I../../third_party/dawn/include
-fno-delete-null-pointer-checks -fno-strict-overflow -fno-ident -fno-math-errno
-fno-strict-aliasing -fstack-protector -fno-unwind-tables
-fno-asynchronous-unwind-tables -fPIC -pth
read -fcolor-diagnostics -fmerge-all-constants -fcomplete-member-pointers -m64
-msse3 -ffile-compilation-dir=. -no-canonical-prefixes
-ftrivial-auto-var-init=zero -fno-omit-frame-pointer -g0 -fvisibility=hidden
-Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -w -std=c11
-march=x
86-64-v4 -mprefer-vector-width=512 -O2 -fdata-sections -ffunction-sections
-fno-unique-section-names -Wno-redundant-parens -Wall -Wno-unused-variable
-Wno-c++11-narrowing -Wno-unused-but-set-variable
-Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi
-Wloop-analysis -Wno-unneeded-inte
rnal-declaration -Wno-cast-function-type -Wno-thread-safety-reference-return
-Wno-nontrivial-memcall -Wexit-time-destructors -Wno-exit-time-destructors
-Wno-exit-time-destructors -std=c++23 -Wno-trigraphs -fno-exceptions -fno-rtti
-nostdinc++ -isystem../../third_party/libc++/src/include -isystem../
../third_party/libc++abi/src/include -fvisibility-inlines-hidden
-Wno-invalid-offsetof -Wenum-compare-conditional -Wno-nullability-completeness
-O2 -pipe -march=haswell -fstack-protector-strong -isystem /usr/local/include
-fno-strict-aliasing -march=haswell -isystem /usr/local/include -I/usr/loca
l/include/libepoll-shim
-I/var/ports.wrkroot/www/ungoogled-chromium/work/pulseaudio-16.1/src
-DPA_MAJOR=16 -fmodule-name="//skia:skcms_TransformSkx_Private" -c
../../third_party/skia/modules/skcms/src/skcms_TransformSkx.cc -o
obj/skia/skcms_TransformSkx/skcms_TransformSkx.o
In file included from
../../third_party/skia/modules/skcms/src/skcms_TransformSkx.cc:53:
../../third_party/skia/modules/skcms/src/Transform_inl.h:152:15: error:
always_inline function '_mm512_cvtph_ps' requires target feature 'avx512f', but
would be inlined into function 'F_from_Half' that is compiled without support
for 'avx512f'
152 | return (F)_mm512_cvtph_ps((__m256i)half);
| ^
../../third_party/skia/modules/skcms/src/Transform_inl.h:152:15: error: AVX
vector return of type '__m512' (vector of 16 'float' values) without 'avx512f'
enabled changes the ABI
../../third_party/skia/modules/skcms/src/Transform_inl.h:232:12: error:
always_inline function '_mm512_mask_floor_ps' requires target feature
'avx512f', but would be inlined into function 'floor_' that is compiled without
support for 'avx512f'
232 | return _mm512_mask_floor_ps(x, (__mmask16)-1, x);
| ^
../../third_party/skia/modules/skcms/src/Transform_inl.h:232:12: error: AVX
vector argument of type '__m512' (vector of 16 'float' values) without
'avx512f' enabled changes the ABI
../../third_party/skia/modules/skcms/src/Transform_inl.h:526:18: error:
'__builtin_ia32_gathersiv16si' needs target feature avx512f
526 | U32 v = (U32)_mm512_i32gather_epi32((__m512i)(3*ix), p4, 1);
| ^
/usr/local/llvm22/lib/clang/22/include/avx512fintrin.h:7337:13: note: expanded
from macro '_mm512_i32gather_epi32'
7337 |
((__m512i)__builtin_ia32_gathersiv16si((__v16si)_mm512_undefined_epi32(), \
| ^
In file included from
../../third_party/skia/modules/skcms/src/skcms_TransformSkx.cc:53:
../../third_party/skia/modules/skcms/src/Transform_inl.h:526:18: error:
always_inline function '_mm512_undefined_epi32' requires target feature
'avx512f', but would be inlined into function 'gather_24' that is compiled
without support for 'avx512f'
/usr/local/llvm22/lib/clang/22/include/avx512fintrin.h:7337:51: note: expanded
from macro '_mm512_i32gather_epi32'
7337 |
((__m512i)__builtin_ia32_gathersiv16si((__v16si)_mm512_undefined_epi32(), \
| ^
In file included from
../../third_party/skia/modules/skcms/src/skcms_TransformSkx.cc:53:
Please find attached a patch for 3 additional small port patches (files/):
Instead of unconditionally setting allow_avx512 = true (in
build/config/avx512.gni), set to false and conditionally re-enable if -march
(CPUTYPE) reflects AVX-512 support.
--
You are receiving this mail because:
You are the assignee for the bug.