After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 586107 - gtkprintbackendpapi.c does not compile on Solaris 10
gtkprintbackendpapi.c does not compile on Solaris 10
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
2.16.x
Other Solaris
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-06-17 09:57 UTC by Jörn Clausen
Modified: 2013-10-06 05:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fix this compiler problem (3.49 KB, patch)
2009-06-24 15:58 UTC, Ghee Teo
none Details | Review
Fix Solaris build issue (1006 bytes, patch)
2013-10-03 21:42 UTC, Timothy Arceri
committed Details | Review
Remove unused variables (2.91 KB, patch)
2013-10-03 21:44 UTC, Timothy Arceri
committed Details | Review
Remove unused function (938 bytes, patch)
2013-10-03 21:44 UTC, Timothy Arceri
committed Details | Review

Description Jörn Clausen 2009-06-17 09:57:44 UTC
Compiling gtk+ 2.16.2 on Solaris 10 with GCC 3.4.6 (from within pkgsrc) fails with

gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../gtk -I../../../gdk -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED -D_REENTRANT -D_PTHREADS -D
_POSIX_PTHREAD_SEMANTICS -I/software/pkgsrc/source/pkgsrc/x11/gtk2/work.spare280/.buildlink/include/glib/glib-2.0 -I/software/pkgsrc
/source/pkgsrc/x11/gtk2/work.spare280/.buildlink/lib/glib-2.0/include -I/software/pkgsrc/source/pkgsrc/x11/gtk2/work.spare280/.build
link/include/pango-1.0 -I/software/pkgsrc/source/pkgsrc/x11/gtk2/work.spare280/.buildlink/include/cairo -I/software/pkgsrc/source/pk
gsrc/x11/gtk2/work.spare280/.buildlink/include/pixman-1 -I/software/pkgsrc/source/pkgsrc/x11/gtk2/work.spare280/.buildlink/include/f
reetype2 -I/software/pkgsrc/source/pkgsrc/x11/gtk2/work.spare280/.buildlink/include -I/software/pkgsrc/source/pkgsrc/x11/gtk2/work.s
pare280/.buildlink/include/libpng12 -I/software/pkgsrc/source/pkgsrc/x11/gtk2/work.spare280/.buildlink/include/atk-1.0 -DG_DISABLE_C
AST_CHECKS -DPREFIX=\"/usr/pkgsrc/20090421\" -DPNG_NO_ASSEMBLER_CODE -I/software/pkgsrc/source/pkgsrc/x11/gtk2/work.spare280/.buildl
ink/include/python2.5 -I/software/pkgsrc/source/pkgsrc/x11/gtk2/work.spare280/.buildlink/include/db4 -I/software/pkgsrc/source/pkgsr
c/x11/gtk2/work.spare280/.buildlink/gcc34/include -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SIN
GLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_DEPRECATED -O -Wall -MT gtkprintbackendpapi.lo -MD -MP -MF .deps/gtk
printbackendpapi.Tpo -c gtkprintbackendpapi.c  -fPIC -DPIC -o .libs/gtkprintbackendpapi.o
In file included from gtkprintbackendpapi.c:31:
../../../config.h:273:1: warning: "_FILE_OFFSET_BITS" redefined
In file included from /usr/include/unistd.h:18,
                 from gtkprintbackendpapi.c:23:
