[Webkit-unassigned] [Bug 281216] New: [musl] Missing roundevenf and roundeven Function Support on Non-glibc Platforms

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 10 04:04:14 PDT 2024


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

            Bug ID: 281216
           Summary: [musl]  Missing roundevenf and roundeven Function
                    Support on Non-glibc Platforms
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: psaavedra at igalia.com

While building WPEWebKit 2.46.1 for musl-based systems, compilation errors occur due to the absence of the `roundevenf` and `roundeven` functions. These functions are not available on platforms that do not use glibc, including musl [1]. This issue impacts platforms such as musl-based distributions, Android, FreeBSD, and others that do not provide the `roundeven` and the `roundevenf` functions, as it is not part of the standard C libraries in these environments. 

The build failure occurs in the `MathCommon.cpp` file in JavaScriptCore, specifically at:

```
2024-10-10T07:04:15.8564050Z | /home/bot/yocto-webkit-scarthgap/builds/raspberrypi3-mesa-wpe-musl/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-musleabi/wpewebkit/2.46.1/wpewebkit-2.46.1/Source/JavaScriptCore/runtime/MathCommon.cpp:638:83: error: 'roundevenf' was not declared in this scope; did you mean 'roundf'?
2024-10-10T07:04:15.8566368Z |   638 | JSC_DEFINE_NOEXCEPT_JIT_OPERATION(f32_roundeven, float, (float operand)) { return roundevenf(operand); }
2024-10-10T07:04:15.8567237Z |       |                                                                                   ^~~~~~~~~~
2024-10-10T07:04:15.8567826Z |       |                                                                                   roundf
2024-10-10T07:04:15.8570085Z | /home/bot/yocto-webkit-scarthgap/builds/raspberrypi3-mesa-wpe-musl/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-musleabi/wpewebkit/2.46.1/wpewebkit-2.46.1/Source/JavaScriptCore/runtime/MathCommon.cpp: In function 'double JSC::Math::f64_roundeven(double)':
2024-10-10T07:04:15.8573709Z | /home/bot/yocto-webkit-scarthgap/builds/raspberrypi3-mesa-wpe-musl/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-musleabi/wpewebkit/2.46.1/wpewebkit-2.46.1/Source/JavaScriptCore/runtime/MathCommon.cpp:639:85: error: 'roundeven' was not declared in this scope; did you mean 'f64_roundeven'?
2024-10-10T07:04:15.8576102Z |   639 | JSC_DEFINE_NOEXCEPT_JIT_OPERATION(f64_roundeven, double, (double operand)) { return roundeven(operand); }
2024-10-10T07:04:15.8576970Z |       |                                                                                     ^~~~~~~~~
2024-10-10T07:04:15.8577574Z |       |                                                                                     f64_roundeven
```

This issue blocks the compilation of WPEWebKit for musl and requires either a fallback to `roundf` and similar alternatives or a platform-specific implementation of the `roundevenf` and `roundeven` functions for non-glibc platforms.


[1] https://www.gnu.org/software/gnulib/manual/gnulib.html

-- 
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/20241010/96fb8829/attachment-0001.htm>


More information about the webkit-unassigned mailing list