On Wed, Sep 23, 2020 at 3:18 PM Sri Web <[email protected]>
wrote:

> Helllo All,
>
> I am trying to build Gucamole Server 1.2.0 on Mac OS Catalina, and running
> into compile issues. Has anyone able to build Guacamole Server successfully
> on macOS?
>
> I installed the required dependencies, ran "./configure
> --with-init-dir=/etc/init.d" and ran "make" and running into these errors:
>
> ---------------
> ...
> Making all in src/guacd
>   CC       guacd-conf-args.o
>   CC       guacd-conf-file.o
>   CC       guacd-conf-parse.o
>   CC       guacd-connection.o
>   CC       guacd-daemon.o
>   CC       guacd-log.o
>   CC       guacd-move-fd.o
> move-fd.c:47:17: error: implicit declaration of function 'CMSG_SPACE' is
> invalid in C99 [-Werror,-Wimplicit-function-declaration]
>     char buffer[CMSG_SPACE(sizeof(fd))] = {0};
>                 ^
> move-fd.c:47:17: error: variable-sized object may not be initialized
>     char buffer[CMSG_SPACE(sizeof(fd))] = {0};
>                 ^~~~~~~~~~~~~~~~~~~~~~
> move-fd.c:55:27: error: implicit declaration of function 'CMSG_LEN' is
> invalid in C99 [-Werror,-Wimplicit-function-declaration]
>     control->cmsg_len   = CMSG_LEN(sizeof(fd));
>                           ^
> move-fd.c:81:17: error: implicit declaration of function 'CMSG_SPACE' is
> invalid in C99 [-Werror,-Wimplicit-function-declaration]
>     char buffer[CMSG_SPACE(sizeof(fd))];
>                 ^
> 4 errors generated.
> make[2]: *** [guacd-move-fd.o] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
> ---------------
>
> my gcc version is:
>
> MacBook-Pro guacamole-server-1.2.0 % gcc --version
> Configured with: --prefix=/Library/Developer/CommandLineTools/usr
> --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
> Apple clang version 12.0.0 (clang-1200.0.32.2)
> Target: x86_64-apple-darwin19.6.0
> Thread model: posix
> InstalledDir: /Library/Developer/CommandLineTools/usr/bin
>
> Seems CMSG_SPACE and CMSG_LEN definitions are missing.
>
> Any ideas? Appreciate your input.
>
>
Well, I've not found anything definitive, but stumbled across several
projects that have experienced that.  Unfortunately there isn't a lot of
great information on what they've done to fix it.  The only obvious
suggestion I could find was to try to add "#define _DARWIN_C_SOURCE 1" to
your config.h file and see if that resolves it (see:
https://mail-index.netbsd.org/pkgsrc-bugs/2009/01/15/msg030359.html).

I don't really have a Mac to try this out with, but it may be worth opening
a bug on a JIRA tracker to track this and maybe someone in the community
can resolve it.

https://issues.apache.org/jira/projects/GUACAMOLE

-Nick

Reply via email to