Bug 247580 - print/xfce4-print: compiler error: incomplete definition of type 'struct _ipp_attribute_s'
Summary: print/xfce4-print: compiler error: incomplete definition of type 'struct _ipp...
Status: Closed Not Accepted
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-xfce (Nobody)
Depends on:
Reported: 2020-06-27 09:57 UTC by O. Hartmann
Modified: 2020-06-27 15:04 UTC (History)
1 user (show)

See Also:
madpilot: maintainer-feedback+


Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2020-06-27 09:57:55 UTC
Port fails to build on 12-STABLE and CURRENT (both recent, jails) in poudriere hosted by recent CURRENT.


=>> Building print/xfce4-print
build started at Sat Jun 27 00:38:39 UTC 2020
port directory: /usr/ports/print/xfce4-print
package name: xfce4-print-4.6.1_16
building for: FreeBSD freebsd.gdr 12.1-STABLE FreeBSD 12.1-STABLE 1201518 amd64
maintained by: xfce@FreeBSD.org
Makefile ident:      $FreeBSD: head/print/xfce4-print/Makefile 515609 2019-10-25 13:32:42Z pkubaj $
Poudriere version: 3.3.4
Host OSVERSION: 1300100
Jail OSVERSION: 1201518
Job Id: 03

---Begin Environment---
UNAME_v=FreeBSD 12.1-STABLE 1201518
---End Environment---

---Begin Poudriere Port Flags/Env---
---End Poudriere Port Flags/Env---

---Begin OPTIONS List---
===> The following configuration options are available for xfce4-print-4.6.1_16:
     LETTER=off: Use letter paper format instead of A4
     NLS=on: Native Language Support
====> Options available for the single PRINTMETHOD: you have to select exactly one of them
     LPR=off: LPR printing system support
     CUPS=on: CUPS printing system support
===> Use 'make config' to modify these settings
---End OPTIONS List---

/usr/local/include/cups/http.h:458:94: note: 'httpConnectEncrypt' has been explicitly marked deprecated here
extern http_t           *httpConnectEncrypt(const char *host, int port, http_encryption_t encryption) _CUPS_DEPRECATED_1_7_MSG("Use httpConnect2 instead.");
/usr/local/include/cups/versioning.h:203:59: note: expanded from macro '_CUPS_DEPRECATED_1_7_MSG'
#      define _CUPS_DEPRECATED_1_7_MSG(m) __attribute__ ((deprecated(m))) _CUPS_PUBLIC
cups.c:247:55: error: incomplete definition of type 'struct _ipp_s'
      if (ippGetState(request) == IPP_ERROR || request->state == IPP_IDLE) {
/usr/local/include/cups/ipp.h:733:16: note: forward declaration of 'struct _ipp_s'
typedef struct _ipp_s ipp_t;            /**** IPP request/response data ****/
cups.c:253:32: error: incomplete definition of type 'struct _ipp_attribute_s'
      if (!attr || strlen (attr->values[0].string.text) == 0) {
/usr/local/include/cups/ipp.h:734:16: note: forward declaration of 'struct _ipp_attribute_s'
typedef struct _ipp_attribute_s ipp_attribute_t;
cups.c:256:42: error: incomplete definition of type 'struct _ipp_attribute_s'
          printer->alias = g_strdup (attr->values[0].string.text);
/usr/local/include/cups/ipp.h:734:16: note: forward declaration of 'struct _ipp_attribute_s'
typedef struct _ipp_attribute_s ipp_attribute_t;
cups.c:261:40: error: incomplete definition of type 'struct _ipp_attribute_s'
        printer->alias = g_strdup (attr->values[0].string.text);
/usr/local/include/cups/ipp.h:734:16: note: forward declaration of 'struct _ipp_attribute_s'
typedef struct _ipp_attribute_s ipp_attribute_t;
cups.c:264:24: error: incomplete definition of type 'struct _ipp_attribute_s'
      if (attr && (attr->values[0].integer & CUPS_PRINTER_CLASS))
Comment 1 Guido Falsi freebsd_committer 2020-06-27 13:26:25 UTC

The xfce4-print port (together with others, like xfce4-mixer) has been dropped and is not being developed anymore. It is in the ports tree, but bit rot is quickly getting in.

In this case you are compiling with the CUPS option (off by default), and it appears that recent changes in the cups include files caused cups support in xfce4-print to break.

The upstream commit in cups causing this can be viewed at [1]

xfce4-print was accessing cups private structures. We already had a patch in out tree adding a define which allowed the include file to expose these deprecated structures. Such flag has been removed by the upstream, causing the breakage you see.

I'm sorry, but short of a rewrite of all the relevant code in xfce4-print this cannot be fixed, but with no upstream this is improbable.

Also note that xfce4-print, also depends on GTK2. XFCE development versions have already removed all support for GTK2, so any xfce component depending on GTK2 needs to be ported to GTK3 or will fail to compile with the future release of XFCE 4.16.

Obviously for components whose support has been dropped long ago by upstream such porting to GTK3 is very improbable.

xfce4-print, xfce4-mixer, xfce4-quicklauncher-plugin are some popular XFCE ports that WILL be removed from the tree when XFCE will be updated to 4.16,m and risk breaking irreparably before that due to bit rot (no upstream development).

Some other xfce parts have not been ported to GTK3 up to now, but are actively supported, and I expect them to be ported by the time 4.16 beta versions will be around.

I'm sorry but unless someone with cups development knowledge comes up with patches, I can only remove the CUPS option from the port since it's broken. I'll also take this as a chance to mark all the xfce ports which are not being supported upstream and still depending on gtk2 as DEPRECATED in our tree to let it known that they could be removed at any time if any non trivial breakage happens.

Leaving the bug in open state for now, at least until I commit the change described above.

[1] https://github.com/apple/cups/commit/0fb02fb9cef39fd0b0c838f11af21d99fe5eab9b#diff-a299fb5293cedc8102f5963e50fbe22c
Comment 2 O. Hartmann 2020-06-27 14:29:48 UTC
All right, thanks for the care.
Comment 3 commit-hook freebsd_committer 2020-06-27 14:55:50 UTC
A commit references this bug:

Author: madpilot
Date: Sat Jun 27 14:55:18 UTC 2020
New revision: 540612
URL: https://svnweb.freebsd.org/changeset/ports/540612

  Remove CUPS option. It's not working anymore since the cups update
  to 2.3.3.

  The port was already using a deprecated interface exposing cups
  internal structures. Support for this has been recently removed

  PR:		247580
  Submitted by:	O. Hartmann <ohartmann@walstatt.org>

Comment 4 Guido Falsi freebsd_committer 2020-06-27 15:04:31 UTC
Closing, since I'm unable to fix the reported issue.

The broken option has been removed and this ports together with other ports in a similar situation have been marked DEPRECATED, but without an EXPIRATION_DATE.