Compiling Xaw3d 1.5

Cynthia Higginbotham cyhiggin at
Thu Feb 26 09:53:54 PST 2004

Greetings! I ran into a small problem compiling Xaw3d 1.5, which I solved,
but I'd like to share the problem and solution. However, I would like someone
to confirm that this is a general problem and not just some oddity of my 
personal BLFS setup before I become so bold as to submit an "official" BLFS
hint & patch...

I wanted Xaw3d support for my Emacs build, as I prefer the 3d look to flat
Athena widgets, so I found what appeared to be the latest version on, Xaw3d-1.5.tar.gz. 


Xaw3d is meant to be built in the X source tree, alongside the Xaw lib.  If 
you don't unpack and build Xaw3d when you build the rest of your X source, 
you have to re-unpack the X source and re-compile it, so that tools like 
imake exist. You do not have to re-install your whole X build, though.


the build instructions in README.XAW3D have a serious
typo that prevent a successful build:

    This will create the directory .../xc/lib/Xaw3d.  'cd' there and
    enter the following commands:

../../config/imake/imake -I../../config/cf -DTOPDIR=../.. 
The config line SHOULD read:
../../config/imake/imake -I../../config/cf -DTOPDIR=../.. -DCURDIR=lib/Xaw3d

With the corrected command line, your configuration will configure. 
Unfortunately, your make will blow up over a 'missing' header file...


On my BLFS system (LFS 5.1-PRE1 & BLFS 5.0, plus other things), I built in 
language support for X (i.e., X will use wide characters if necessary). The 
configuration process correctly set some internal defines, HAS_WCTYPE_H
and NO_WIDEC_H; however, the file XawI18n.h in the Xaw3d source failed
to check for NO_WIDEC_H and tried to include widec.h anyway. 

The following patch, derived from examination of the corresponding file 
in ./xc/lib/Xaw,  fixed that problem.

diff -Naur Xaw3d/XawI18n.h Xaw3d.patched/XawI18n.h
--- Xaw3d/XawI18n.h	1996-10-15 09:41:26.000000000 -0500
+++ Xaw3d.patched/XawI18n.h	2004-02-26 10:34:42.000000000 -0600
@@ -29,11 +29,13 @@
 #ifdef HAS_WCTYPE_H
 #include <wctype.h>
+#ifndef NO_WIDEC_H
 #include <widec.h>
 #define wcslen(c) wslen(c)
 #define wcscpy(d,s) wscpy(d,s)
 #define wcsncpy(d,s,l) wsncpy(d,s,l)
 #ifdef HAS_WCHAR_H
 #include <wchar.h>

Cynthia Higginbotham     cyhiggin at republicofnewhome dot org

More information about the blfs-support mailing list