Subject: pkg/5739: bugfix for pkgsrc/x11/lesstif/Makefile
To: None <>
From: None <>
List: netbsd-bugs
Date: 07/11/1998 03:01:22
>Number:         5739
>Category:       pkg
>Synopsis:       missing configuration option in pkgsrc/x11/lesstif/Makefile
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 10 18:05:02 1998
>Originator:     Stefan Hensen
>Release:        Makefile,v 1.23 1998/07/03
System: NetBSD amiga1 1.3 NetBSD 1.3 (A4K_060_FLZ3_CV64) #2: Mon Apr 20 21:22:55 MEST 1998 root@amiga1:/usr/src/sys/arch/amiga/compile/A4K_060_FLZ3_CV64 amiga


With Lesstif versions 0.85-0.85.3 compiled with the NetBSD Packages System
(pkgsrc/x11/lesstif), some strange problems occured with an application
program that worked correctly with earlier Lesstif versions compiled
without the package system. The application program (Xmgr 4.1.2, not yet in
the packages system) crashed in certain situations with error messages like
the following:

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  12 (X_ConfigureWindow)
  Value in failed request:  0x0
  Serial number of failed request:  10768
  Current serial number in output stream:  10800

I found a solution (see below) by comparing the configuration options used
in the package makefile with those that I had used for the earlier Lesstif
versions. Although I have tested this only with Xmgr so far, it is probably
also relevant for other applications that depend on Lesstif (that's the
reason why I send this PR).


For example, starting Xmgr, loading an existing plotfile and selecting
'Symbols' from the 'Plot' menu generates the described error. If the
'Symbols' dialog box is opened before loading any data, the error does not
occur. The behaviour is reproducible for both situations. The same happens
also with some other menu items / dialog boxes.


The described problems can be solved by compiling Lesstif with the
configuration option '--enable-production'. Therefore, the following line
should be added to the package makefile (pkgsrc/x11/lesstif/Makefile):

CONFIGURE_ARGS+= --enable-production

This also reduces the size of by about 200 kB and makes several
operations significantly faster.

I do not know the exact reason for the problems, but it seems to be some
sort of conflict between the debugging version of Lesstif, that is build by
default, and the compiler's optimization, that is turned in the package
makefile. (As the packages are mainly meant for end users, I see no reason
for building a debugging version by default instead of an optimized one.)