Menu

#325 Latest wacom drivers don't compile on Ubuntu 12.04

closed-wont-fix
None
xf86-input-wacom
2017-01-17
2016-11-23
Erdem
No

The latest kernel driver or previous one xf86-input-wacom-0.32.0 doesn't compile under Ubuntu 12.04.

Error message is like that:

../src/wcmValidateDevice.c:506:2: error: implicit declaration of function ‘input_option_free_list’ [-Werror=implicit-function-declaration]
  input_option_free_list(&hotplug_info->input_options);

If we look at line 506 there is a function named input_option_free_list

    input_option_free_list(&hotplug_info->input_options);

I suppose this error happens because we are using using a function for which the compiler has not seen a declaration ("prototype") yet.

 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 14
[..]

static void
input_option_free_list(InputOption **opts)
{
    InputOption *tmp = *opts;
    while(*opts)
    {
        tmp = (*opts)->next;
        free((*opts)->key);
        free((*opts)->value);
        free((*opts));
        *opts = tmp;
    }
}
#endif

If you look at the function declaration it is nested inside an if endif statement.

Discussion

  • Ping Cheng

    Ping Cheng - 2016-11-23
    • assigned_to: Peter Hutterer
     
  • Ping Cheng

    Ping Cheng - 2016-11-23

    xf86-input-wacom is an X driver. Kernel drivers are in input-wacom. Let's see if Peter has time to look into it. He should be able to fix it faster than anyone else.

     
  • Peter Hutterer

    Peter Hutterer - 2016-11-23

    please bisect it to the commit that broke, I don't think we actually changed that bit in quite a while. Thanks

     
  • Jason Gerecke

    Jason Gerecke - 2016-11-28

    Erdem: I'm guessing the issue here is the same one I "fixed" with the hack at https://github.com/jigpu/xf86-input-wacom/commit/81123216f8eba2c90f8f0fb65a4d2003a7853503 Please try removing the #ifdef and #endif statements that you noticed surround the 'input_option_new' and 'input_option_free_list' functions.

    This hack breaks distros other than Ubuntu 12.04 (the bug is actually in their X cobbled-together X "frankenserver") so we unfortunately can't integrate it into an xf86-input-wacom release.

     
  • Jason Gerecke

    Jason Gerecke - 2016-11-30
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,19 +1,18 @@
     The latest kernel driver or previous one xf86-input-wacom-0.32.0 doesn't compile under Ubuntu 12.04.
    
     Error message is like that:
    -
    +~~~~
     ../src/wcmValidateDevice.c:506:2: error: implicit declaration of function ‘input_option_free_list’ [-Werror=implicit-function-declaration]
       input_option_free_list(&hotplug_info->input_options);
    -  
    +~~~~
    
       If we look at line 506 there is a function named input_option_free_list
    -  
    +~~~~
        input_option_free_list(&hotplug_info->input_options);
    -    
    +~~~~
      I suppose this error happens because we are using using a function for which the compiler has not seen a declaration ("prototype") yet.
    
    - `
    - 
    + ~~~~
      #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 14
     [..]
    
    @@ -31,5 +30,5 @@
        }
     }
     #endif
    - `
    +~~~~
      If you look at the function declaration it is nested inside an if endif statement.
    
     
  • Jason Gerecke

    Jason Gerecke - 2016-11-30
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -12,7 +12,7 @@
     ~~~~
      I suppose this error happens because we are using using a function for which the compiler has not seen a declaration ("prototype") yet.
    
    - ~~~~
    +~~~~
      #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 14
     [..]
    
     
  • Erdem

    Erdem - 2016-12-02

    Please try removing the #ifdef and #endif statements that you noticed surround the 'input_option_new' and 'input_option_free_list' functions.

    After removing #ifdef and #endif statements it compiles fine.

     
  • Jason Gerecke

    Jason Gerecke - 2017-01-17
    • status: new --> closed-wont-fix