WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
207757
[GStreamer] Build failure with Clang/libc++ due to missing WallTime→float for std::isnan()
https://bugs.webkit.org/show_bug.cgi?id=207757
Summary
[GStreamer] Build failure with Clang/libc++ due to missing WallTime→float for...
Adrian Perez
Reported
2020-02-14 04:44:38 PST
WPE WebKit 2.27.90 (and most surely the GTK port as well) fail to build with Clang when using libc++ (instead of GNU stdlibc++). Configuration command: CC=clang CXX=clang++ \ LDFLAGS='-stdlib=libc++ -fuse-ld=lld' \ CXXLAGS='-stdlib=libc++' \ cmake -DPORT=WPE -DUSE_LD_GOLD=OFF -DUSE_LD_LLD=ON <...> Build error: ../Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:1155:10: error: no matching function for call to 'isnan' if (!isnan(priv->downloadStartTime)) { ^~~~~ /usr/bin/../include/c++/v1/math.h:535:1: note: candidate function not viable: no known conversion from 'WTF::WallTime' to 'float' for 1st argument isnan(float __lcpp_x) _NOEXCEPT { return __libcpp_isnan(__lcpp_x); } ^ /usr/bin/../include/c++/v1/math.h:539:1: note: candidate function not viable: no known conversion from 'WTF::WallTime' to 'double' for 1st argument isnan(double __lcpp_x) _NOEXCEPT { return __libcpp_isnan(__lcpp_x); } ^ /usr/bin/../include/c++/v1/math.h:543:1: note: candidate function not viable: no known conversion from 'WTF::WallTime' to 'long double' for 1st argument isnan(long double __lcpp_x) _NOEXCEPT { return __libcpp_isnan(__lcpp_x); } ^ /usr/bin/../include/c++/v1/math.h:521:1: note: candidate template ignored: requirement 'std::is_floating_point<WTF::WallTime>::value' was not satisfied [with _A1 = WTF::WallTime] isnan(_A1 __lcpp_x) _NOEXCEPT ^ /usr/bin/../include/c++/v1/math.h:529:1: note: candidate template ignored: requirement 'std::is_integral<WTF::WallTime>::value' was not satisfied [with _A1 = WTF::WallTime] isnan(_A1) _NOEXCEPT ^ 1 error generated.
Attachments
Patch
(2.10 KB, patch)
2020-02-15 05:16 PST
,
Adrian Perez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Adrian Perez
Comment 1
2020-02-15 05:13:01 PST
This happens in trunk as well. There are “std::isnan()” overloads defined for “WTF::Walltime”, but Clang is being a bit more strict than GCC here and not considering them when using a bare “isnan()“ call (without the namespace) because the overloaded version is inside the namespace, and there us no “using std::isnan;” (or equivalent) anywhere when non-unified builds are disabled. The fix is to add the “std::” namespace prefix to the function call =)
Adrian Perez
Comment 2
2020-02-15 05:16:42 PST
Created
attachment 390864
[details]
Patch
Adrian Perez
Comment 3
2020-02-15 14:20:38 PST
Comment on
attachment 390864
[details]
Patch Clearing flags on attachment: 390864 Committed
r256706
: <
https://trac.webkit.org/changeset/256706
>
Adrian Perez
Comment 4
2020-02-15 14:20:43 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 5
2020-02-15 14:21:17 PST
<
rdar://problem/59488736
>
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