Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#60910 closed defect (fixed)

spice-gtk @0.38_1: Build fails with undeclared identifier ACL_USER, ACL_READ, ACL_WRITE

Reported by: abusse (Anselm Busse) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.3
Keywords: Cc: cooljeanius (Eric Gallager)
Port: spice-gtk

Description

Building the port fails with an error for spice-client-glib-usb-acl-helper.c:

:info:build [14/115] /usr/bin/clang -Isrc/spice-client-glib-usb-acl-helper.p -Isrc -I../spice-gtk-0.38/src -I. -I../spice-gtk-0.38 -I/opt/local/include/polkit-1 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include -Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -Wextra -O2 -g -DHAVE_CONFIG_H -DSPICE_COMPILATION '-DG_LOG_DOMAIN="GSpice"' -Wno-sign-compare -Wno-unused-parameter -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_46 -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_22 -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_22 -ObjC -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64 -D_XOPEN_SOURCE -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIE -D_REENTRANT -MD -MQ src/spice-client-glib-usb-acl-helper.p/spice-client-glib-usb-acl-helper.c.o -MF src/spice-client-glib-usb-acl-helper.p/spice-client-glib-usb-acl-helper.c.o.d -o src/spice-client-glib-usb-acl-helper.p/spice-client-glib-usb-acl-helper.c.o -c ../spice-gtk-0.38/src/spice-client-glib-usb-acl-helper.c
:info:build FAILED: src/spice-client-glib-usb-acl-helper.p/spice-client-glib-usb-acl-helper.c.o 
:info:build /usr/bin/clang -Isrc/spice-client-glib-usb-acl-helper.p -Isrc -I../spice-gtk-0.38/src -I. -I../spice-gtk-0.38 -I/opt/local/include/polkit-1 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include -Xclang -fcolor-diagnostics -pipe -Wall -Winvalid-pch -Wextra -O2 -g -DHAVE_CONFIG_H -DSPICE_COMPILATION '-DG_LOG_DOMAIN="GSpice"' -Wno-sign-compare -Wno-unused-parameter -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_46 -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_22 -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_22 -ObjC -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64 -D_XOPEN_SOURCE -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -fPIE -D_REENTRANT -MD -MQ src/spice-client-glib-usb-acl-helper.p/spice-client-glib-usb-acl-helper.c.o -MF src/spice-client-glib-usb-acl-helper.p/spice-client-glib-usb-acl-helper.c.o.d -o src/spice-client-glib-usb-acl-helper.p/spice-client-glib-usb-acl-helper.c.o -c ../spice-gtk-0.38/src/spice-client-glib-usb-acl-helper.c
:info:build ../spice-gtk-0.38/src/spice-client-glib-usb-acl-helper.c:97:18: error: use of undeclared identifier 'ACL_USER'
:info:build         if (t == ACL_USER) {
:info:build                  ^
:info:build ../spice-gtk-0.38/src/spice-client-glib-usb-acl-helper.c:131:33: error: use of undeclared identifier 'ACL_USER'
:info:build         acl_set_tag_type(entry, ACL_USER);
:info:build                                 ^
:info:build ../spice-gtk-0.38/src/spice-client-glib-usb-acl-helper.c:137:27: error: use of undeclared identifier 'ACL_READ'
:info:build     acl_add_perm(permset, ACL_READ|ACL_WRITE);
:info:build                           ^
:info:build ../spice-gtk-0.38/src/spice-client-glib-usb-acl-helper.c:137:36: error: use of undeclared identifier 'ACL_WRITE'
:info:build     acl_add_perm(permset, ACL_READ|ACL_WRITE);
:info:build                                    ^

Attachments (1)

main.log (91.6 KB) - added by abusse (Anselm Busse) 4 years ago.

Download all attachments as: .zip

Change History (8)

Changed 4 years ago by abusse (Anselm Busse)

Attachment: main.log added

comment:1 Changed 4 years ago by jmroot (Joshua Root)

Cc: danchr removed
Owner: set to danchr
Status: newassigned

comment:2 Changed 3 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:3 Changed 3 years ago by cooljeanius (Eric Gallager)

I found that building in trace mode avoids this build failure, but I don't see which of the files tracemode hides would be the one responsible:

Warning: The following existing files were hidden from the build system by trace mode:
  /opt/local/bin/ar
  /opt/local/bin/file
  /opt/local/bin/git
  /opt/local/bin/nm
  /opt/local/bin/otool
  /opt/local/bin/random
  /opt/local/bin/tempfile
  /opt/local/lib/libunwind.dylib
  /opt/local/lib/perl5/vendor_perl/5.28/Getopt/Long.pm
  /opt/local/lib/perl5/vendor_perl/5.28/Pod/Escapes.pm
  /opt/local/lib/perl5/vendor_perl/5.28/Pod/Man.pm
  /opt/local/lib/perl5/vendor_perl/5.28/Pod/Simple.pm
  /opt/local/lib/perl5/vendor_perl/5.28/Pod/Simple/BlackBox.pm
  /opt/local/lib/perl5/vendor_perl/5.28/Pod/Simple/LinkSection.pm
  /opt/local/lib/perl5/vendor_perl/5.28/Pod/Text.pm
  /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level/Cwd.pm
  /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level/Encode.pm
  /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level/Encode/Alias.pm
  /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level/Encode/Config.pm
  /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level/Encode/Encoding.pm
  /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level/Encode/MIME/Name.pm
  /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level/File/Spec.pm
  /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level/File/Spec/Unix.pm
  /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level/XSLoader.pm
  /opt/local/lib/perl5/vendor_perl/5.28/parent.pm
  /private/var/select/sh

comment:4 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from danchr to ryandesign
Status: assignedaccepted

The files you listed were hidden by trace mode during the build phase. I don't think any of them are relevant to this issue. On my system, the files that were hidden by trade mode during the configure phase were:

Warning: The following existing files were hidden from the build system by trace mode:
  /opt/local/bin/ar
  /opt/local/bin/cmake
  /opt/local/bin/ctags
  /opt/local/bin/git
  /opt/local/bin/gtkdoc-scan
  /opt/local/bin/lipo
  /opt/local/bin/pod2man
  /opt/local/lib/pkgconfig/libpulse-mainloop-glib.pc
  /opt/local/lib/pkgconfig/libsasl2.pc
  /opt/local/lib/pkgconfig/polkit-gobject-1.pc

I think one of those is relevant. Based on the "acl" in this configure output when not using trace mode, I guess it's the presence of policykit:

:info:configure Run-time dependency polkit-gobject-1 found: YES 0.116
:info:configure Checking for function "polkit_authority_get_sync" with dependency polkit-gobject-1: YES 
:info:configure Checking for function "polkit_authorization_result_get_dismissed" with dependency polkit-gobject-1: YES 
:info:configure Checking for function "acl_get_file" : YES 

I guess the port should explicitly disable the use of policykit. The other pkgconfig files found by the configure phase are a problem too. The build either needs to depend on those or make sure they don't get used.

comment:5 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In d0e0e8dc560cf7cf021bdfaba307809a44f25e80/macports-ports (master):

spice-gtk: Prevent opportunistic linking

Disable the use of things we're not declaring dependencies on: celt051,
gtk-doc, policykit (this one caused a build failure if it was active
while building spice-gtk), pulseaudio, cyrus-sasl2, smartcard, usbredir,
webdav.

Closes: #60910

comment:6 Changed 3 years ago by cooljeanius (Eric Gallager)

Could we maybe get variants for some of the optional dependencies that actually work?

comment:7 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

celt and pulseaudio support were removed in the next version, to which the port was updated in [b298936b43cd32c58698add64cc1e8c9f8b47072/macports-ports].

Building with usbredir doesn't work on macOS: https://gitlab.freedesktop.org/spice/spice-gtk/-/issues/144

If the other options do work and you want to submit a pull request to enable them or to add variants for them, go ahead.

Note: See TracTickets for help on using tickets.