avarice icon indicating copy to clipboard operation
avarice copied to clipboard

[bug #32] Compile failed on Ubuntu 20.04

Open avrs-admin opened this issue 3 years ago • 1 comments

joes1 <None> 2021-02-12 17:38:21.894000

Hi, it is impossible to build avarice V2.14 successfully following the instructions in INSTALL. ./configure gives some warnings like:

configure: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: arpa/inet.h: proceeding with the compiler's result

and make some warnings and errors like:

jtag3io.cc:321:5: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
  321 |     throw (jtag_exception)
      |     ^~~~~
      :
jtag3io.cc: In member function ‘virtual void jtag3::changeBitRate(int)’:
jtag3io.cc:353:31: warning: unused parameter ‘newBitRate’ [-Wunused-parameter]
  353 | void jtag3::changeBitRate(int newBitRate __unused)
      |                           ~~~~^~~~~~~~~~
jtag3io.cc: At global scope:
jtag3io.cc:358:39: error: expected ‘,’ or ‘...’ before ‘__unused’
  358 | bool jtag3::synchroniseAt(int bitrate __unused)
      |                                       ^~~~~~~~

gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) was used. Are there more special environment settings necessary?

Regards, Jörg

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

avrs-admin avatar Jan 26 '22 21:01 avrs-admin

joes1 2021-02-13 13:57:59.560000

To get it successful compiled and installed for use with AVR Dragon, I had to do the following:

  • Install libusb-dev (libusb1.0-0-dev was already installed but not used)
  • Remove the __unused patterns in all sources like mentioned here
  • Remove the file avarice.spec. It is mistakenly included in the archive, but should be generated by configure
  • Then run:
./configure
make
sudo make install

In case of errors (especially after installing libusb-dev) make clean was not sufficient. I had to remove all generated files manually and start over with ./configure

Jörg

avrs-admin avatar Jan 26 '22 21:01 avrs-admin