/usr/include/sys/feature_tests.h:188:1: warning: this is the location of the previous definition
gtkprintbackendpapi.c: In function `gtk_print_backend_papi_print_stream':
gtkprintbackendpapi.c:354: error: incompatible types in initialization
gtkprintbackendpapi.c:344: warning: unused variable `print_error'
gtkprintbackendpapi.c:348: warning: unused variable `argc'
gtkprintbackendpapi.c:349: warning: unused variable `in_fd'
gtkprintbackendpapi.c:350: warning: unused variable `argv'
gtkprintbackendpapi.c: In function `papi_get_printer_list':
gtkprintbackendpapi.c:580: warning: unused variable `name'
gtkprintbackendpapi.c:580: warning: unused variable `url'
gtkprintbackendpapi.c:581: warning: unused variable `attrs'
gtkprintbackendpapi.c:548: warning: unused variable `attributes'
gtkprintbackendpapi.c:554: warning: unused variable `status2'
gtkprintbackendpapi.c:557: warning: unused variable `printer'
gtkprintbackendpapi.c:559: warning: unused variable `current_printer_list'
gtkprintbackendpapi.c: In function `update_printer_status':
gtkprintbackendpapi.c:646: warning: unused variable `status_changed'
gtkprintbackendpapi.c: In function `papi_printer_get_options':
gtkprintbackendpapi.c:666: warning: unused variable `i'
gtkprintbackendpapi.c: In function `papi_printer_prepare_for_print':
gtkprintbackendpapi.c:745: warning: assignment discards qualifiers from pointer target type
gtkprintbackendpapi.c: In function `merge_ppd_data':
gtkprintbackendpapi.c:771: warning: implicit declaration of function `get_ppd_attrs'
gtkprintbackendpapi.c: In function `papi_display_printer_status':
gtkprintbackendpapi.c:794: warning: unused variable `printer_uri'
gtkprintbackendpapi.c:794: warning: unused variable `ppdfile'
gtkprintbackendpapi.c:799: warning: unused variable `count'
gmake[4]: *** [gtkprintbackendpapi.lo] Error 1
gmake[4]: Leaving directory `/software/pkgsrc/source/pkgsrc/x11/gtk2/work.spare280/gtk+-2.16.2/modules/printbackends/papi'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/software/pkgsrc/source/pkgsrc/x11/gtk2/work.spare280/gtk+-2.16.2/modules/printbackends'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/software/pkgsrc/source/pkgsrc/x11/gtk2/work.spare280/gtk+-2.16.2/modules'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/software/pkgsrc/source/pkgsrc/x11/gtk2/work.spare280/gtk+-2.16.2'
gmake: *** [all] Error 2
*** Error code 2

Configuring with "--disable-papi" yields a working library, without PAPI support, though.
Comment 1 Matthias Clasen 2009-06-23 14:15:43 UTC
Ghee, can you look at this ?
Comment 2 Ghee Teo 2009-06-23 14:30:41 UTC
Ok. Taking a look atm.
Comment 3 Ghee Teo 2009-06-23 15:03:03 UTC
Jorn,

What version of Solaris 10, do you have?
cat /etc/release

I tried gcc and build fine on Solaris nevada (which is Solaris after Solaris 10)
gcc --version
gcc (GCC) 3.4.3 (csl-sol210-3_4-20050802)

I am wondering whether this is a gcc differences or libpapi differences. I checked the papi package, SUNWpapi, it is in Solaris 10. Can you give me, 

pkginfo -l SUNWpapi


Thanks,

-Ghee
P.S. Have not tried to compile these code on Solaris 10 since it is not one configuration we support.

Comment 4 Ghee Teo 2009-06-24 14:47:26 UTC
Okay. There is a problem with that line:

   354    papi_status_t pstatus = NULL;

papi_status_t is enum, so should be initialized to NULL.

I will make the change and clean up whole punch of unused variables.
Since like all these inconsistencies are icked up by GCC 3.4.6, but bit 3.4.3.

Comment 5 Ghee Teo 2009-06-24 15:58:45 UTC
Created attachment 137324 [details] [review]
patch to fix this compiler problem
Comment 6 Ghee Teo 2009-06-24 15:59:50 UTC
Matthias, please see patch attached. 
If you are okay, I will commit.
Thanks.
Comment 7 Jörn Clausen 2009-06-29 13:20:46 UTC
For the record: I get the same error both on Solaris 10 (Solaris 10 10/08 s10x_u6wos_07b X86) and OpenSolaris (OpenSolaris 2009.06 snv_111b X86).

The patch allows me to compile GTK, but I can't test the functionality of this printing backend.
Comment 8 Ghee Teo 2009-07-01 09:00:37 UTC
(In reply to comment #7)
> For the record: I get the same error both on Solaris 10 (Solaris 10 10/08
> s10x_u6wos_07b X86) and OpenSolaris (OpenSolaris 2009.06 snv_111b X86).
> 
> The patch allows me to compile GTK, but I can't test the functionality of this
> printing backend.

Do you mean you can't test on Solaris 10 or both?

I don't think you can test much of these on Solaris 10, since most of the application on Solaris 10 uses libgnomeprint backend not GTK+ print backend. The version of GNOME in Solaris 10 is GNOME 2.6.

There is no reason for you to compile for OpenSolaris 2009.06 though since it already have both print backend for CUPS and PAPI.


Matthias, any comment on the patch?

Thanks
> 

Comment 9 Timothy Arceri 2013-10-03 21:42:47 UTC
Created attachment 256424 [details] [review]
Fix Solaris build issue

I have created an update patch and broken it into three parts
Comment 10 Timothy Arceri 2013-10-03 21:44:18 UTC
Created attachment 256425 [details] [review]
Remove unused variables
Comment 11 Timothy Arceri 2013-10-03 21:44:56 UTC
Created attachment 256426 [details] [review]
Remove unused function
Comment 12 Matthias Clasen 2013-10-04 23:40:33 UTC
Review of attachment 256424 [details] [review]:

ok
Comment 13 Matthias Clasen 2013-10-04 23:40:49 UTC
Review of attachment 256425 [details] [review]:

sure
Comment 14 Matthias Clasen 2013-10-04 23:41:11 UTC
Review of attachment 256426 [details] [review]:

ok
Comment 15 Matthias Clasen 2013-10-06 05:27:25 UTC
Attachment 256426 [details] pushed as c759cb7 - Remove unused function