Summary: | [bmalloc][32-bits] Build error in libpas after r285853 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Pablo Saavedra <psaavedra> | ||||||
Component: | bmalloc | Assignee: | Pablo Saavedra <psaavedra> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | fpizlo, ggaren, mark.lam, saam, webkit-bug-importer, ysuzuki | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Other | ||||||||
OS: | Linux | ||||||||
Bug Depends on: | 230841 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
Pablo Saavedra
2022-01-19 12:22:17 PST
Created attachment 449507 [details]
patch
128-bit integer type is only available for 64-bit targets. In >=GCC 4.6you can use __SIZEOF_INT128__ to detect it. I just uploaded a functional patch that fix the build error by checking and falling back to an 64 bits long type the 128-bit is not available. Comment on attachment 449507 [details]
patch
libpas does not support 32bit environment. So the right fix is ensuring that all built libpas C files are guarded by LIBPAS_ENABLED so that we do not build this file.
Can you paste which file is including pas_utils.h?
I wonder if this is broken due to bug 230841 And I also wonder if this fixed this issue. https://bugs.webkit.org/show_bug.cgi?id=235275 (In reply to Yusuke Suzuki from comment #3) > Comment on attachment 449507 [details] > patch > > libpas does not support 32bit environment. So the right fix is ensuring that > all built libpas C files are guarded by LIBPAS_ENABLED so that we do not > build this file. > Can you paste which file is including pas_utils.h? The failure comes from here : ``` In file included from /workspace/sources/wpewebkit/Source/WebCore/platform/graphics/HEVCUtilities.cpp:38: /tmp/work/cortexa9t2hf-neon-imx-poky-linux-gnueabi/wpewebkit/trunk+https999-r0/wpewebkit-trunk+https999/bmalloc/Headers/bmalloc/pas_utils.h: In function 'bool pas_compare_and_swap_uintptr_weak(uintptr_t*, uintptr_t, uintptr_t)': /tmp/work/cortexa9t2hf-neon-imx-poky-linux-gnueabi/wpewebkit/trunk+https999-r0/wpewebkit-trunk+https999/bmalloc/Headers/bmalloc/pas_utils.h:557:45: warning: cast from 'uintptr_t*' {aka 'unsigned int*'} to 'uint64_t*' {aka 'long long unsigned int*'} increases required alignment of target type [-Wcast-align] 557 | return pas_compare_and_swap_uint64_weak((uint64_t*)ptr, (uint64_t)old_value, (uint64_t)new_value); | ^~~~~~~~~~~~~~ /tmp/work/cortexa9t2hf-neon-imx-poky-linux-gnueabi/wpewebkit/trunk+https999-r0/wpewebkit-trunk+https999/bmalloc/Headers/bmalloc/pas_utils.h: In function 'uintptr_t pas_compare_and_swap_uintptr_strong(uintptr_t*, uintptr_t, uintptr_t)': /tmp/work/cortexa9t2hf-neon-imx-poky-linux-gnueabi/wpewebkit/trunk+https999-r0/wpewebkit-trunk+https999/bmalloc/Headers/bmalloc/pas_utils.h:562:58: warning: cast from 'uintptr_t*' {aka 'unsigned int*'} to 'uint64_t*' {aka 'long long unsigned int*'} increases required alignment of target type [-Wcast-align] 562 | return (uintptr_t)pas_compare_and_swap_uint64_strong((uint64_t*)ptr, (uint64_t)old_value, (uint64_t)new_value); | ^~~~~~~~~~~~~~ /tmp/work/cortexa9t2hf-neon-imx-poky-linux-gnueabi/wpewebkit/trunk+https999-r0/wpewebkit-trunk+https999/bmalloc/Headers/bmalloc/pas_utils.h: At global scope: /tmp/work/cortexa9t2hf-neon-imx-poky-linux-gnueabi/wpewebkit/trunk+https999-r0/wpewebkit-trunk+https999/bmalloc/Headers/bmalloc/pas_utils.h:633:9: error: '__uint128_t' does not name a type; did you mean '__uint8_t'? 633 | typedef __uint128_t pas_pair; | ^~~~~~~~~~~ | __uint8_t ``` It took me time because the non unified-build was broken. A tentative patch it could be something like this: ``` --- a/Source/WebCore/platform/graphics/HEVCUtilities.cpp +++ b/Source/WebCore/platform/graphics/HEVCUtilities.cpp @@ -34,7 +34,7 @@ #include <wtf/SortedArrayMap.h> #include <wtf/text/StringToIntegerConversion.h> -#if __has_include(<bmalloc/pas_utils.h>) +#if LIBPAS_ENABLED #include <bmalloc/pas_utils.h> #endif @@ -42,7 +42,7 @@ namespace WebCore { static inline uint32_t reverseBits(uint32_t value) { -#if __has_include(<bmalloc/pas_utils.h>) +#if LIBPAS_ENABLED return pas_reverse(value); #else // From pas_reverse(): ``` Created attachment 449565 [details]
patch
(In reply to Yusuke Suzuki from comment #5) > And I also wonder if this fixed this issue. > https://bugs.webkit.org/show_bug.cgi?id=235275 Yes, based on the previous comment that change should be fix the issue. (In reply to Pablo Saavedra from comment #8) > (In reply to Yusuke Suzuki from comment #5) > > And I also wonder if this fixed this issue. > > https://bugs.webkit.org/show_bug.cgi?id=235275 > > Yes, based on the previous comment that change should be fix the issue. I will test it in local just for a double-check. Fixed. Thanks for your help ysuzuki. |