Back to WxWidgets 3.0.2. Using the native wxWidgets of Ubuntu 16.04 x64.
Sorry but build fails again.
First i have to replace ‘isnan’ by ‘std::isnan’ in usr/include/wx-3.0/wx/math.h line 59.
- #define wxFinite(x) isfinite(x)
+ #define wxFinite(x) std::isfinite(x)
I in the source of Audacity also.
diff --git a/src/effects/Contrast.cpp b/src/effects/Contrast.cpp
index eb9e2cb..4a2a537 100644
--- a/src/effects/Contrast.cpp
+++ b/src/effects/Contrast.cpp
@@ -421,7 +421,7 @@ void ContrastDialog::results()
// TODO: We check for absolute silence here, so should not need to check again later in ::results()
if (mForegroundIsDefined) {
mForegroundRMSText->SetName(_("Measured foreground level")); // Read by screen-readers
- if(isinf(- foregrounddB))
+ if(std::isinf(- foregrounddB))
mForegroundRMSText->ChangeValue(wxString::Format(_("zero")));
else
mForegroundRMSText->ChangeValue(wxString::Format(_("%.1f dB"), foregrounddB)); // i18n-hint: short form of 'decibels'
@@ -433,7 +433,7 @@ void ContrastDialog::results()
if (mBackgroundIsDefined) {
mBackgroundRMSText->SetName(_("Measured background level"));
- if(isinf(- backgrounddB))
+ if(std::isinf(- backgrounddB))
mBackgroundRMSText->ChangeValue(wxString::Format(_("zero")));
else
mBackgroundRMSText->ChangeValue(wxString::Format(_("%.1f dB"), backgrounddB));
diff --git a/src/effects/lv2/LV2Effect.cpp b/src/effects/lv2/LV2Effect.cpp
index 32ff21a..5037cd8 100644
--- a/src/effects/lv2/LV2Effect.cpp
+++ b/src/effects/lv2/LV2Effect.cpp
@@ -562,13 +562,13 @@ bool LV2Effect::SetHost(EffectHostInterface *host)
lilv_scale_points_free(points);
// Collect the value and range info
- ctrl.mHasLo = !isnan(minimumVals[i]);
- ctrl.mHasHi = !isnan(maximumVals[i]);
+ ctrl.mHasLo = !std::isnan(minimumVals[i]);
+ ctrl.mHasHi = !std::isnan(maximumVals[i]);
ctrl.mMin = ctrl.mHasLo ? minimumVals[i] : 0.0;
ctrl.mMax = ctrl.mHasHi ? maximumVals[i] : 1.0;
ctrl.mLo = ctrl.mMin;
ctrl.mHi = ctrl.mMax;
- ctrl.mDef = !isnan(defaultValues[i]) ?
+ ctrl.mDef = !std::isnan(defaultValues[i]) ?
defaultValues[i] :
ctrl.mHasLo ?
ctrl.mLo :
diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp
index 91a0560..c4001cf 100644
--- a/src/effects/nyquist/Nyquist.cpp
+++ b/src/effects/nyquist/Nyquist.cpp
@@ -683,7 +683,7 @@ bool NyquistEffect::Process()
// with very small values, bandwidth calculation may be inf.
// (Observed on Linux)
double bw = log(mF1 / mF0) / log(2.0);
- if (!isinf(bw)) {
+ if (!std::isinf(bw)) {
bandwidth.Printf(wxT("(float %s)"), Internat::ToString(bw).c_str());
}
}
diff --git a/src/widgets/numformatter.cpp b/src/widgets/numformatter.cpp
index dfbf191..87c2412 100644
--- a/src/widgets/numformatter.cpp
+++ b/src/widgets/numformatter.cpp
@@ -134,11 +134,11 @@ wxString NumberFormatter::ToString(double val, int precision, int style)
format.Printf(wxT("%%.%df"), precision);
}
- if (isnan(val))
+ if (std::isnan(val))
{
return _("NaN");
}
- if (isinf(val))
+ if (std::isinf(val))
{
return _("-Infinity");
}
The last succesfull build is commit:
https://github.com/audacity/audacity/commit/54ac17c086f85184790ad2597cdf5b449c618f5c
So far so good,
But with next commit:
https://github.com/audacity/audacity/commit/1722ee9e323ebb44f193bc1b2cd81599a0d50ba2
Gives this error at the very end of the build:
audacity-VSTControlGTK.o -pthread /usr/lib/x86_64-linux-gnu/libexpat.so ../lib-src/FileDialog/.libs/libFileDialog.a -lportaudio -lm ../lib-src/portmixer/src/.libs/libportmixer.a -lsndfile -lsoxr ../lib-src/lib-widget-extra/.libs/libwidgetextra.a -L/usr/lib/x86_64-linux-gnu -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0 -lFLAC++ -lFLAC /usr/lib/libid3tag.so -lz -lmad ../lib-src/libnyquist/libnyquist.a -lSoundTouch -ltwolame /usr/lib/x86_64-linux-gnu/libvorbisenc.so /usr/lib/x86_64-linux-gnu/libvorbisfile.so /usr/lib/x86_64-linux-gnu/libvorbis.so -logg -llilv-0 -lsratom-0 -lsord-0 -lserd-0 -lsuil-0 -lportSMF ../lib-src/sbsms/src/.libs/libsbsms.a -lvamp-hostsdk -ldl -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig /usr/lib/x86_64-linux-gnu/libfreetype.so -lasound -ljack -lpthread -lrt -pthread
audacity-Project.o: In function `std::__make_unique_result<PlayIndicatorOverlay>::scalar_case std::make_unique<PlayIndicatorOverlay, AudacityProject*>(AudacityProject*&&)':
/home/hains/audacity/src/commands/../MemoryX.h:395: undefined reference to `PlayIndicatorOverlay::PlayIndicatorOverlay(AudacityProject*)'
audacity-Project.o: In function `std::__make_unique_result<EditCursorOverlay>::scalar_case std::make_unique<EditCursorOverlay, AudacityProject*>(AudacityProject*&&)':
/home/hains/audacity/src/commands/../MemoryX.h:395: undefined reference to `EditCursorOverlay::EditCursorOverlay(AudacityProject*)'
audacity-Project.o: In function `std::__make_unique_result<ScrubbingOverlay>::scalar_case std::make_unique<ScrubbingOverlay, AudacityProject*>(AudacityProject*&&)':
/home/hains/audacity/src/commands/../MemoryX.h:395: undefined reference to `ScrubbingOverlay::ScrubbingOverlay(AudacityProject*)'
audacity-TrackPanel.o: In function `TrackPanel::DrawOverlays(bool)':
/home/hains/audacity/src/TrackPanel.cpp:7669: undefined reference to `TrackPanelOverlay::GetRectangle(wxSize)'
collect2: error: ld returned 1 exit status
Makefile:1951: recipe for target 'audacity' failed
make[2]: *** [audacity] Error 1
make[2]: Leaving directory '/home/hains/audacity/src'
Makefile:1346: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/hains/audacity/src'
Makefile:793: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
To figure out what the problem is, i remove as test the smart pointers and rename GetRectangle(size)) to DoGetRectangle(size))
diff --git a/src/Project.cpp b/src/Project.cpp
index fab8eec..e76a486 100644
--- a/src/Project.cpp
+++ b/src/Project.cpp
@@ -928,15 +928,12 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
this,
mRuler);
- mIndicatorOverlay = std::make_unique<PlayIndicatorOverlay>(this);
-
- mCursorOverlay = std::make_unique<EditCursorOverlay>(this);
-
+
#ifdef EXPERIMENTAL_SCRUBBING_BASIC
// This must follow construction of *mIndicatorOverlay, because it must
// attach its timer event handler later (so that its handler is invoked
// earlier)
- mScrubOverlay = std::make_unique<ScrubbingOverlay>(this);
+
#else
mScrubOverlay = NULL;
#endif
diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp
index d56a6f4..873c9ab 100644
--- a/src/TrackPanel.cpp
+++ b/src/TrackPanel.cpp
@@ -7666,7 +7666,7 @@ void TrackPanel::DrawOverlays(bool repaint)
// Find out the rectangles and outdatedness for each overlay
wxSize size(mBackingDC.GetSize());
for (const auto pOverlay : mOverlays)
- pairs.push_back(pOverlay->GetRectangle(size));
+ pairs.push_back(pOverlay->DoGetRectangle(size));
// See what requires redrawing. If repainting, all.
// If not, then whatever is outdated, and whatever will be damaged by
Now build succesfull but Audacity does not execute of course (core dump).
Build with GIT master HEAD is only getting worser.