Bug 210533 - update net/libvncserver to 0.9.10 fails in port
Summary: update net/libvncserver to 0.9.10 fails in port
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ben Woods
URL: https://reviews.freebsd.org/D6974
Depends on:
Reported: 2016-06-24 17:59 UTC by Walter Schwarzenfeld
Modified: 2016-06-27 07:32 UTC (History)
2 users (show)

See Also:
woodsb02: merge-quarterly-

patch-libvncclient_h264.c (295 bytes, patch)
2016-06-24 22:43 UTC, Carlos J. Puga Medina
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Schwarzenfeld freebsd_triage 2016-06-24 17:59:26 UTC
The update of net/libvncserver to 0.9.10 succeds with poudriere but fails in the port with:

in file included from rfbproto.c:2406:
./h264.c:253:108: error: too few arguments to function call, expected 8, have 6
    va_status = vaCreateSurfaces(va_dpy, width, height, VA_RT_FORMAT_YUV420, SURFACE_NUM, &va_surface_id[0]);
~~~~~~~~~~~~~~~~ ^
/usr/local/include/va/va.h:945:1: note: 'vaCreateSurfaces' declared here

I made a "testpatch" to eliminate "too few arguments to function call, expected 8, have 6".
(I don't attach this patch, cause it is surely wrong).

After this it compiled,but shows error message like this:

In file included from gtkvncviewer.c:27:
In file included from /usr/local/include/gtk-2.0/gdk/gdkx.h:33:
In file included from /usr/local/include/X11/Xutil.h:54:
In file included from /usr/local/include/X11/keysym.h:73:
/usr/local/include/X11/keysymdef.h:1332:9: warning: 'XK_Greek_omega' macro redefined
#define XK_Greek_omega                   0x07f9  /* U+03C9 GREEK SMALL LETTER OMEGA */

so I guess it don't uses the headers from the port, it use the system headers - and this seems wrong.

(10.3-RELEASE-p5 amd64).

Port is unmaintained.
Comment 1 Carlos J. Puga Medina freebsd_committer 2016-06-24 20:04:35 UTC
Yes, it fails to build with libva support.

As a workaround you can disable it.

Add this line

CONFIGURE_ARGS= --without-libva

to libvcnserver/Makefile
Comment 2 Walter Schwarzenfeld freebsd_triage 2016-06-24 20:15:19 UTC
Thanks! That works!
Comment 3 Ben Woods freebsd_committer 2016-06-24 21:39:25 UTC
As Carlos said, I believe this is because the environment you are building in has libva and GTK installed (perhaps the former only after adding it to LIB_DEPENDS). A poudriere build uses a clean environment which does not have either of these, so when they are checked for in the configure and not found, the configure is disabling the build for the H.264 encodings and the GTK+ vnc viewer example respectively.

It seems like perhaps we need to either add LIBVA and GTK as options or dependencies, and if they are enabled we will run into the compile problems you are experiencing.
Comment 4 Carlos J. Puga Medina freebsd_committer 2016-06-24 22:43:00 UTC
Created attachment 171765 [details]

The following patch fix the issue.
Comment 5 Carlos J. Puga Medina freebsd_committer 2016-06-24 22:47:50 UTC
This patch makes h264.c compile with recent libva version by including va_compat.h
Comment 6 Ben Woods freebsd_committer 2016-06-26 22:22:53 UTC
Thanks for reporting this Walter, and Carlos thanks very much for the patch.

A fix for this bug is being prepared here:
Comment 7 Ben Woods freebsd_committer 2016-06-26 22:26:23 UTC
Committed. Thanks again to Walter and Carlos.
Comment 8 commit-hook freebsd_committer 2016-06-26 22:26:35 UTC
A commit references this bug:

Author: woodsb02
Date: Sun Jun 26 22:25:52 UTC 2016
New revision: 417620
URL: https://svnweb.freebsd.org/changeset/ports/417620

  net/libvncserver: Fix build with libva
  - Add new option to select whether to compile with VAAPI support,
    so that if multimedia/libva is already installed on the system
    during the build process, it is not linked to unless desired.
  - Add patch to allow h.264 support to build using libva deprecated API

  PR:		210533
  Submitted by:	cpm
  Reported by:	Walter Schwarzenfeld <w.schwarzenfeld@utanet.at>
  Approved by:	adamw (mentor)
  Differential Revision:	https://reviews.freebsd.org/D6974

Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2016-06-27 01:35:02 UTC
Should the quarterly branch receive this bug fix?
Comment 10 Ben Woods freebsd_committer 2016-06-27 07:32:13 UTC
(In reply to Kubilay Kocak from comment #9)
> Should the quarterly branch receive this bug fix?

No, because the bug was only introduced during the recent update of net/libvncserver to 0.9.10 on 24th June 2016.