avrdudes / avarice

AVaRICE is a program for interfacing the Atmel JTAG ICE to GDB to allow users to debug their embedded AVR target.
GNU General Public License v2.0
39 stars 12 forks source link

[bug #34] AVaRICE 2.14 won't compile on Arch Linux #34

Closed avrs-admin closed 2 years ago

avrs-admin commented 2 years ago

kalcifer 2021-05-27 07:41:12.265000

I get the following errors on compilation:

In file included from jtag2bp.cc:39:
jtag2.h:159:52: error: ISO C++17 does not allow dynamic exception specifications
  159 |                        bool retryOnTimeout = true) throw(jtag_exception);
      |                                                    ^~~~~

specify_older_cpp.diff

This issue was migrated from https://sourceforge.net/p/avarice/bugs/34/

avrs-admin commented 2 years ago

kalcifer 2021-05-28 21:59:54.168000

A temporary solution was found to be to change the C++ compile version to be C++ 14.

On Arch Linux, for building this package from the AUR the solution is to add

CXXFLAGS="-std=c++14"

to the top of the build() function in PKGBUILD.

From this, I can venture a guess to say that AVaRICE just needs to be updated to support C++17.

avrs-admin commented 2 years ago

jputcu 2021-08-04 18:37:35.532000

I've created a small patch to specify an older C++ standard.

avrs-admin commented 2 years ago

joerg_wunsch 2021-08-11 18:28:33.005000

Well, frankly, I'd very much prefer to have a patch fixing the source code so it compiles on a newer compiler without warnings, rather than back-dating the compiler.

avrs-admin commented 2 years ago

jputcu 2021-08-11 20:20:10.822000

I also prefer that, but this is the smallest step with the least amount of risk. When I have time I'll have a stab at a bigger patch if someone is willing to review and apply it?

avrs-admin commented 2 years ago

joerg_wunsch 2021-08-11 20:38:34.499000

I'm willing to review and apply a patch, but my C++ knowledge (in particular regarding modern C++) is close to 0, so without a lot of Internet research, I wouldn't know how to fix that properly right now.

avrs-admin commented 2 years ago

joerg_wunsch 2021-08-23 20:58:48.517000

avrs-admin commented 2 years ago

joerg_wunsch 2021-08-23 20:58:48.731000

Fixed by patch #40