WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
281216
[musl] Missing roundevenf and roundeven Function Support on Non-glibc Platforms
https://bugs.webkit.org/show_bug.cgi?id=281216
Summary
[musl] Missing roundevenf and roundeven Function Support on Non-glibc Platforms
Pablo Saavedra
Reported
2024-10-10 04:04:14 PDT
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
Attachments
Add attachment
proposed patch, testcase, etc.
Pablo Saavedra
Comment 1
2024-10-10 04:14:26 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/34972
Angelos Oikonomopoulos
Comment 2
2024-10-10 05:37:20 PDT
Oops, thanks for fixing this!
EWS
Comment 3
2024-10-11 22:05:24 PDT
Committed
285058@main
(cbd68e2d4822): <
https://commits.webkit.org/285058@main
> Reviewed commits have been landed. Closing PR #34972 and removing active labels.
Radar WebKit Bug Importer
Comment 4
2024-10-11 22:06:16 PDT
<
rdar://problem/137791968
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug