[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#957289: gnss-sdr: ftbfs with GCC-10



control: tags -1 fixed-upstream

The new release is out, and might be fixing also this issue...

I tried a build and resulted in
https://github.com/gnss-sdr/gnss-sdr/issues/414

but this looks like more a gnuradio issue, not sure who is to blame...
(even boost might be faulty)


G.

On Fri, 17 Apr 2020 11:01:35 +0000 Matthias Klose <doko@debian.org> wrote:
> Package: src:gnss-sdr
> Version: 0.0.11-2
> Severity: normal
> Tags: sid bullseye
> User: debian-gcc@lists.debian.org
> Usertags: ftbfs-gcc-10
> 
> Please keep this issue open in the bug tracker for the package it
> was filed for.  If a fix in another package is required, please
> file a bug for the other package (or clone), and add a block in this
> package. Please keep the issue open until the package can be built in
> a follow-up test rebuild.
> 
> The package fails to build in a test rebuild on at least amd64 with
> gcc-10/g++-10, but succeeds to build with gcc-9/g++-9. The
> severity of this report will be raised before the bullseye release,
> so nothing has to be done for the buster release.
> 
> The full build log can be found at:
> http://people.debian.org/~doko/logs/gcc10-20200225/gnss-sdr_0.0.11-2_unstable_gcc10.log
> The last lines of the build log are at the end of this report.
> 
> To build with GCC 10, either set CC=gcc-10 CXX=g++-10 explicitly,
> or install the gcc, g++, gfortran, ... packages from experimental.
> 
>   apt-get -t=experimental install g++ 
> 
> Common build failures are new warnings resulting in build failures with
> -Werror turned on, or new/dropped symbols in Debian symbols files.
> For other C/C++ related build failures see the porting guide at
> http://gcc.gnu.org/gcc-10/porting_to.html
> 
> [...]
>                  from /<<PKGBUILDDIR>>/src/algorithms/signal_source/adapters/osmosdr_signal_source.cc:32:
> /usr/include/boost/format/alt_sstream_impl.hpp: In instantiation of ‘boost::io::basic_altstringbuf<Ch, Tr, Alloc>::int_type boost::io::basic_altstringbuf<Ch, Tr, Alloc>::overflow(boost::io::basic_altstringbuf<Ch, Tr, Alloc>::int_type) [with Ch = char; Tr = std::char_traits<char>; Alloc = std::allocator<char>; boost::io::basic_altstringbuf<Ch, Tr, Alloc>::int_type = int]’:
> /usr/include/boost/format/alt_sstream_impl.hpp:227:9:   required from here
> /usr/include/boost/format/alt_sstream_impl.hpp:261:45: error: no matching function for call to ‘std::allocator<char>::allocate(std::size_t&, char*)’
>   261 |                     newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);
>       |                              ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> In file included from /usr/include/c++/10/string:41,
>                  from /usr/include/c++/10/stdexcept:39,
>                  from /usr/include/c++/10/system_error:41,
>                  from /usr/include/c++/10/bits/std_mutex.h:39,
>                  from /usr/include/c++/10/condition_variable:40,
>                  from /<<PKGBUILDDIR>>/src/core/receiver/concurrent_queue.h:35,
>                  from /<<PKGBUILDDIR>>/src/algorithms/signal_source/adapters/osmosdr_signal_source.h:36,
>                  from /<<PKGBUILDDIR>>/src/algorithms/signal_source/adapters/osmosdr_signal_source.cc:32:
> /usr/include/c++/10/bits/allocator.h:171:7: note: candidate: ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = char; std::size_t = long unsigned int]’
>   171 |       allocate(size_t __n)
>       |       ^~~~~~~~
> /usr/include/c++/10/bits/allocator.h:171:7: note:   candidate expects 1 argument, 2 provided
> make[3]: *** [src/algorithms/signal_source/adapters/CMakeFiles/signal_source_adapters.dir/build.make:170: src/algorithms/signal_source/adapters/CMakeFiles/signal_source_adapters.dir/osmosdr_signal_source.cc.o] Error 1
> make[3]: *** Waiting for unfinished jobs....
> [ 95%] Building CXX object src/algorithms/acquisition/adapters/CMakeFiles/acquisition_adapters.dir/beidou_b3i_pcps_acquisition.cc.o
> cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src/algorithms/acquisition/adapters && /usr/bin/c++  -DGNSSSDR_INSTALL_DIR=\"/usr\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -I/<<PKGBUILDDIR>>/src/core/interfaces -I/<<PKGBUILDDIR>>/src/algorithms/libs/gsl/include -I/<<PKGBUILDDIR>>/src/algorithms/libs -I/<<PKGBUILDDIR>>/src/algorithms/acquisition/gnuradio_blocks -I/<<PKGBUILDDIR>>/src/algorithms/libs/opencl -I/<<PKGBUILDDIR>>/src/algorithms/acquisition/libs -I/<<PKGBUILDDIR>>/src/core/receiver -I/<<PKGBUILDDIR>>/src/algorithms/channel/libs -I/<<PKGBUILDDIR>>/src/core/system_parameters -isystem /usr/include/glog -isystem /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/volk_gnsssdr_module/build/include -isystem /<<PKGBUILDDIR>>/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/include  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -fvisibility-inlines-hidden   -Wall -Wextra -std=c++2a -o CMakeFiles/acquisition_adapters.dir/beidou_b3i_pcps_acquisition.cc.o -c /<<PKGBUILDDIR>>/src/algorithms/acquisition/adapters/beidou_b3i_pcps_acquisition.cc
> [ 95%] Building CXX object src/algorithms/acquisition/adapters/CMakeFiles/acquisition_adapters.dir/galileo_e1_pcps_8ms_ambiguous_acquisition.cc.o
> cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src/algorithms/acquisition/adapters && /usr/bin/c++  -DGNSSSDR_INSTALL_DIR=\"/usr\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -I/<<PKGBUILDDIR>>/src/core/interfaces -I/<<PKGBUILDDIR>>/src/algorithms/libs/gsl/include -I/<<PKGBUILDDIR>>/src/algorithms/libs -I/<<PKGBUILDDIR>>/src/algorithms/acquisition/gnuradio_blocks -I/<<PKGBUILDDIR>>/src/algorithms/libs/opencl -I/<<PKGBUILDDIR>>/src/algorithms/acquisition/libs -I/<<PKGBUILDDIR>>/src/core/receiver -I/<<PKGBUILDDIR>>/src/algorithms/channel/libs -I/<<PKGBUILDDIR>>/src/core/system_parameters -isystem /usr/include/glog -isystem /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/volk_gnsssdr_module/build/include -isystem /<<PKGBUILDDIR>>/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/include  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -fvisibility-inlines-hidden   -Wall -Wextra -std=c++2a -o CMakeFiles/acquisition_adapters.dir/galileo_e1_pcps_8ms_ambiguous_acquisition.cc.o -c /<<PKGBUILDDIR>>/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.cc
> [ 95%] Building CXX object src/algorithms/acquisition/adapters/CMakeFiles/acquisition_adapters.dir/galileo_e1_pcps_ambiguous_acquisition.cc.o
> cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/src/algorithms/acquisition/adapters && /usr/bin/c++  -DGNSSSDR_INSTALL_DIR=\"/usr\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -I/<<PKGBUILDDIR>>/src/core/interfaces -I/<<PKGBUILDDIR>>/src/algorithms/libs/gsl/include -I/<<PKGBUILDDIR>>/src/algorithms/libs -I/<<PKGBUILDDIR>>/src/algorithms/acquisition/gnuradio_blocks -I/<<PKGBUILDDIR>>/src/algorithms/libs/opencl -I/<<PKGBUILDDIR>>/src/algorithms/acquisition/libs -I/<<PKGBUILDDIR>>/src/core/receiver -I/<<PKGBUILDDIR>>/src/algorithms/channel/libs -I/<<PKGBUILDDIR>>/src/core/system_parameters -isystem /usr/include/glog -isystem /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/volk_gnsssdr_module/build/include -isystem /<<PKGBUILDDIR>>/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/include  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fvisibility=hidden -fvisibility-inlines-hidden   -Wall -Wextra -std=c++2a -o CMakeFiles/acquisition_adapters.dir/galileo_e1_pcps_ambiguous_acquisition.cc.o -c /<<PKGBUILDDIR>>/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc
> make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
diff -Nru gnss-sdr-0.0.12/debian/changelog gnss-sdr-0.0.12/debian/changelog
--- gnss-sdr-0.0.12/debian/changelog	2020-03-12 20:10:59.000000000 +0100
+++ gnss-sdr-0.0.12/debian/changelog	2020-07-29 11:11:13.000000000 +0200
@@ -1,3 +1,11 @@
+gnss-sdr (0.0.12-1.1) unstable; urgency=medium
+
+  * debian/patches/76cce022ac51917242e5af905c2118669bec017e.patch:
+    - cherry-pick and rebase upstream fix for gcc-10 build failure (Closes:
+      #957289)
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Wed, 29 Jul 2020 11:11:13 +0200
+
 gnss-sdr (0.0.12-1) unstable; urgency=medium
 
   * First release of upstream version 0.0.12
diff -Nru gnss-sdr-0.0.12/debian/patches/76cce022ac51917242e5af905c2118669bec017e.patch gnss-sdr-0.0.12/debian/patches/76cce022ac51917242e5af905c2118669bec017e.patch
--- gnss-sdr-0.0.12/debian/patches/76cce022ac51917242e5af905c2118669bec017e.patch	1970-01-01 01:00:00.000000000 +0100
+++ gnss-sdr-0.0.12/debian/patches/76cce022ac51917242e5af905c2118669bec017e.patch	2020-07-29 11:11:13.000000000 +0200
@@ -0,0 +1,79 @@
+From 76cce022ac51917242e5af905c2118669bec017e Mon Sep 17 00:00:00 2001
+From: Carles Fernandez <carles.fernandez@gmail.com>
+Date: Mon, 27 Jul 2020 09:53:01 +0200
+Subject: [PATCH] Fix building in Ubuntu 20.10
+
+---
+ .../adapters/osmosdr_signal_source.cc         | 29 +++++++++----------
+ 1 file changed, 14 insertions(+), 15 deletions(-)
+
+diff --git a/src/algorithms/signal_source/adapters/osmosdr_signal_source.cc b/src/algorithms/signal_source/adapters/osmosdr_signal_source.cc
+index b3c32a2bd..b62e8fc3a 100644
+--- a/src/algorithms/signal_source/adapters/osmosdr_signal_source.cc
++++ b/src/algorithms/signal_source/adapters/osmosdr_signal_source.cc
+@@ -22,7 +22,6 @@
+ #include "GPS_L1_CA.h"
+ #include "configuration_interface.h"
+ #include "gnss_sdr_valve.h"
+-#include <boost/format.hpp>
+ #include <glog/logging.h>
+ #include <gnuradio/blocks/file_sink.h>
+ #include <iostream>
+@@ -67,23 +66,23 @@ OsmosdrSignalSource::OsmosdrSignalSource(const ConfigurationInterface* configura
+             if (!antenna_.empty())
+                 {
+                     osmosdr_source_->set_antenna(antenna_, 0);
+-                    std::cout << boost::format("Set RX Antenna : %s") % (osmosdr_source_->get_antenna(0)) << std::endl;
+-                    LOG(INFO) << boost::format("Set RX Antenna : %s") % (osmosdr_source_->get_antenna(0));
++                    std::cout << "Set RX Antenna: " << osmosdr_source_->get_antenna(0) << std::endl;
++                    LOG(INFO) << "Set RX Antenna: " << osmosdr_source_->get_antenna(0);
+                 }
+ 
+             // 2 set sampling rate
+             osmosdr_source_->set_sample_rate(sample_rate_);
+-            std::cout << boost::format("Actual RX Rate: %f [SPS]...") % (osmosdr_source_->get_sample_rate()) << std::endl;
+-            LOG(INFO) << boost::format("Actual RX Rate: %f [SPS]...") % (osmosdr_source_->get_sample_rate());
++            std::cout << "Actual RX Rate: " << osmosdr_source_->get_sample_rate() << " [SPS]..." << std::endl;
++            LOG(INFO) << "Actual RX Rate: " << osmosdr_source_->get_sample_rate() << " [SPS]...";
+ 
+             // 3. set rx frequency
+             osmosdr_source_->set_center_freq(freq_);
+-            std::cout << boost::format("Actual RX Freq: %f [Hz]...") % (osmosdr_source_->get_center_freq()) << std::endl;
+-            LOG(INFO) << boost::format("Actual RX Freq: %f [Hz]...") % (osmosdr_source_->get_center_freq());
++            std::cout << "Actual RX Freq: " << osmosdr_source_->get_center_freq() << " [Hz]..." << std::endl;
++            LOG(INFO) << "Actual RX Freq: " << osmosdr_source_->get_center_freq() << " [Hz]...";
+ 
+             // TODO: Assign the remnant IF from the PLL tune error
+-            std::cout << boost::format("PLL Frequency tune error %f [Hz]...") % (osmosdr_source_->get_center_freq() - freq_) << std::endl;
+-            LOG(INFO) << boost::format("PLL Frequency tune error %f [Hz]...") % (osmosdr_source_->get_center_freq() - freq_);
++            std::cout << "PLL Frequency tune error: " << osmosdr_source_->get_center_freq() - freq_ << " [Hz]..." << std::endl;
++            LOG(INFO) << "PLL Frequency tune error: " << osmosdr_source_->get_center_freq() - freq_ << " [Hz]...\n";
+ 
+             // 4. set rx gain
+             if (this->AGC_enabled_ == true)
+@@ -100,19 +99,19 @@ OsmosdrSignalSource::OsmosdrSignalSource(const ConfigurationInterface* configura
+                     osmosdr_source_->set_bb_gain(if_gain_, 0);
+                     if (!osmosdr_args_.empty() && (osmosdr_args_.find("bladerf") != std::string::npos))
+                         {
+-                            std::cout << boost::format("Actual LNA Gain: %f dB...") % osmosdr_source_->get_gain("LNA", 0) << std::endl;
+-                            std::cout << boost::format("Actual VGA1 Gain: %f dB...") % osmosdr_source_->get_gain("VGA1", 0) << std::endl;
+-                            std::cout << boost::format("Actual VGA2 Gain: %f dB...") % osmosdr_source_->get_gain("VGA2", 0) << std::endl;
++                            std::cout << "Actual LNA Gain: " << osmosdr_source_->get_gain("LNA", 0) << " dB..." << std::endl;
++                            std::cout << "Actual VGA1 Gain: " << osmosdr_source_->get_gain("VGA1", 0) << " dB..." << std::endl;
++                            std::cout << "Actual VGA2 Gain: " << osmosdr_source_->get_gain("VGA2", 0) << " dB..." << std::endl;
+                         }
+                     else
+                         {
+-                            std::cout << boost::format("Actual RX Gain: %f dB...") % osmosdr_source_->get_gain() << std::endl;
+-                            LOG(INFO) << boost::format("Actual RX Gain: %f dB...") % osmosdr_source_->get_gain();
++                            std::cout << "Actual RX Gain: " << osmosdr_source_->get_gain() << " dB..." << std::endl;
++                            LOG(INFO) << "Actual RX Gain: " << osmosdr_source_->get_gain() << " dB...";
+                         }
+                 }
+ 
+             // Get actual bandwidth
+-            std::cout << boost::format("Actual Bandwidth: %f [Hz]...") % osmosdr_source_->get_bandwidth(0) << std::endl;
++            std::cout << "Actual Bandwidth: " << osmosdr_source_->get_bandwidth(0) << " [Hz]..." << std::endl;
+         }
+     else
+         {
diff -Nru gnss-sdr-0.0.12/debian/patches/series gnss-sdr-0.0.12/debian/patches/series
--- gnss-sdr-0.0.12/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ gnss-sdr-0.0.12/debian/patches/series	2020-07-29 11:11:12.000000000 +0200
@@ -0,0 +1 @@
+76cce022ac51917242e5af905c2118669bec017e.patch

Reply to: