[PATCH weston] compositor-rdp: Fix build with freerdp2

Pekka Paalanen ppaalanen at gmail.com
Mon Jan 23 14:15:51 UTC 2017


On Fri, 20 Jan 2017 11:31:08 +0100
Emilio Pozuelo Monfort <pochu at debian.org> wrote:

> On 19/01/17 11:26, Daniel Stone wrote:
> > Hi Emilio,
> > 
> > On 18 January 2017 at 17:43, Emilio Pozuelo Monfort <pochu at debian.org> wrote:  
> >> Based on a patch from John Moser <john.r.moser at gmail.com>
> >>
> >> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850658
> >>
> >> Signed-off-by: Emilio Pozuelo Monfort <pochu at debian.org>
> >> ---
> >>  libweston/compositor-rdp.c | 8 ++++++++
> >>  1 file changed, 8 insertions(+)
> >>
> >> diff --git a/libweston/compositor-rdp.c b/libweston/compositor-rdp.c
> >> index 223382ce..16f4c628 100644
> >> --- a/libweston/compositor-rdp.c
> >> +++ b/libweston/compositor-rdp.c
> >> @@ -664,13 +664,21 @@ rdp_peer_context_new(freerdp_peer* client, RdpPeerContext* context)
> >>         context->rfx_context->mode = RLGR3;
> >>         context->rfx_context->width = client->settings->DesktopWidth;
> >>         context->rfx_context->height = client->settings->DesktopHeight;
> >> +#ifdef PIXEL_FORMAT_BGRA32
> >> +       rfx_context_set_pixel_format(context->rfx_context, PIXEL_FORMAT_BGRA32);
> >> +#else
> >>         rfx_context_set_pixel_format(context->rfx_context, RDP_PIXEL_FORMAT_B8G8R8A8);
> >> +#endif  
> > 
> > And still this fails on Fedora 25. The FreeRDP API is a thing of
> > absolute magic: https://phabricator.freedesktop.org/P9
> > 
> > Does it build with this patch instead? https://phabricator.freedesktop.org/P10  
> 
> It doesn't, because your magic is before the #include color.h which defines PIXEL_*.
> 
> This version works for me...

Hi guys,

I found another guest to the party. Using net-misc/freerdp-2.0.0_pre20160722
Weston master fails to build with:


In file included from /usr/include/freerdp2/freerdp/codecs.h:25:0,
                 from /usr/include/freerdp2/freerdp/freerdp.h:46,
                 from /home/pq/git/weston/libweston/compositor-rdp.c:69:
/home/pq/git/weston/libweston/compositor-rdp.c: In function ‘rdp_peer_context_new’:
/usr/include/freerdp2/freerdp/codec/color.h:85:72: error: ‘FREERDP_PIXEL_FORMAT_TYPE_BGRA’ undeclared (first use in this function)
 #define PIXEL_FORMAT_B8G8R8A8_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 32, FREERDP_PIXEL_FORMAT_TYPE_BGRA, 8, 8, 8, 8)
                                                                        ^
/usr/include/freerdp2/freerdp/codec/color.h:37:35: note: in definition of macro ‘FREERDP_PIXEL_FORMAT’
  ((_flip << 30) | (_bpp << 24) | (_type << 16) | (_a << 12) | (_r << 8) | (_g << 4) | (_b))
                                   ^
/usr/include/freerdp2/freerdp/codec/color.h:86:32: note: in expansion of macro ‘PIXEL_FORMAT_B8G8R8A8_F’
 #define PIXEL_FORMAT_B8G8R8A8  PIXEL_FORMAT_B8G8R8A8_F(0)
                                ^
/usr/include/freerdp2/freerdp/codec/color.h:87:30: note: in expansion of macro ‘PIXEL_FORMAT_B8G8R8A8’
 #define PIXEL_FORMAT_BGRA32  PIXEL_FORMAT_B8G8R8A8
                              ^
/home/pq/git/weston/libweston/compositor-rdp.c:93:31: note: in expansion of macro ‘PIXEL_FORMAT_BGRA32’
 # define DEFAULT_PIXEL_FORMAT PIXEL_FORMAT_BGRA32
                               ^
/home/pq/git/weston/libweston/compositor-rdp.c:676:53: note: in expansion of macro ‘DEFAULT_PIXEL_FORMAT’
  rfx_context_set_pixel_format(context->rfx_context, DEFAULT_PIXEL_FORMAT);
                                                     ^
/usr/include/freerdp2/freerdp/codec/color.h:85:72: note: each undeclared identifier is reported only once for each function it appears in
 #define PIXEL_FORMAT_B8G8R8A8_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 32, FREERDP_PIXEL_FORMAT_TYPE_BGRA, 8, 8, 8, 8)
                                                                        ^
/usr/include/freerdp2/freerdp/codec/color.h:37:35: note: in definition of macro ‘FREERDP_PIXEL_FORMAT’
  ((_flip << 30) | (_bpp << 24) | (_type << 16) | (_a << 12) | (_r << 8) | (_g << 4) | (_b))
                                   ^
/usr/include/freerdp2/freerdp/codec/color.h:86:32: note: in expansion of macro ‘PIXEL_FORMAT_B8G8R8A8_F’
 #define PIXEL_FORMAT_B8G8R8A8  PIXEL_FORMAT_B8G8R8A8_F(0)
                                ^
/usr/include/freerdp2/freerdp/codec/color.h:87:30: note: in expansion of macro ‘PIXEL_FORMAT_B8G8R8A8’
 #define PIXEL_FORMAT_BGRA32  PIXEL_FORMAT_B8G8R8A8
                              ^
/home/pq/git/weston/libweston/compositor-rdp.c:93:31: note: in expansion of macro ‘PIXEL_FORMAT_BGRA32’
 # define DEFAULT_PIXEL_FORMAT PIXEL_FORMAT_BGRA32
                               ^
/home/pq/git/weston/libweston/compositor-rdp.c:676:53: note: in expansion of macro ‘DEFAULT_PIXEL_FORMAT’
  rfx_context_set_pixel_format(context->rfx_context, DEFAULT_PIXEL_FORMAT);
                                                     ^

---

However, updating to net-misc/freerdp-2.0.0_pre20161219 allows things
to build for me again. There is just one warning:

/home/pq/git/weston/libweston/compositor-rdp.c: In function ‘rdp_peer_init’:
/home/pq/git/weston/libweston/compositor-rdp.c:1229:33: warning: assignment from incompatible pointer type
  client->update->SuppressOutput = xf_suppress_output;
                                 ^

Hope this helps people packaging Weston.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170123/26c92148/attachment.sig>


More information about the wayland-devel mailing list