Menu

#31 Cannot compile avarice-2.14.tar.bz2 due to '__unused'

v1.0_(example)
closed-fixed
nobody
compilation (1)
3
2021-08-27
2021-02-12
No

Downloading the latest version in on this page, unpacking, configuring and building it leads to the errors

jtag3io.cc:353:42: error: expected , or ... before __unused
  353 | void jtag3::changeBitRate(int newBitRate __unused)
      |                                          ^~~~~~~~
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)
      |                                       ^~~~~~~~

That's on Ubuntu 20.04 with GCC version 9.3.0. The __unused keyword seems to make problems here.

Doing a quick replace-with-nothing using

sed -i -e 's/__unused//g' src/jtag*.cc

makes the program compile after another make.

Discussion

  • JoeS

    JoeS - 2021-02-12

    Hi Maximilian,

    randomly I raised a ticket on same issue at nearly the same time. I also tried to remove "__unused", it compiled, but nothing was installed using make install. Have you the same problem?

    Regards,
    Jörg

     
    • Maximilian Gerhardt

      For installing you need to give it the install directory in the initial ./configure command, like mkdir ~/avarice_installed and ./configure --prefix ~/avarice_installed and then make && make install. But for me, I just grabbed the executable in src/avarice.

       
  • Joris Putcuyps

    Joris Putcuyps - 2021-08-25

    Is this not fixed in r390?

     
    • Joerg Wunsch

      Joerg Wunsch - 2021-08-26

      Yep, it is. Feel free to close this bug ticket.

       
  • Joris Putcuyps

    Joris Putcuyps - 2021-08-27
    • status: open --> closed-fixed
     

Log in to post a comment.