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

    Linux Joystick Mapper help : Solved

    Scheduled Pinned Locked Moved Help and Support
    help errorjoypad configlinux
    2 Posts 1 Posters 667 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.
    • S
      shaun57
      last edited by shaun57

      I'm trying to use Linux Joystick Mapper to remap mouse buttons to controller buttons. Specifically for use with DOSBox

      I've followed the instructions in other Retropie posts and https://www.petrockblock.com/forums/topic/mapping-a-game-controller-in-kodi/

      I've copied the contents of the joymap-0.4.2 folder to /home/pi/joymap with WinSCP

      When I execute "make" in that folder with Putty, I get the following errors. I'm afraid I'm no Linux expert so would appreciate any advice..

      pi@retropie:~/joymap $ make
      cc -Wall -Werror -g -c -o mapparser.o mapparser.c
      mapparser.c: In function ‘parse_valuepairs’:
      mapparser.c:540:50: error: ‘%s’ directive writing up to 255 bytes into a region of size 238 [-Werror=format-overflow=]
      sprintf(message, "Unexpected token "%s"", key.value);
      ^~ ~~~~~~~~~
      mapparser.c:540:13: note: ‘sprintf’ output between 20 and 275 bytes into a destination of size 256
      sprintf(message, "Unexpected token "%s"", key.value);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      mapparser.c:529:49: error: ‘%s’ directive writing up to 255 bytes into a region of size 243 [-Werror=format-overflow=]
      sprintf(message, "Unknown key "%s"", key.value);
      ^~ ~~~~~~~~~
      mapparser.c:529:17: note: ‘sprintf’ output between 15 and 270 bytes into a destination of size 256
      sprintf(message, "Unknown key "%s"", key.value);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      mapparser.c:536:54: error: ‘%s’ directive writing up to 255 bytes into a region of size 238 [-Werror=format-overflow=]
      sprintf(message, "Unexpected token "%s"", value.value);
      ^~ ~~~~~~~~~~~
      mapparser.c:536:17: note: ‘sprintf’ output between 20 and 275 bytes into a destination of size 256
      sprintf(message, "Unexpected token "%s"", value.value);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      mapparser.c: In function ‘parse_lines’:
      mapparser.c:885:54: error: ‘%s’ directive writing up to 255 bytes into a region of size 238 [-Werror=format-overflow=]
      sprintf(message, "Unexpected token "%s"", t.value);
      ^~ ~~~~~~~
      mapparser.c:885:17: note: ‘sprintf’ output between 20 and 275 bytes into a destination of size 256
      sprintf(message, "Unexpected token "%s"", t.value);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cc1: all warnings being treated as errors
      make: *** [<builtin>: mapparser.o] Error 1

      1 Reply Last reply Reply Quote 0
      • S
        shaun57
        last edited by

        managed to resolve myself.
        Apparently these are just warning messages and are only preventing successful compilation because of the -Werror flag in the makefile. Removed that flag and it now compiles successfully

        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.