From xemacs-m  Thu Jan  9 01:26:38 1997
Received: from caviar.cv.ruu.nl (caviar.cv.ruu.nl [131.211.144.138])
          by xemacs.cs.uiuc.edu (8.8.4/8.8.4) with ESMTP
	  id BAA15424 for <xemacs-beta@xemacs.org>; Thu, 9 Jan 1997 01:26:34 -0600 (CST)
Received: from triton.cv.ruu.nl (triton.cv.ruu.nl [131.211.144.150]) by caviar.cv.ruu.nl (8.7.5/8.7.3) with ESMTP id IAA05608; Thu, 9 Jan 1997 08:26:22 +0100 (MET)
Received: from hydra.cv.ruu.nl (hydra.cv.ruu.nl [131.211.144.158]) by triton.cv.ruu.nl (8.7.5/8.6.12) with ESMTP id IAA03103; Thu, 9 Jan 1997 08:28:31 +0100 (MET)
From: Karel Zuiderveld <Karel.Zuiderveld@cv.ruu.nl>
Received: (karel@localhost) by hydra.cv.ruu.nl (8.7.5/8.6.12) id IAA27676; Thu, 9 Jan 1997 08:25:31 +0100 (MET)
Message-Id: <199701090725.IAA27676@hydra.cv.ruu.nl>
Subject: Re: 20.0-b34: XIM problems on Irix 6.3
To: mrb@Eng.Sun.COM
Date: Thu, 9 Jan 1997 08:25:31 +0100 (MET)
Cc: Karel.Zuiderveld@cv.ruu.nl, xemacs-beta@xemacs.org
In-Reply-To: <199701082106.NAA21514@xemacs.eng.sun.com> from "Martin Buchholz" at Jan 8, 97 01:06:17 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text

> Karel> Warning during creation of the makefile:
> 
> Karel> cpp: warning junk.c:529: INPUT_METHOD_X_OBJS redefined
> 
> Sounds like your cpp doesn't grok #elif.  Given that it's hard to
> believe there's no native SGI solution to this, SGI folks should
> investigate further - does CPP=cc -E give the  desired result?
> 
> Here's the code in Makefile.in.in:
> 
> 
> #ifndef HAVE_XIM
> #define INPUT_METHOD_X_OBJS
> #elif defined(XIM_MOTIF)
> #define INPUT_METHOD_X_OBJS input-method-motif.o
> #else
> #define INPUT_METHOD_X_OBJS input-method-xlib.o
> #endif
> 
> 
> Probably all the elif's should be rewritten to use, eg.
> 
> #ifndef HAVE_XIM
>   #define INPUT_METHOD_X_OBJS
> #else
>   #if defined(XIM_MOTIF)
>     #define INPUT_METHOD_X_OBJS input-method-motif.o
>   #else
>     #define INPUT_METHOD_X_OBJS input-method-xlib.o
>   #endif
> #endif
> 
> but that upsets the XEmacs maintainers' fragile sense of esthetics...
> 
> Brand new SGI's simply can't be this broken.

Eh, they are. 

I got b34 running on Irix 6.3. but it was certainly not compile and
play.

1) The compiler doesn't grok #elif - or, to be more exact, after I 
   replaced #elif bij #if..#else as suggested above, the error I 
   reported disappeared.
2) The configure script tries to find libraries by checking specific 
   directories. On the SGI, we have three different types of
   API's (old 32 bit, new 32 bit, 64 bit); since configure has no 
   concept of "API mode" on the SGI, it only checks for libraries 
   in /usr/lib etc. 
   I usually develop in "new 32 bit" mode (-n32); in this environment,
   configure doesn't find the X11 libraries. 
   Fix: compile in "old 32" bit mode - set the environment variable 
   SGI_ABI to "-o32". 
3) And now for the fun part. Out of the box, configure recognized 
   that I had jpeg, tiff and png libraries in /usr/lib and happily 
   configured these image formats. 
   Compile & link went flawlessly, but starting xemacs immediately 
   gave a core dump. 
   Cause: SGI's libraries are supposed to be used with SGI's image
   library; unfortunately, this C++ library uses static C++ objects
   that have to be initialized. However, temacs is linked using cc 
   so there's no way that things will be properly configured. 
   To make a long story short: an auto-configured xemacs will
   immediately coredump.
   I therefore used
   ./configure  --prefix=/Packages/xemacs-20.0b34
    --site-includes=/net/include --site-libraries=/usr/freeware/lib
    -with-xim=no --with-dialogs=athena --with-png=no --with-tiff=no
    --with-gif=no --with-jpeg=no
   to get xemacs at least running.
   Moral: DO NOT USE SGI'S IMAGE LIBRARIES! Port jpeg/tiff/png 
   yourself and use the --site-libraries flag to prevent the 
   standard SGI libraries to be used. 

During the next week, I'll port the png/tiff/jpeg libraries myself
(as well as socks and other stuff) and try to recompile the next beta.

Karel

-- 
------------------------------------------------------------------------- 
Karel Zuiderveld, PhD                 E-mail: karel.zuiderveld@cv.ruu.nl
Department of Image Sciences E01.334  WWW: http://www.cv.ruu.nl/~karel 
Image Sciences Institute              Tel: +31-30-2507772 Fax: +31-30-2513399
University Hospital Utrecht, Heidelberglaan 100, NL-3584 CX Utrecht
---------------- If Murphy's law can go wrong, it will ------------------

