| Summary: | net/libvncserver: Disable cmake defaults | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Derek Schrock <dereks> | ||||||||||
| Component: | Individual Port(s) | Assignee: | Marcelo Araujo <araujo> | ||||||||||
| Status: | Closed FIXED | ||||||||||||
| Severity: | Affects Some People | CC: | freebsd, jcfyecrayz, rkoberman, tony01, vvd | ||||||||||
| Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(araujo) |
||||||||||
| Version: | Latest | ||||||||||||
| Hardware: | Any | ||||||||||||
| OS: | Any | ||||||||||||
| URL: | https://github.com/LibVNC/libvncserver/releases/tag/LibVNCServer-0.9.12 | ||||||||||||
| See Also: |
https://reviews.freebsd.org/D18836 https://reviews.freebsd.org/D19009 |
||||||||||||
| Bug Depends on: | |||||||||||||
| Bug Blocks: | 213019 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Derek Schrock
2019-01-14 00:44:24 UTC
[9/97] /usr/bin/cc -DLIBVNCSERVER_HAVE_LIBJPEG -DLIBVNCSERVER_HAVE_LIBPNG -DLIBVNCSERVER_HAVE_LIBZ -DLIBVNCSERVER_HAVE_LZO -Dvncclient_EXPORTS -I/usr/obj/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12 -I. -I/usr/obj/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/libvncserver -I/usr/obj/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/common -I/usr/local/include -O2 -pipe -march=prescott -fstack-protector -fno-strict-aliasing -O2 -pipe -march=prescott -fstack-protector -fno-strict-aliasing -fPIC -MD -MT CMakeFiles/vncclient.dir/libvncclient/sasl.c.o -MF CMakeFiles/vncclient.dir/libvncclient/sasl.c.o.d -o CMakeFiles/vncclient.dir/libvncclient/sasl.c.o -c /usr/obj/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/libvncclient/sasl.c
FAILED: CMakeFiles/vncclient.dir/libvncclient/sasl.c.o
/usr/bin/cc -DLIBVNCSERVER_HAVE_LIBJPEG -DLIBVNCSERVER_HAVE_LIBPNG -DLIBVNCSERVER_HAVE_LIBZ -DLIBVNCSERVER_HAVE_LZO -Dvncclient_EXPORTS -I/usr/obj/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12 -I. -I/usr/obj/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/libvncserver -I/usr/obj/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/common -I/usr/local/include -O2 -pipe -march=prescott -fstack-protector -fno-strict-aliasing -O2 -pipe -march=prescott -fstack-protector -fno-strict-aliasing -fPIC -MD -MT CMakeFiles/vncclient.dir/libvncclient/sasl.c.o -MF CMakeFiles/vncclient.dir/libvncclient/sasl.c.o.d -o CMakeFiles/vncclient.dir/libvncclient/sasl.c.o -c /usr/obj/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/libvncclient/sasl.c
/usr/obj/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/libvncclient/sasl.c:74:34: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
sprintf(buf, "%s;%hu", host, port);
~~~ ^~~~
%d
/usr/obj/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/libvncclient/sasl.c:144:11: warning: passing 'unsigned char [1]' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign]
strcpy(lsec->data, password);
^~~~~~~~~~
/usr/include/string.h:84:31: note: passing argument to parameter here
char *strcpy(char * __restrict, const char * __restrict);
^
/usr/obj/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/libvncclient/sasl.c:206:9: warning: implicit declaration of function 'getsockname' is invalid in C99 [-Wimplicit-function-declaration]
if (getsockname(client->sock, (struct sockaddr*)&localAddress, &addressLength)) {
^
/usr/obj/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/libvncclient/sasl.c:211:35: error: use of undeclared identifier 'AF_INET'
if (localAddress.ss_family == AF_INET) {
^
/usr/obj/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/libvncclient/sasl.c:213:19: error: use of undeclared identifier 'AF_INET'
inet_ntop(AF_INET, &(sa_in->sin_addr), buf, INET_ADDRSTRLEN);
^
/usr/obj/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/libvncclient/sasl.c:216:42: error: use of undeclared identifier 'AF_INET6'
} else if (localAddress.ss_family == AF_INET6) {
^
/usr/obj/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/libvncclient/sasl.c:218:19: error: use of undeclared identifier 'AF_INET6'
inet_ntop(AF_INET6, &(sa_in->sin6_addr), buf, INET6_ADDRSTRLEN);
^
/usr/obj/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/libvncclient/sasl.c:541:15: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration]
ret = read(client->sock, encoded, encodedLen);
^
4 warnings and 4 errors generated.
ninja: build stopped: subcommand failed.
*** Error code 1
Created attachment 201478 [details]
Build filed fix
BTW, is https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213019 fixed in 0.9.12? (In reply to VVD from comment #3) Yes. I think I know why that build is failing for you. Need to disable some defaults in the cmake build options. Created attachment 201492 [details]
Disable projects cmake options not used at this time
Disable LibVNC/libvncserver cmake default options
All cmake options default to YES so When building on a host system with
non-option or non-DEPENDS libs installed it's possible cmake will find
these and build parts of libvncserver that are not supported at this
time.
Disable all non-option and non-DEPENDS cmake options for now.
Enable cmake options that don't have ports options from USES= or that
can be found in the base system.
(In reply to VVD from comment #2) Sorry I didn't realize this was applied to the ports tree. Can you try this new patch with 0.9.12 (In reply to Derek Schrock from comment #4) > (In reply to VVD from comment #3) >> BTW, is https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213019 fixed in 0.9.12? > Yes. This one: https://github.com/LibVNC/libvncserver/issues/211 ? Compiled fine with your patch. VirtualBox didn't tested yet. Yes, that one. I can confirm vbox vnc is fixed with 0.9.12 (In reply to VVD from comment #2) This fixed it for me. 12.0-STABLE r343501 amd64. Explicitly specifying supported options (Derek's patch in comment 5 to set CMAKE_ON/OFF explicitly) is good (and maybe should be turned into port OPTIONS in some cases - e.g, the FILETRANSFER option?). But VVD's patch (comment 2) is also appropriate, I think (except I would patch sasl.c, not sasl.h). And it should be suggested upstream. The code in question that references AF_INET should include a more appropriate header file for portability on non-linux systems (sys/socket.h is probably better than arpa/inet.h). Can someone open an issue on the libvncserver github page for this (and add a reference in this thread)? If you could not tell, I hit the 'undeclared AF_INET' build error for libvncserver, too. (In reply to Derek Schrock from comment #8) > I can confirm vbox vnc is fixed with 0.9.12 Tested - VirtualBox's bug fixed for me too. (In reply to John Hein from comment #10) You better know what to write in bugreport. [-: Created attachment 201520 [details] fix cmake defaults add sasl support with patch This will bring back functionality that was there before 0.9.12. Add SASL support with a patch to fix build issue from comment 1 (In reply to Derek Schrock from comment #13) > Created attachment 201520 [details] In this patch WITH_SDL 2 times: > CMAKE_OFF= WITH_FFMPEG WITH_SDL WITH_SDL WITH_SYSTEMD A commit references this bug: Author: araujo Date: Thu Jan 31 01:47:02 UTC 2019 New revision: 491673 URL: https://svnweb.freebsd.org/changeset/ports/491673 Log: - Add CMAKE options properly. - Add SASL as an OPTIONS_DEFINE. - Bump PORTREVISION. PR: 234929 and 235302 Submitted by: Derek Schrock <dereks@lifeofadishwasher.com>, O. Hartmann <ohartmann@walstatt.org>, Chad Jacob Milios <milios@ccsys.com> Tested by: many Differential Revision: https://reviews.freebsd.org/D19009 Changes: head/net/libvncserver/Makefile head/net/libvncserver/files/patch-libvncclient_sasl.c (In reply to commit-hook from comment #15) > WITH_SDL WITH_SDL Why 2 times? Confirmed it fixed the VirtualBox/VNC crash for me (re: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213019). Thanks everyone for your efforts. Thanks to danfe: https://svnweb.freebsd.org/changeset/ports/495345 *** Bug 213019 has been marked as a duplicate of this bug. *** |