RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Cannot compile anymore LIBHID with Retropie v4.6

    Scheduled Pinned Locked Moved Help and Support
    retropielibhidinstallultrastick
    3 Posts 2 Posters 205 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      Vagabondivan
      last edited by

      Hi guys, I'm doing a clean install of Retropie 4.6 on a Raspberry Pi 3B+, I have to configure an Ultrastick 360 and with the previous version 4.5 I was compiling and installing libhid-0.2.16 without any trouble.
      Now when I try to compile, the system returns an error and I can't go on with the installation.
      Here is what I get:

      make  all-recursive
      make[1]: Entering directory '/home/pi/RetroPie/public/UltrastikCmd-master/libhid-0.2.16'
      Making all in hidparser
      make[2]: Entering directory '/home/pi/RetroPie/public/UltrastikCmd-master/libhid-0.2.16/hidparser'
      make[2]: Nothing to be done for 'all'.
      make[2]: Leaving directory '/home/pi/RetroPie/public/UltrastikCmd-master/libhid-0.2.16/hidparser'
      Making all in src
      make[2]: Entering directory '/home/pi/RetroPie/public/UltrastikCmd-master/libhid-0.2.16/src'
      make[2]: Leaving directory '/home/pi/RetroPie/public/UltrastikCmd-master/libhid-0.2.16/src'
      Making all in test
      make[2]: Entering directory '/home/pi/RetroPie/public/UltrastikCmd-master/libhid-0.2.16/test'
      make[3]: Entering directory '/home/pi/RetroPie/public/UltrastikCmd-master/libhid-0.2.16/src'
      make[3]: Leaving directory '/home/pi/RetroPie/public/UltrastikCmd-master/libhid-0.2.16/src'
      if gcc -DHAVE_CONFIG_H -I. -I. -I..   -DNDEBUG -I../include -I../hidparser -I/usr/local/include -O2 -Wall -W -Werror -MT lshid.o -MD -MP -MF ".deps/lshid.Tpo" -c -o lshid.o lshid.c; \
      then mv -f ".deps/lshid.Tpo" ".deps/lshid.Po"; else rm -f ".deps/lshid.Tpo"; exit 1; fi
      lshid.c: In function ‘device_iterator’:
      lshid.c:47:30: error: ‘%s’ directive writing up to 4096 bytes into a region of size 10 [-Werror=format-overflow=]
         sprintf(current_dev_path, "%s/%s", device->bus->dirname, device->filename);
                                    ^~
      lshid.c:47:3: note: ‘sprintf’ output between 2 and 8194 bytes into a destination of size 10
         sprintf(current_dev_path, "%s/%s", device->bus->dirname, device->filename);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cc1: all warnings being treated as errors
      make[2]: *** [Makefile:312: lshid.o] Error 1
      make[2]: Leaving directory '/home/pi/RetroPie/public/UltrastikCmd-master/libhid-0.2.16/test'
      make[1]: *** [Makefile:394: all-recursive] Error 1
      make[1]: Leaving directory '/home/pi/RetroPie/public/UltrastikCmd-master/libhid-0.2.16'
      make: *** [Makefile:304: all] Error 2
      

      I can't figure out what's the problem, I suppose it's related to the GCC compiler version but I 'm not sure and I don't know how to solve it.

      Any idea about it? Tnx.

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by mitu

        The GCC version included in Raspbian Buster is stricter now and because of the all warnings being treated as errors compilation parameter, it refuses to compile libhid.
        What you can do is to remove the -Wall usage by running configuring the libhid build (and probably the other libraries included), with

        ./configure --disable-warnings
        

        This is just a workaround, the code is really old and un-maintained and should be updated to use libhidapi instead of libhid.
        Try using https://github.com/katie-snow/Ultimarc-linux instead, it looks like it's still maintained and seems to support your device.

        V 1 Reply Last reply Reply Quote 0
        • V
          Vagabondivan @mitu
          last edited by

          Dear @mitu, your suggestion worked like a charm, many tnx, I'll give a try to Ultimarc-linux as well.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

          Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.