XPrint will not compile under the Qt build of Mozilla due to a dependency on gdk/gdk.h (via nsXPrintContext.h, nsFontMetricsXlib.h and, finally, nsGCache.h). Until this is fixed the Qt Build should be configured with the --disable-xprint option.
swapping QA<-->owner as usual, fixing OS s/Win95/Linux/ - Xprint is X11-based (and therefore a Unix/Linux only thing (usually)), setting target milestone 0.9.3 - ASAP (starting with tuesday...)...
Accepting bug. Reporter... I do not have Qt-toolkit on my box (Solaris SPARC). Wanna help me with the patches by testing them, please ?
I would be more than happy to test the build part of things (I'm the Qt Mozilla module owner, so the faster this is fixed, the fewer times I have to pass the work-around on to users), but if you want me to test actual printing, I will not be able to help, since I'm doing this work on my own time and equipment, which does not include a printer (or a budget to acquire one 8^). BTW, I'm pretty sure Qt/X11 (aka Qt/Free) will compile on a SPARC - I have some bugs from an UltraSPARC user filed against the Qt build.
The problem appears to be as simple as it is picking up the wrong nsGCCache.h file. Index: gfx/src/xprint/Makefile.in =================================================================== RCS file: /cvsroot/mozilla/gfx/src/xprint/Makefile.in,v retrieving revision 1.18 diff -u -r1.18 Makefile.in --- Makefile.in 2001/06/21 04:01:44 1.18 +++ Makefile.in 2001/06/21 19:49:48 @@ -81,8 +81,7 @@ $(NULL) INCLUDES += \ - -I$(srcdir)/../gtk \ + -I$(srcdir) \ -I$(srcdir)/../xlib \ -I$(srcdir)/../xlibrgb \ - -I$(srcdir)/../xprint \ $(NULL)
I'll attach a patch in the next hour. CC'ing cls as StaticBuild&Makefile.in expert because I'm fixing another issue which breaks Xprint in Xlib-toolkit Mozilla.
Changes: - Qt-toolkit should work now due fixes in xprint/Makefile.in - Fixed Xprint crash in Xlib-toolkit due used of shared xlibrgb. Currently Xlib-toolkit and Xprint needs each their own set of global variables. This will be fixed by bug 85527 ("Turn xlibrgb into a shared library")... - Increated GC-cache size in Xprint land from 10 to 16 to improve printing speed and complex page rendering - Removed "#define DEBUG 1" in Xlib-toolkit nsGCCache.h - no DEBUG stuff in non-debug builds, please - removed cls's workaround for duplicate symbols... -- snip -- -#ifdef _IMPL_NS_XPRINT -#define nsGCCache nsGCCacheXlib -#define GCCacheEntry GCCacheEntryXlib -#endif -- snip -- ...and replaced it with s/nsGCCache/nsGCCacheXlib/ and s/GCCacheEntry/GCCacheEntryXlib/ Requesting r=cls (does it work with StaticBuild stuff ?) and feedback from Qt-toolkit people...
I am still having problems building this under Qt on Debian Linux with GNU make and gcc. I get the following error after applying the patches, doing make clean, then configure, then make: xprintutil.c gcc -o xprintutil.o -c -DOSTYPE=\"Linux2.2\" -DOSARCH=\"Linux\" -DMOZ_REFLOW_PERF -DMOZ_REFLOW_PERF_DSP -DOJI -D_IMPL_NS_GFXONXP -DUSE_MOZILLA_TYPES -DUSE_XPRINT -D_IMPL_NS_XPRINT -D_BSD_SOURCE -I../../../dist/include -I../../../dist/include -I/usr/local/src/mozilla/dist/include/nspr -I. -I./../xlib -I./../xlibrgb -I/usr/X11R6/include -fPIC -I/usr/X11R6/include -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -pedantic -Wno-long-long -pipe -pthread -DDEBUG -DDEBUG_johng -DTRACING -g -I/usr/local/qt/include -DQT_GENUINE_STR -I/usr/X11R6/include -include ../../../config-defs.h -DMOZILLA_CLIENT -Wp,-MD,.deps/xprintutil.pp xprintutil.c xprintutil.c: In function `XpuGetPrinter2': xprintutil.c:99: warning: comparison between pointer and integer cpp0: .deps/xprintutil.pp: No such file or directory xprintutil.c: In function `XpuGetPrinter': xprintutil.c:134: warning: assignment makes integer from pointer without a cast xprintutil.c: In function `XpuSetContentOrientation': xprintutil.c:313: warning: control reaches end of non-void function make: *** [xprintutil.o] Error 1 make: Leaving directory `/usr/local/src/mozilla/gfx/src/xprint' make: *** [install] Error 2 make: Leaving directory `/usr/local/src/mozilla/gfx/src' make: *** [install] Error 2 make: Leaving directory `/usr/local/src/mozilla/gfx' make: *** [install] Error 2 There also does not seem to be a .deps/ directory under gfx/src/xprint. I am not sure if this all represents a problem in XPrint or in my environment...
I cannot reproduce your problem on my system (Solaris 7 SPARC, GTK+-toolkit build with Sun Workshop 6U2EA2 and Xlib-toolkit build with gcc2.95.1)... ;-((
Roland, why are you adding all of those extra changes? The only thing that needs to be done is to remove gtk from the include path so that the proper nsGCCache.cpp gets pulled. Those other changes, while related, are not necessary to fix this bug.
cls: Sure... but I want to clean-up, too. And the fix for "Xprint crashes Xlib-toolkit Mozilla" collides with this patch, therefore I integrated it into this one... Sorry... I just wanted to get rid of these bugs... ;-(
John C. Griggs: Does your build work with cls(=Christopher Seawood)'s patch ? If yes - then we should check-in that solution and file a new patch for the remaining issues, OK ?
firstname.lastname@example.org looks logical to me and builds
a=tor for 0.9.2 branch and trunk on cls' 2001-06-21 12:52 patch.
Filed bug 87468 for the remaining issues listed here (see http://bugzilla.mozilla.org/showattachment.cgi?attach_id=39668) - except griggs's build dependicy issue - this is bug 87422...
Fix checked in, marking bug as "FIXED"...
Can someone verify this bug, please. I do not have Qt-toolkit installed on my box - and I assume katakai does not have it, too. QA wanted... :-)
I backed out Roland's patch, updated from CVS (at 8:8:59 EDT this morning), reconfigured and built and everything seems fine now. There is still no .deps directory under gfx/src/xprint, but all of the objects appear to have compiled properly and the program runs. Note that I can only comment on the fact that it built - I have no printer to test whether the code is actually complete and functional.
Which patch did you back out (bugid) ?
John C. Griggs: BTW: Your special case got an own bug, please please post infos to bug 87422... Thanks !!
Roland - 1) The patch I manually applied and backed out was the one attached to this bug. I am now assuming I must have messed up in applying the bug, somehow... 2) I don't see anything in Bugzilla #87422 that has anything to do with Qt and I am not CC'ed (or otherwise affiliated) with this bug at all. Are you sure that is the correct ID?
> 1) The patch I manually applied and backed out was the one attached to this > bug. I am now assuming I must have messed up in applying the bug, somehow... Erm... my patch was _never_ applied to CVS. Instead cls's patch (which is included in this bug's "description" (search for "Christopher Seawood 2001-06-21 12:52")) was applied to "trunk". > 2) I don't see anything in Bugzilla #87422 that has anything to do with Qt No... AFAIK it's a pure build stuff issue. Something in build stuff is going wrong. Issues for _building_ Qt-toolkit have been (AFAIK) solved (include issues) - now we're going to hunt this issue(=bug 87422)... > and > I am not CC'ed (or otherwise affiliated) with this bug at all. Are you sure > that is the correct ID? Please take a look at attachment http://bugzilla.mozilla.org/showattachment.cgi?attach_id=39805 which is part of bug 87422: The attachment ends with -- snip -- [... ... blah blah... ...] gcc -o xprintutil.o -c -DOSTYPE=\"Linux2.2\" -DOSARCH=\"Linux\" -DOJI -D_IMPL_NS_GFXONXP -DUSE_MOZILLA_TYPES -DUSE_XPRINT -D_IMPL_NS_XPRINT -D_BSD_SOURCE -I../../../dist/include -I../../../dist/include -I/ext2d/mozilla/mozilla/dist/include/nspr -I./../gtk -I./../xlib -I./../xlibrgb -I./../xprint -I/usr/X11R6/include -fPIC -I/usr/X11R6/include -Wall -W -Wno-unused -Wpointer-arith -Wcast-align -pedantic -Wno-long-long -pipe -pthread -DNDEBUG -DTRIMMED -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/X11R6/include -include ../../../config-defs.h -DMOZILLA_CLIENT -Wp,-MD,.deps/xprintutil.pp xprintutil.c cpp: .deps/xprintutil.pp: No such file or directory xprintutil.c: In function `XpuGetPrinter2': xprintutil.c:99: warning: comparison between pointer and integer xprintutil.c: In function `XpuGetPrinter': xprintutil.c:134: warning: assignment makes integer from pointer without a cast xprintutil.c: In function `XpuSetContentOrientation': xprintutil.c:313: warning: control reaches end of non-void function -- snip -- I assume this is your problem, right ?
> Erm... my patch was _never_ applied to CVS. Instead cls's patch (which is > included in this bug's "description" (search for "Christopher Seawood > 2001-06-21 12:52")) was applied to "trunk". Roland, I applied your patch manually (using "patch") last Friday after grabbing it from this bug report in order to test it. Today I moved the patched files aside and updated from CVS (apparently picking up cls' patch in the process). With your patch in place I was getting the errors I posted here (and which you repeat in your last comment), but now everything seems to be working fine, from a Qt build perspective anyway... Bottom line: the Qt build issues that caused me to open this bug originally and the other problems I had after applying your patch appear to be resolved by the code currently in CVS.
OK... assuming I understand you correctly: Bug squished&&dead in todays CVS ? If yes --> please "verify" it... :-)
Qt is now building with XPrint enabled. I have no printer, so I have no idea if the code works or not - just that it builds. I am marking this bug verified, since no one else seems to be in a position to test it.
John C. Griggs: 1. Thanks! 2. The code compiles now for Qt-toolkit - but I am pretty sure that currently the Qt-port cannot use the Xprint module - some glue is still missing (that one which "enables" the module). Wanna file a bug for Qt-toolkit port and CC: me, please ? I can only give hints due lack of installed Qt-toolkit - but the missing code is AFAIK very trivial (once upon the time I ported it to Xlib-toolkit... :-) 3. s/XPrint/Xprint/ :-))