Define wxIsNaN() as std::isnan() in C++11 mode
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
wxwidgets3.0 (Debian) |
Fix Released
|
Unknown
|
|||
wxwidgets3.0 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Audacity (git master) fails to build on Ubuntu 16.04 with g++ 5.3.1:
In file included from /usr/include/
BlockFile.cpp: In function ‘void ComputeMinMax25
/usr/include/
#define wxIsNaN(x) isnan(x)
BlockFile.
if (wxIsNaN(
^
/usr/include/
#define wxIsNaN(x) isnan(x)
BlockFile.
if (wxIsNaN(
^
In file included from /usr/include/
/usr/include/
isnan(_Tp __x)
^
make[3]: *** [audacity-
isnan() is not defined, but std::isnan() is defined. Thus use std::isnan() for all C++11 compilers, since isnan() is part of C++11. The fix was accepted upstream: https:/
[Test Case]
1) Create a git recipe in /tmp/bug-1581807.recipe with following content:
# git-build-recipe format 0.4 deb-version {debupstream}
lp:audacity f1909cb88e0fa4e
merge packaging lp:~audacity-team/audacity/+git/packaging daily-xenial
2) Build a audacity source package:
git-build-recipe --allow-
3) Build the source package on xenial (for example with sbuild):
sbuild -d xenial /tmpfs/
4) You will experience the build failure described above with the unpatched wxwidgets. The build will succeed with the wxwidget patch.
[Regression Potential]
The patch changes C preprocessor definition (and not the run-time). Thus it could break source builds that use wxwidgts as library.
description: | updated |
description: | updated |
tags: | added: patch |
Changed in wxwidgets3.0 (Debian): | |
status: | Unknown → Fix Committed |
Changed in wxwidgets3.0 (Debian): | |
status: | Fix Committed → Fix Released |
Attached wxwidgets3. 0_3.0.2+ dfsg-1. 3ubuntu0. 1.debdiff for SRU to xenial.