mike-jumper commented on issue #243: GUACAMOLE-249: Migrate to FreeRDP 2.x
URL: https://github.com/apache/guacamole-server/pull/243#issuecomment-573552512
 
 
   After fixing the RAIL issue, I encountered the following:
   
   ```
   ...
     CC       libguac_client_rdp_la-color.lo
   color.c: In function 'guac_rdp_convert_color':
   color.c:62:16: error: implicit declaration of function 
'FreeRDPConvertColor'; did you mean 'ConvertColor'? 
[-Werror=implicit-function-declaration]
        intermed = FreeRDPConvertColor(intermed, src_format, dst_format,
                   ^~~~~~~~~~~~~~~~~~~
                   ConvertColor
   cc1: all warnings being treated as errors
   ```
   
   Apparently, the `FreeRDPConverColor()` function was formerly known as 
`ConvertColor()`. It was renamed along with similarly-named functions due to 
Mac applications using `GetColor()` failing to build because that function 
clashes with a system function of the same name (see FreeRDP/FreeRDP#3810).
   
   Adding tests to determine the proper function doesn't appear to be an option 
at the moment, as:
   
   * The necessary include path for FreeRDP is only known via pkg-config and 
I'm unaware of any way to get autoconf tests to find headers that can only be 
found when using the `CFLAGS` returned by pkg-config.
   * We can't simply test version numbers because all of these FreeRDP variants 
have the same version.
   
   I tried addressing this by switching to `ConvertColor()`, which should work 
due to compatibility macros present in the FreeRDP headers (commit a6b7e07). 
*But*, I then encountered issues with the glyph callbacks:
   
   ```
     CC       libguac_client_rdp_la-rdp.lo
   rdp.c: In function 'rdp_freerdp_pre_connect':
   rdp.c:155:16: error: assignment from incompatible pointer type 
[-Werror=incompatible-pointer-types]
        glyph.Draw = guac_rdp_glyph_draw;
                   ^
   rdp.c:156:21: error: assignment from incompatible pointer type 
[-Werror=incompatible-pointer-types]
        glyph.BeginDraw = guac_rdp_glyph_begindraw;
                        ^
   rdp.c:157:19: error: assignment from incompatible pointer type 
[-Werror=incompatible-pointer-types]
        glyph.EndDraw = guac_rdp_glyph_enddraw;
                      ^
   cc1: all warnings being treated as errors
   ```
   
   In this case, the incompatibility is due to switching from `UINT32` to 
`INT32` for width and height. At this point, I'm thinking we simply shouldn't 
support the version of FreeRDP on Bionic. The version of the API in use appears 
to be unique to Bionic and from before any 2.0.0 release candidate was made.
   
   I've also created some Jenkins jobs to verify the build, so we should be 
able to better ensure build compatibility going forward:
   
   * 
https://builds.apache.org/view/E-G/view/Guacamole/job/guacamole-server-centos/
   * 
https://builds.apache.org/view/E-G/view/Guacamole/job/guacamole-server-fedora/
   * 
https://builds.apache.org/view/E-G/view/Guacamole/job/guacamole-server-debian/
   * 
https://builds.apache.org/view/E-G/view/Guacamole/job/guacamole-server-ubuntu/
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to