[Webkit-unassigned] [Bug 235372] New: [bmalloc][32-bits] Build error in libpas after r285853

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 19 12:22:17 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=235372

            Bug ID: 235372
           Summary: [bmalloc][32-bits] Build error in libpas after r285853
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: bmalloc
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: psaavedra at igalia.com
                CC: ggaren at apple.com

Getting this error during compiling WPE/WebKit for an 32-bits target (ARM32)


```
tmp/work/cortexa9t2hf-neon-imx-poky-linux-gnueabi/wpewebkit/trunk+httpsAUTOINC+f8506f6a3b-r0/build/bmalloc/Headers/bmalloc/pas_utils.h: At global scope:
tmp/work/cortexa9t2hf-neon-imx-poky-linux-gnueabi/wpewebkit/trunk+httpsAUTOINC+f8506f6a3b-r0/build/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
tmp/work/cortexa9t2hf-neon-imx-poky-linux-gnueabi/wpewebkit/trunk+httpsAUTOINC+f8506f6a3b-r0/build/bmalloc/Headers/bmalloc/pas_utils.h:635:15: error: 'pas_pair' does not name a type
```


BENABLE_LIBPAS = 0

The error can be related with the changes done in https://trac.webkit.org/changeset/285853/webkit. In particular, with those associated to the point 8:


commit cc83e6240649bfe828f932d1d7fa96f090d706b0
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date:   Tue Nov 16 07:02:45 2021 +0000

    [libpas] Build and enable libpas on 64bit JSCOnly
    https://bugs.webkit.org/show_bug.cgi?id=233097

    Reviewed by Filip Pizlo.

    This patch makes libpas built on 64bit Linux. And now enabling it on JSCOnly port.
    libpas is built in C and tailored to the current clang. It made building libpas on
    GCC hard since GCC is stricter on C languages.

    1. C does not handle `const` variables as constants. So libpas's config is not strictly constant
       in the C spec, and GCC actually rejects it. To make it built correctly, we need to build them
       in C++. In this patch, when building libpas via CMake, we build some libpas C files as C++.
    2. GCC C++ does not allow designated initializer for array. We work-around this problem by adding
       cpp_initialization_t constexpr constructors only when building these headers in C++ compiler.
    3. Atomic operations are using clang extension, so they cannot be built with GCC. This patch adds
       GCC version of these implementations.
    4. Add PAS_OS(DARWIN) ifdefs for Darwin specific code (e.g. malloc handling).
    5. Add explicit cast / PAS_UNUSED_PARAM since GCC emits warnings
    6. Use (unsigned long long) explicit cast for printing uint64_t via `%llx` / `%llu` since uint64_t
       definition is `unsigned long int` in GCC (while clang's one is `unsigned long long`).
    7. Reorder designated initializer for structures since not following to the definition ordering
       becomes compile error in GCC.
[THIS]    8. Use __uint128_t for pas_pair in GCC to avoid compile error.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220119/edc7bd56/attachment.htm>


More information about the webkit-unassigned mailing list