[plt-scheme] drscheme fails at runtime (linux, plt-scheme-4.2.5)

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu May 20 09:39:49 EDT 2010

My guess is still that the issue is a lack of support for old-style X11
fonts in the X server. If that's right, there's still the question of
why DrScheme is trying to use an old-style font.

When Xft is enabled, it looks like there's still an XLoadFont() call
via XCreateFontCursor(), which is used to get basic cursors like the
arrow and I-beam cursor. I don't think that's a likely culprit, but it
may be worth checking in gdb...


I expect that you will see the error when running `mred'. Can you try
using `gdb' to run `mred' with the `-synchronous' flag to find out what
X call is leading to the X_OpenFont message?

Using gdb would go something like this:

   % gdb mred
   (gdb) handle SIGSEGV nostop noprint
   (gdb) run -synchronous

The second line is needed because page protection and signal handlers
are used to implement write barriers. If you don't ignore SIGSEGVs,
then `mred' will appear to crash right away.

The above may not be enough to get gdb to interrupt the program when
it's about to exit with an X11 error. You may have to set breakpoints
on exit().

Thanks,
Matthew


At Wed, 19 May 2010 14:57:52 -0700, Imran Rafique wrote:
> Mathew (thanks for responding, btw),
> 
> Xft seems to be enabled.
> ''configure --help' says that xft support is enabled by default, and I
> didn't disable it manually (I only did --disable-shared)
> 
> $ pwd
> /home/imran/opt/plt-scheme/plt-4.2.5/src/build
> 
> $ grep -iC2 xft config.log
> configure:10964: result: yes
> configure:11241: checking for cairo_create in -lcairo
> configure:11276: g++ -o conftest -O2 -march=x86-64 -pipe    -pthread
> conftest.cpp -lcairo  -L/usr/lib64 -L/usr/X11R6/lib64  -lGL -lXrender -lXft
> -lXrender -lfontconfig -lfreetype -lX11   -lcairo   -ldl -lm  -ldl -lm
> -rdynamic >&5
> configure:11282: $? = 0
> configure:11300: result: yes
> --
> MREDLINKER='$(CXX)'
> MRLIBINSTALL='install-no-lib'
> MROPTIONS=' -DOPERATOR_NEW_ARRAY -DUSE_GL -DWX_USE_XRENDER -DWX_USE_XFT
> -DWX_USE_CAIRO -DWX_USE_LIBPNG -DWX_USE_LIBJPEG'
> MZBINTARGET='normal-bin'
> MZINSTALLTARGET='unix-install'
> --
> XMKMF=''
> X_CFLAGS=' -I/usr/include/freetype2   -I/usr/include/cairo
> -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12  '
> X_EXTRA_LIBS=' -lGL -lXrender -lXft -lXrender -lfontconfig -lfreetype -lX11
>   -lcairo   -lpng -lz -ljpeg'
> X_LIBS=' -L/usr/lib64 -L/usr/X11R6/lib64'
> X_PRE_LIBS=' -lSM -lICE'
> 
> 
> Regards,
>             Imran Rafique
> 
> 
> On Wed, May 19, 2010 at 5:20 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> 
> > At Tue, 18 May 2010 15:35:01 -0700, Imran Rafique wrote:
> > > The error msg is:
> > > X Error of failed request:  BadValue (integer parameter out of range for
> > > operation)
> > >   Major opcode of failed request:  45 (X_OpenFont)
> > >   Value in failed request:  0x5e0040b
> > >   Serial number of failed request:  14804
> > >   Current serial number in output stream:  14805
> > >
> > > [...]
> > >
> > > I'm guessing that there needs to be some post-install font configuration
> > > that needs to be done (mkfontdir?), but I don't see plt-scheme trying to
> > > install its own fonts anywhere (blindness on my part notwithstanding!).
> > Does
> > > plt-scheme install any of its own fonts for drscheme, or does it expect a
> > > specific font to already be available on the local x server (in which
> > case,
> > > which one is it?).
> >
> > No, PLT Scheme doesn't install any fonts.
> >
> > There are two font modes: old-stle X11 fonts and Fontconfig/Xft fonts.
> > The mode depends partly on the way that PLT Scheme is compiled (with Xf
> > support or not) and partly on what's available from the X server at
> > run-time.
> >
> > When you configure, does the configure script say that Xft support is
> > enabled?
> >


Posted on the users mailing list.