Xprint segfault: init function missing
Drew Parsons
dparsons at debian.org
Wed Dec 28 15:29:54 PST 2005
On Fri, 2005-12-23 at 13:50 -0500, Adam Jackson wrote:
> InitPrintDrivers is passing in a NULL vpr because GetDimFuncAndRec isn't
> filling it in. Which, presumably, is because either driverInits is
> zero-sized or because the driver name isn't matching. Breakpoint on
> GetDimFuncAndRec and a little snooping should tell you which one it is.
>
I've followed the Xprt difficulties through and finally got a working
version, with which I can print from firefox (yay!)
I'll summarise here the latest changes I had to add to get here.
1) xorg/Xprint/Makefile.am:
Add -DXPRASTERDDX -DXPPCLDDX -DXPPSDDX
and together with them
../mfb/libmfb.la ../mi/libmi.la ../cfb32/libcfb32.la ../cfb/libcfb.la ../Xext/libXext.la
(the cfbs are only used by the PCL DDX)
2) When PCL uses cfb, it refers to ldl_u, which is defined in
compiler.h (found in xorg/hw/xfree86/common). Previously a symlink had
been made from xorg/includes to this file. I thought it simpler to
#include it explicitly in cfb/cfbmskbits.h, wrapped in #ifdef XPRINT.
3) -DLBX -DXAPPGROUP -DXCSECURITY -DSMART_SCHEDULE -DXPRINT had
previously been defined in the build. XPRINT is used in several places,
while the others are used to define ClientRec in
xorg/includes/dixstruct.h. I added them to SERVER_DEFINES in the "if
XPRINT == yes" block in xorg/configure.ac.
4) Since I switched on -DLBX in step 3), I also had to use --enable-lbx
in the autogen.sh step. I'm not sure if -DLBX should be added to
SERVER_DEFINES in the "LBX=yes" block in configure.ac rather than the
XPRINT block.
5) changed #include "Print.h" in mi/miinitext.c to
<X11/extensions/Print.h>
This (together with the changes I reported previously) was sufficient to
obtain a working Xprt binary. I used
./autogen.sh --prefix=/opt/xorg-modular/ --enable-xprint=yes
--disable-glx --disable-xinerama --disable-dri --disable-composite
--enable-lbx
I suspect I can now proceed without the --disable-xinerama --disable-dri
--disable-composite flags, I will try that next. This has been a
bare-bones build without freetype and without glx, I will try to add
them (especially freetype) next. Without freetype the output is
basically ugly.
I would now like to prepare a clean diff to be applied to CVS. Could I
kindly ask someone with write access to agree to apply it (with review)?
Tell me if you want the diff posted here on the mailing list or
elsewhere. I'll make it when I return from holidays in the new year.
Drew
More information about the xorg-modular
mailing list