ODR-DabMod build problem GCC 10

47 views
Skip to first unread message

888mhz

unread,
May 20, 2020, 12:31:40 PM5/20/20
to mmbtools
Hi,

I have problem with compilation after upgrade to new gcc 10 on Arch Linux:

  CXX      src/odr_dabmod-DabMod.o
  CXX      src
/odr_dabmod-DabModulator.o
  CXX      src
/odr_dabmod-Buffer.o
src
/Buffer.cpp: In member function void Buffer::setLength(size_t)’:
src
/Buffer.cpp:134:24: error: runtime_error is not a member of std
 
134 |             throw std::runtime_error("memory allocation failed: " +
     
|                        ^~~~~~~~~~~~~
src
/Buffer.cpp: In member function uint8_t Buffer::operator[](size_t) const’:
src
/Buffer.cpp:157:20: error: out_of_range is not a member of std
 
157 |         throw std::out_of_range("index out of range");


With gcc 9 everything was ok, mayby it needs small changes in code.

Nick Piggott

unread,
May 20, 2020, 1:23:31 PM5/20/20
to mmbtools
Hello,

This page explains why previously implied library inclusions now need to be explicitly stated when compiling with gcc 10


Sticking an
#include <stdexcept>

in the top of those files should fix it. I'm not in a position to change / check / submit those as pulls to Github right now.

Nick
 

--
You received this message because you are subscribed to the Google Groups "mmbtools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crc-mmbtools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/crc-mmbtools/3ac35ab4-1f45-471a-a818-9efaf5a436d4%40googlegroups.com.


--
Nick

888mhz

unread,
May 20, 2020, 2:03:39 PM5/20/20
to mmbtools
Thx Nick,

I added #include <stdexcept> to Buffer.cpp and I can confirm the problem was solved.

Matthias Brändli

unread,
Jun 8, 2020, 7:44:54 AM6/8/20
to crc-mm...@googlegroups.com
Hi all,

I have updated my GCC to version 10 too, and am going through all the
tools now.

mpb
Reply all
Reply to author
Forward
0 new messages