Verified that the 14.08.2 release fixes the compile. (Thanks Tobias) The upgrade is quick because the patches still all apply without modification. I'm including a debdiff of what I did to test this in case it saves some maintainer time.
-- Chris, KB2IQN -- Chris Knadle chris.kna...@coredump.us
diffstat for svxlink-14.08.1 svxlink-14.08.2 debian/changelog | 8 ++++++++ src/CMakeLists.txt | 1 + src/cmake/Modules/FindSIGC2.cmake | 5 +++++ src/misc/CMakeLists.txt | 2 +- src/misc/CppStdCompat.h | 10 ++++++++++ src/svxlink/ChangeLog | 19 +++++++++++++++++++ src/svxlink/modules/echolink/QsoImpl.cpp | 11 ++++++----- src/svxlink/svxlink/LinkManager.cpp | 22 ++++++++++++++++------ src/svxlink/svxlink/LinkManager.h | 3 ++- src/svxlink/svxlink/svxlink.cpp | 4 ++-- src/svxlink/trx/Emphasis.h | 17 +++++++++-------- src/svxlink/trx/SigLevDetTone.h | 9 +++++---- src/svxlink/trx/ToneDetector.h | 13 +++++++------ src/svxlink/trx/Voter.h | 27 ++++++++++++++------------- src/versions | 6 +++--- 15 files changed, 108 insertions(+), 49 deletions(-) diff -Nru svxlink-14.08.1/debian/changelog svxlink-14.08.2/debian/changelog --- svxlink-14.08.1/debian/changelog 2015-07-28 14:05:12.000000000 -0400 +++ svxlink-14.08.2/debian/changelog 2015-11-03 00:27:13.000000000 -0500 @@ -1,3 +1,11 @@ +svxlink (14.08.2-0.1) unstable; urgency=medium + + * Non-maintainer upload. + * New upstream release from 2015-11-02 + Fixes failure to compile with C++11 (Closes: #801265) + + -- Christopher Knadle <chris.kna...@coredump.us> Tue, 03 Nov 2015 00:25:45 -0500 + svxlink (14.08.1-1) unstable; urgency=medium * New upstream version diff -Nru svxlink-14.08.1/src/cmake/Modules/FindSIGC2.cmake svxlink-14.08.2/src/cmake/Modules/FindSIGC2.cmake --- svxlink-14.08.1/src/cmake/Modules/FindSIGC2.cmake 2015-04-30 04:36:03.000000000 -0400 +++ svxlink-14.08.2/src/cmake/Modules/FindSIGC2.cmake 2015-11-02 16:59:27.000000000 -0500 @@ -4,11 +4,16 @@ # SIGC2_INCLUDE_DIRS - The libsigc++-2 include directories # SIGC2_LIBRARIES - The libraries needed to use libsigc++-2 # SIGC2_DEFINITIONS - Compiler switches required for using libsigc++-2 +# SIGC_CXX_FLAGS - Required C++ specific compiler switches find_package(PkgConfig) pkg_check_modules(PC_SIGC2 sigc++-2.0) set(SIGC2_DEFINITIONS ${PC_SIGC2_CFLAGS_OTHER}) +if(${PC_SIGC2_VERSION} VERSION_GREATER "2.5.0") + set(SIGC2_CXX_FLAGS "--std=c++11") +endif() + find_path(SIGC2_CONFIG_INCLUDE_DIR sigc++config.h HINTS ${PC_SIGC2_INCLUDEDIR} ${PC_SIGC2_INCLUDE_DIRS} ) diff -Nru svxlink-14.08.1/src/CMakeLists.txt svxlink-14.08.2/src/CMakeLists.txt --- svxlink-14.08.1/src/CMakeLists.txt 2015-04-30 04:36:03.000000000 -0400 +++ svxlink-14.08.2/src/CMakeLists.txt 2015-11-02 16:59:27.000000000 -0500 @@ -305,6 +305,7 @@ find_package(SIGC2 REQUIRED) include_directories(${SIGC2_INCLUDE_DIRS}) add_definitions(${SIGC2_DEFINITIONS}) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SIGC2_CXX_FLAGS}") set(LIBS ${LIBS} ${SIGC2_LIBRARIES}) # Find the chown utility diff -Nru svxlink-14.08.1/src/misc/CMakeLists.txt svxlink-14.08.2/src/misc/CMakeLists.txt --- svxlink-14.08.1/src/misc/CMakeLists.txt 2015-04-30 04:36:03.000000000 -0400 +++ svxlink-14.08.2/src/misc/CMakeLists.txt 2015-11-02 16:59:27.000000000 -0500 @@ -1,4 +1,4 @@ -set(EXPINC common.h) +set(EXPINC common.h CppStdCompat.h) # Copy exported include files to the global include directory foreach(incfile ${EXPINC}) diff -Nru svxlink-14.08.1/src/misc/CppStdCompat.h svxlink-14.08.2/src/misc/CppStdCompat.h --- svxlink-14.08.1/src/misc/CppStdCompat.h 1969-12-31 19:00:00.000000000 -0500 +++ svxlink-14.08.2/src/misc/CppStdCompat.h 2015-11-02 16:59:27.000000000 -0500 @@ -0,0 +1,10 @@ +#ifndef CPP_STD_COMPAT_INCLUDED +#define CPP_STD_COMPAT_INCLUDED + +#if __cplusplus >= 201102L + #define CONSTEXPR constexpr +#else + #define CONSTEXPR const +#endif + +#endif /* CPP_STD_COMPAT_INCLUDED */ diff -Nru svxlink-14.08.1/src/svxlink/ChangeLog svxlink-14.08.2/src/svxlink/ChangeLog --- svxlink-14.08.1/src/svxlink/ChangeLog 2015-04-30 04:36:03.000000000 -0400 +++ svxlink-14.08.2/src/svxlink/ChangeLog 2015-11-02 16:59:27.000000000 -0500 @@ -1,3 +1,22 @@ + 1.4.3 -- 02 nov 2015 +---------------------- + +* SvxLink now compile in C++11 mode with GCC and other compilers that + understand the -std=c++11 compiler switch. The compiler switch will + automatically be turned on if a version of libsigc++ greater than 2.5.0 is + detected since those versions require C++11 to be enabled. + + + + 1.4.2 -- 06 jun 2015 +---------------------- + +* Bugfix: The logic linking would cause a crash under some circumstances. + For example SvxLink would crash on startup if link TIMEOUT was set and the + startup Tcl function was modified to play an audio clip. + + + 1.4.1 -- 30 apr 2015 ---------------------- diff -Nru svxlink-14.08.1/src/svxlink/modules/echolink/QsoImpl.cpp svxlink-14.08.2/src/svxlink/modules/echolink/QsoImpl.cpp --- svxlink-14.08.1/src/svxlink/modules/echolink/QsoImpl.cpp 2015-04-30 04:36:03.000000000 -0400 +++ svxlink-14.08.2/src/svxlink/modules/echolink/QsoImpl.cpp 2015-11-02 16:59:27.000000000 -0500 @@ -222,11 +222,11 @@ event_handler = new EventHandler(event_handler_script, 0); event_handler->playFile.connect( - bind(mem_fun(*msg_handler, &MsgHandler::playFile), false)); + sigc::bind(mem_fun(*msg_handler, &MsgHandler::playFile), false)); event_handler->playSilence.connect( - bind(mem_fun(*msg_handler, &MsgHandler::playSilence), false)); + sigc::bind(mem_fun(*msg_handler, &MsgHandler::playSilence), false)); event_handler->playTone.connect( - bind(mem_fun(*msg_handler, &MsgHandler::playTone), false)); + sigc::bind(mem_fun(*msg_handler, &MsgHandler::playTone), false)); // Workaround: Need to set the ID config variable and "logic_name" // variable to load the TCL script. @@ -246,8 +246,9 @@ m_qso.infoMsgReceived.connect(mem_fun(*this, &QsoImpl::onInfoMsgReceived)); m_qso.chatMsgReceived.connect(mem_fun(*this, &QsoImpl::onChatMsgReceived)); m_qso.stateChange.connect(mem_fun(*this, &QsoImpl::onStateChange)); - m_qso.isReceiving.connect(bind(isReceiving.make_slot(), this)); - m_qso.audioReceivedRaw.connect(bind(audioReceivedRaw.make_slot(), this)); + m_qso.isReceiving.connect(sigc::bind(isReceiving.make_slot(), this)); + m_qso.audioReceivedRaw.connect( + sigc::bind(audioReceivedRaw.make_slot(), this)); prev_src = &m_qso; diff -Nru svxlink-14.08.1/src/svxlink/svxlink/LinkManager.cpp svxlink-14.08.2/src/svxlink/svxlink/LinkManager.cpp --- svxlink-14.08.1/src/svxlink/svxlink/LinkManager.cpp 2015-04-30 04:36:03.000000000 -0400 +++ svxlink-14.08.2/src/svxlink/svxlink/LinkManager.cpp 2015-11-02 16:59:27.000000000 -0500 @@ -218,9 +218,9 @@ { link.timeout_timer = new Timer(link.timeout); link.timeout_timer->setEnable(false); - link.timeout_timer->expired.connect( - bind(mem_fun(LinkManager::instance(), &LinkManager::linkTimeout), - &link)); + link.timeout_timer->expired.connect(sigc::bind( + mem_fun(LinkManager::instance(), &LinkManager::linkTimeout), + &link)); } // Automatically activate the link, if one (or more) logics @@ -301,7 +301,7 @@ // Keep track of the newly added logics idle state so that we can start // and stop timeout timers. logic_info.idle_state_changed_con = logic->idleStateChanged.connect( - bind(mem_fun(*this, &LinkManager::logicIdleStateChanged), logic)); + sigc::bind(mem_fun(*this, &LinkManager::logicIdleStateChanged), logic)); // Add the logic to the logic map logic_map[logic->name()] = logic_info; @@ -330,9 +330,12 @@ void LinkManager::deleteLogic(Logic *logic) { - // Verify that the logic has been previously added LogicMap::iterator lmit = logic_map.find(logic->name()); - assert(lmit != logic_map.end()); + if (lmit == logic_map.end()) + { + return; + } + LogicInfo &logic_info = (*lmit).second; assert(logic_info.logic == logic); assert(sources.find(logic->name()) != sources.end()); @@ -380,6 +383,8 @@ void LinkManager::allLogicsStarted(void) { + all_logics_started = true; + for (LinkMap::iterator it = links.begin(); it != links.end(); ++it) { Link &link = it->second; @@ -716,6 +721,11 @@ << endl; */ + if (!all_logics_started) + { + return; + } + // We need all linknames where the logic is included in vector<string> link_names = getLinkNames(logic->name()); diff -Nru svxlink-14.08.1/src/svxlink/svxlink/LinkManager.h svxlink-14.08.2/src/svxlink/svxlink/LinkManager.h --- svxlink-14.08.1/src/svxlink/svxlink/LinkManager.h 2015-04-30 04:36:03.000000000 -0400 +++ svxlink-14.08.2/src/svxlink/svxlink/LinkManager.h 2015-11-02 16:59:27.000000000 -0500 @@ -282,8 +282,9 @@ LogicConSet current_cons; SourceMap sources; SinkMap sinks; + bool all_logics_started; - LinkManager(void) {}; + LinkManager(void) : all_logics_started(false) {}; LinkManager(const LinkManager&); ~LinkManager(void) {}; diff -Nru svxlink-14.08.1/src/svxlink/svxlink/svxlink.cpp svxlink-14.08.2/src/svxlink/svxlink/svxlink.cpp --- svxlink-14.08.1/src/svxlink/svxlink/svxlink.cpp 2015-04-30 04:36:03.000000000 -0400 +++ svxlink-14.08.2/src/svxlink/svxlink/svxlink.cpp 2015-11-02 16:59:27.000000000 -0500 @@ -506,6 +506,8 @@ app.exec(); + LinkManager::deleteInstance(); + logfile_flush(); if (stdin_watch != 0) @@ -528,8 +530,6 @@ } logic_vec.clear(); - LinkManager::deleteInstance(); - if (logfd != -1) { close(logfd); diff -Nru svxlink-14.08.1/src/svxlink/trx/Emphasis.h svxlink-14.08.2/src/svxlink/trx/Emphasis.h --- svxlink-14.08.1/src/svxlink/trx/Emphasis.h 2015-04-30 04:36:03.000000000 -0400 +++ svxlink-14.08.2/src/svxlink/trx/Emphasis.h 2015-11-02 16:59:27.000000000 -0500 @@ -46,6 +46,7 @@ #include <AsyncAudioFilter.h> //#include <AsyncAudioProcessor.h> +#include <CppStdCompat.h> /**************************************************************************** @@ -178,16 +179,16 @@ protected: #if INTERNAL_SAMPLE_RATE == 16000 // 0dB gain, f1=300Hz, fs=16kHz - static const double b0 = 0.058555891443177958410881700501704472117; - static const double b1 = 0.052700302299058421340305358171463012695; - static const double a0 = 1.0; - static const double a1 = -0.88874380625776361330991903741960413754; + static CONSTEXPR double b0 = 0.058555891443177958410881700501704472117; + static CONSTEXPR double b1 = 0.052700302299058421340305358171463012695; + static CONSTEXPR double a0 = 1.0; + static CONSTEXPR double a1 = -0.88874380625776361330991903741960413754; #elif INTERNAL_SAMPLE_RATE == 8000 // 0dB gain, f1=300Hz, fs=8kHz - static const double b0 = 0.110940380645014949334559162252844544128 ; - static const double b1 = 0.099846342580711719416619587263994617388 ; - static const double a0 = 1.0; - static const double a1 = -0.789213276774273331248821250483160838485; + static CONSTEXPR double b0 = 0.110940380645014949334559162252844544128; + static CONSTEXPR double b1 = 0.099846342580711719416619587263994617388; + static CONSTEXPR double a0 = 1.0; + static CONSTEXPR double a1 = -0.789213276774273331248821250483160838485; #else #error "Only 16 and 8kHz sampling rate is supported by the pre- and de-emphasis filters." #endif diff -Nru svxlink-14.08.1/src/svxlink/trx/SigLevDetTone.h svxlink-14.08.2/src/svxlink/trx/SigLevDetTone.h --- svxlink-14.08.1/src/svxlink/trx/SigLevDetTone.h 2015-04-30 04:36:03.000000000 -0400 +++ svxlink-14.08.2/src/svxlink/trx/SigLevDetTone.h 2015-11-02 16:59:27.000000000 -0500 @@ -45,6 +45,7 @@ * ****************************************************************************/ +#include <CppStdCompat.h> /**************************************************************************** @@ -184,10 +185,10 @@ private: class HammingWindow; - static const float ALPHA = 0.1f; // Time constant for IIR filter - static const unsigned BLOCK_SIZE = 100; // 160Hz bandwidth, 6.25ms - static const float ENERGY_THRESH = 1.0e-6f; - static const float DET_THRESH = 0.7f; // Detection threshold + static CONSTEXPR float ALPHA = 0.1f; // IIR filter time constant + static CONSTEXPR unsigned BLOCK_SIZE = 100; // 160Hz bandwidth, 6.25ms + static CONSTEXPR float ENERGY_THRESH = 1.0e-6f; // Min tone energy + static CONSTEXPR float DET_THRESH = 0.7f; // Detection threshold const int sample_rate; std::vector<int> tone_siglev_map; diff -Nru svxlink-14.08.1/src/svxlink/trx/ToneDetector.h svxlink-14.08.2/src/svxlink/trx/ToneDetector.h --- svxlink-14.08.1/src/svxlink/trx/ToneDetector.h 2015-04-30 04:36:03.000000000 -0400 +++ svxlink-14.08.2/src/svxlink/trx/ToneDetector.h 2015-11-02 16:59:27.000000000 -0500 @@ -46,6 +46,7 @@ ****************************************************************************/ #include <AsyncAudioSink.h> +#include <CppStdCompat.h> /**************************************************************************** @@ -450,12 +451,12 @@ private: struct DetectorParams; - static const bool DEFAULT_USE_WINDOWING = true; - static const float DEFAULT_TONE_ENERGY_THRESH = 0.1f; - static const float DEFAULT_PEAK_THRESH = 10.0; - static const float DEFAULT_PHASE_MEAN_THRESH = 0.0f; - static const float DEFAULT_PHASE_VAR_THRESH = 0.0f; - static const int DEFAULT_STABLE_COUNT_THRESH = 3; + static CONSTEXPR bool DEFAULT_USE_WINDOWING = true; + static CONSTEXPR float DEFAULT_TONE_ENERGY_THRESH = 0.1f; + static CONSTEXPR float DEFAULT_PEAK_THRESH = 10.0; + static CONSTEXPR float DEFAULT_PHASE_MEAN_THRESH = 0.0f; + static CONSTEXPR float DEFAULT_PHASE_VAR_THRESH = 0.0f; + static CONSTEXPR int DEFAULT_STABLE_COUNT_THRESH = 3; float tone_fq; int samples_left; diff -Nru svxlink-14.08.1/src/svxlink/trx/Voter.h svxlink-14.08.2/src/svxlink/trx/Voter.h --- svxlink-14.08.1/src/svxlink/trx/Voter.h 2015-04-30 04:36:03.000000000 -0400 +++ svxlink-14.08.2/src/svxlink/trx/Voter.h 2015-11-02 16:59:27.000000000 -0500 @@ -45,6 +45,7 @@ ****************************************************************************/ #include <AsyncConfig.h> +#include <CppStdCompat.h> /**************************************************************************** @@ -184,19 +185,19 @@ protected: private: - static const float DEFAULT_HYSTERESIS = 1.5f; - static const unsigned DEFAULT_VOTING_DEALAY = 0; - static const unsigned DEFAULT_SQL_CLOSE_REVOTE_DELAY = 500; - static const unsigned DEFAULT_REVOTE_INTERVAL = 1000; - static const unsigned DEFAULT_RX_SWITCH_DELAY = 500; - - static const unsigned MAX_VOTING_DELAY = 5000; - static const unsigned MAX_BUFFER_LENGTH = MAX_VOTING_DELAY; - static const float MAX_HYSTERESIS = 2.0f; - static const unsigned MAX_SQL_CLOSE_REVOTE_DELAY = 3000; - static const unsigned MIN_REVOTE_INTERVAL = 100; - static const unsigned MAX_REVOTE_INTERVAL = 60000; - static const unsigned MAX_RX_SWITCH_DELAY = 3000; + static CONSTEXPR float DEFAULT_HYSTERESIS = 1.5f; + static CONSTEXPR unsigned DEFAULT_VOTING_DEALAY = 0; + static CONSTEXPR unsigned DEFAULT_SQL_CLOSE_REVOTE_DELAY = 500; + static CONSTEXPR unsigned DEFAULT_REVOTE_INTERVAL = 1000; + static CONSTEXPR unsigned DEFAULT_RX_SWITCH_DELAY = 500; + + static CONSTEXPR unsigned MAX_VOTING_DELAY = 5000; + static CONSTEXPR unsigned MAX_BUFFER_LENGTH = MAX_VOTING_DELAY; + static CONSTEXPR float MAX_HYSTERESIS = 2.0f; + static CONSTEXPR unsigned MAX_SQL_CLOSE_REVOTE_DELAY = 3000; + static CONSTEXPR unsigned MIN_REVOTE_INTERVAL = 100; + static CONSTEXPR unsigned MAX_REVOTE_INTERVAL = 60000; + static CONSTEXPR unsigned MAX_RX_SWITCH_DELAY = 3000; class SatRx; diff -Nru svxlink-14.08.1/src/versions svxlink-14.08.2/src/versions --- svxlink-14.08.1/src/versions 2015-04-30 04:36:03.000000000 -0400 +++ svxlink-14.08.2/src/versions 2015-11-02 16:59:27.000000000 -0500 @@ -11,7 +11,7 @@ LIBASYNC_RPM_RELEASE=1 # SvxLink versions -SVXLINK=1.4.1 +SVXLINK=1.4.3 SVXLINK_RPM_RELEASE=1 MODULE_HELP=1.0.0 MODULE_PARROT=1.1.0 @@ -24,10 +24,10 @@ MODULE_METARINFO=1.0.0 # Version for the RemoteTrx application -REMOTE_TRX=1.1.0 +REMOTE_TRX=1.1.1 REMOTE_TRX_RELEASE=1 # Version for the signal level calibration utility -SIGLEV_DET_CAL=1.0.3 +SIGLEV_DET_CAL=1.0.4 SIGLEV_DET_CAL_RELEASE=1
signature.asc
Description: OpenPGP digital signature