#18252 closed defect (fixed)
gtk2 on Panther: `ppd_attr_t' undeclared (first use in this function)
Reported by: | EvilKnight@… | Owned by: | nox@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.7.0 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt), rhwood@… | |
Port: | gtk2 |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
I had submitted a previous ticket (#18158: libpixman build) which may provide clues for this one.
I have been running:
sudo port install p5-gtk2
Up to libpixman, I had Xcode 1.1 installed. It was determined that I needed Xcode 1.5. That did fix the problem and everything went along fine to here. I have verified that the directory exists. I mention the previous ticket in case it may have something to do with switching Xcode versions in the middle of the process.
Error output:
---> Fetching gtk2 ---> Attempting to fetch gtk+-2.14.7.tar.bz2 from ftp://ftp.cse.buffalo.edu/pub/Gnome/sources/gtk+/2.14/ ---> Verifying checksum(s) for gtk2 ---> Extracting gtk2 ---> Applying patches to gtk2 ---> Configuring gtk2 ---> Building gtk2 Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_x11_gtk2/work/gtk+-2.14.7" && make all " returned error 2 Command output: /opt/local/lib/libiconv.dylib(localcharset.o) definition of _locale_charset /opt/local/lib/libintl.dylib(localcharset.o) definition of _locale_charset creating libprintbackend-lpr.la (cd .libs && rm -f libprintbackend-lpr.la && ln -s ../libprintbackend-lpr.la libprintbackend-lpr.la) Making all in cups if /bin/sh ../../../libtool --mode=compile /usr/bin/gcc-3.3 -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../.. -I../../../gtk -I../../../gtk -I../../../gdk -I../../../gdk -I/opt/local/include -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/opt/local/include/atk-1.0 -DG_DISABLE_CAST_CHECKS -I/opt/local/include -DX_LOCALE -I/usr/X11R6/include -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -I/opt/local/include -DGDK_PIXBUF_DISABLE_DEPRECATED -O2 -fstrict-aliasing -Wall -MT gtkprintbackendcups.lo -MD -MP -MF ".deps/gtkprintbackendcups.Tpo" \ -c -o gtkprintbackendcups.lo `test -f 'gtkprintbackendcups.c' || echo './'`gtkprintbackendcups.c; \ then mv -f ".deps/gtkprintbackendcups.Tpo" ".deps/gtkprintbackendcups.Plo"; \ else rm -f ".deps/gtkprintbackendcups.Tpo"; exit 1; \ fi mkdir .libs /usr/bin/gcc-3.3 -DHAVE_CONFIG_H -I. -I. -I../../.. -I../../.. -I../../../gtk -I../../../gtk -I../../../gdk -I../../../gdk -I/opt/local/include -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/pango-1.0 -I/opt/local/include/cairo -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/opt/local/include/atk-1.0 -DG_DISABLE_CAST_CHECKS -I/opt/local/include -DX_LOCALE -I/usr/X11R6/include -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -I/opt/local/include -DGDK_PIXBUF_DISABLE_DEPRECATED -O2 -fstrict-aliasing -Wall -MT gtkprintbackendcups.lo -MD -MP -MF .deps/gtkprintbackendcups.Tpo -c gtkprintbackendcups.c -fno-common -DPIC -o .libs/gtkprintbackendcups.o In file included from /opt/local/include/glib-2.0/glib.h:77, from /opt/local/include/glib-2.0/glib/gprintf.h:23, from /opt/local/include/glib-2.0/glib/gstdio.h:24, from gtkprintbackendcups.c:38: /opt/local/include/glib-2.0/glib/gtestutils.h:196: warning: use of `long double' type; its size may change in a future release /opt/local/include/glib-2.0/glib/gtestutils.h:196: warning: (Long double usage is reported only once for each file. /opt/local/include/glib-2.0/glib/gtestutils.h:196: warning: To disable this warning, use -Wno-long-double.) gtkprintbackendcups.c: In function `cups_printer_create_cairo_surface': gtkprintbackendcups.c:318: error: `ppd_attr_t' undeclared (first use in this function) gtkprintbackendcups.c:318: error: (Each undeclared identifier is reported only once gtkprintbackendcups.c:318: error: for each function it appears in.) gtkprintbackendcups.c:318: error: `ppd_attr' undeclared (first use in this function) gtkprintbackendcups.c:329: warning: implicit declaration of function `ppdFindAttr' make[4]: *** [gtkprintbackendcups.lo] Error 1 make[3]: *** [all-recursive] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Error: The following dependencies failed to build: gtk2 p5-cairo p5-extutils-depends p5-extutils-pkgconfig p5-glib Error: Status 1 encountered during processing.
Keith
Change History (11)
comment:1 Changed 16 years ago by mf2k (Frank Schima)
Owner: | changed from macports-tickets@… to nox@… |
---|---|
Port: | gtk2 added |
comment:2 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | rhwood@… added |
---|---|
Description: | modified (diff) |
Summary: | Error building gtk2 → gtk2 on Panther: `ppd_attr_t' undeclared (first use in this function) |
comment:3 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
I do see the same problem on my Panther Mac (Mac OS X 10.4.11, Xcode 1.5, MacPorts 1.7.0).
comment:4 follow-up: 5 Changed 16 years ago by rob@…
I also am struggling with what looks like the same issue mac OS X 10.3.9, Xcode 1.5, MacPorts 1.700 - would be great to see this fixed. I did see somewhere that deactivating cups-headers would sort the issue but obviously macports just reactivates it as a dependency. I saw that http://trac.macports.org/ticket/10596 seems to suggest that they were just removing cups-headers but i guess the latest revisions have changed and its now a dependency?
comment:5 follow-up: 6 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to ryandesign@…:
I do see the same problem on my Panther Mac (Mac OS X 10.4.11, Xcode 1.5, MacPorts 1.7.0).
Of course I meant that my Panther Mac is running Mac OS X 10.3.9, Xcode 1.5 and MacPorts 1.7.0.
Replying to rob@…:
I also am struggling with what looks like the same issue mac OS X 10.3.9, Xcode 1.5, MacPorts 1.700 - would be great to see this fixed. I did see somewhere that deactivating cups-headers would sort the issue but obviously macports just reactivates it as a dependency. I saw that http://trac.macports.org/ticket/10596 seems to suggest that they were just removing cups-headers but i guess the latest revisions have changed and its now a dependency?
If someone can say how to fix it, we surely will. :)
#10596 is about problems building gtk2 on Tiger (not Panther) when cups-headers is installed. The change that was made to solve the ticket caused cups-headers to only get installed on Panther, not Tiger, where it was believed to still be necessary.
Where did you read that deactivating cups-headers was the solution? That may have been a solution with MacPorts 1.6.0 when cups-headers was installed on Tiger, where having it installed is harmful. But since the port was changed to only install on Panther the workaround is no longer necessary on Tiger, and wouldn't work anymore anyway, since it was taking advantage of a MacPorts bug that deactivated ports are accepted as satisfying a dependency. That bug was fixed in MacPorts 1.7.0 so that any deactivated ports get reactivated first.
comment:6 follow-up: 7 Changed 16 years ago by rob@…
#10596 is about problems building gtk2 on Tiger (not Panther) when cups-headers is installed. The change that was made to solve the ticket caused cups-headers to only get installed on Panther, not Tiger, where it was believed to still be necessary.
Where did you read that deactivating cups-headers was the solution? That may have been a solution with MacPorts 1.6.0 when cups-headers was installed on Tiger, where having it installed is harmful. But since the port was changed to only install on Panther the workaround is no longer necessary on Tiger, and wouldn't work anymore anyway, since it was taking advantage of a MacPorts bug that deactivated ports are accepted as satisfying a dependency. That bug was fixed in MacPorts 1.7.0 so that any deactivated ports get reactivated first.
Ah I see and Yep you're absolutely right on the ports version - still learning to read the right bits, only joined yesterday and playing with ports for a week now "spot the noob"! :) Should I keep watching here for a fix? Thanks for your help.
comment:7 follow-up: 8 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to rob@…:
Should I keep watching here for a fix?
Yes, but not many are using Panther anymore so you may have to do some work yourself to try to find the fix.
I did a little investigating and found that ppd_attr_t is indeed not defined by any file in the cups-headers port. It is, however, defined in /usr/include/cups/ppd.h on Tiger. So it looks like gtk2 is now using a newer version of CUPS than the cups-headers port provides headers for. We could possibly update cups-headers to install headers from a newer version of CUPS, but I think the headers have to match the version of CUPS provided by the OS. Curiously, according to cups-config, Panther provides CUPS 1.1.20rc1 while Tiger has CUPS 1.1.23, but the cups-headers port is at version 1.1.15. I wonder if just updating cups-headers to 1.1.20rc1 would work.
Another thing we could do is use "configure.args-append --disable-cups" on Panther. This should ensure we don't run into CUPS-related problems on Panther in the future, but obviously at the expense of disabling CUPS support in gtk2 on Panther.
comment:8 follow-up: 9 Changed 16 years ago by rob@…
Replying to ryandesign@…:
I did a little investigating and found that ppd_attr_t is indeed not defined by any file in the cups-headers port. It is, however, defined in /usr/include/cups/ppd.h on Tiger. So it looks like gtk2 is now using a newer version of CUPS than the cups-headers port provides headers for. We could possibly update cups-headers to install headers from a newer version of CUPS, but I think the headers have to match the version of CUPS provided by the OS. Curiously, according to cups-config, Panther provides CUPS 1.1.20rc1 while Tiger has CUPS 1.1.23, but the cups-headers port is at version 1.1.15. I wonder if just updating cups-headers to 1.1.20rc1 would work.
Another thing we could do is use "configure.args-append --disable-cups" on Panther. This should ensure we don't run into CUPS-related problems on Panther in the future, but obviously at the expense of disabling CUPS support in gtk2 on Panther.
Thats great, thank you so much - built it without cups which is fine for my requirements. Doesnt seem as satisfying as fixing it though :) am i able to update to cups-headers 1.1.20 without relying on ports and then maybe retrying gtk2 with cups support? may seem like a daft question but I'm still learning. BTW after gtk2 installed a few more dependencies down the line tk failed but I put that in as a new ticket. Are these fails mainly cos I'm still using panther do you think?
comment:9 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to rob@…:
Thats great, thank you so much - built it without cups which is fine for my requirements. Doesnt seem as satisfying as fixing it though :) am i able to update to cups-headers 1.1.20 without relying on ports and then maybe retrying gtk2 with cups support? may seem like a daft question but I'm still learning.
No, MacPorts deliberately will not use software you install manually outside of MacPorts. I suggest you try to update the cups-headers port to version 1.1.20rc1 and see what happens. Instructions for editing portfiles can be found in the guide.
BTW after gtk2 installed a few more dependencies down the line tk failed but I put that in as a new ticket. Are these fails mainly cos I'm still using panther do you think?
That would be my first guess. Panther is very old and very different internally from Tiger, just as Tiger is very different from Leopard. As software gets updated to newer versions, support for older OSes is often dropped. Even if it's not an upstream problem but a MacPorts one, MacPorts maintainers almost always only test on a single computer with a single version of Mac OS X, and that is almost certainly no longer going to be Panther. Thus we don't know stuff is broken on Panther until someone files a bug.
comment:10 Changed 16 years ago by nox@…
Resolution: | → fixed |
---|---|
Status: | new → closed |
CUPS supported disabled on Panther in r48735
Replying to EvilKnight@…:
The only occurrence of that error message I can find with Google says the solution is to install the CUPS headers. And I believe that's why the gtk2 port has since r28266 included a dependency on cups-headers for Panther. But it sounds like Randall wasn't convinced that his change would actually fix the issue.