From: bab@se39.wg2.waii.com (Brian Button)
Newsgroups: alt.lucid-emacs.help
Subject: What's the trick to building 19.3 for Sparc2?
Date: 16 Nov 92 14:50:52 GMT
Organization: Western Geophysical Exploration Products

There has got to be a trick to building lemacs-19.3 to use Motif on a
Sparc2 :) I'm trying to build it under SunOS4.1.1, using gcc-2.2.2, and
Motif widgets.

I start by building lwlib. In the Imakefile, I comment out USE_LUCID, and
define USE_MOTIF. I've tried it with INCLUDE_EXTENSIONS defined and not
defined, setting WHICH_X to /usr/public/X/X11R5. After running xmkmf, I go
into the Makefile and change this to reference gcc rather than cc. 
This includes changing :

	CC 		= gcc
	CPP 		= /usr/lang/SC1.0/cpp
	PREPROCESSCMD 	= gcc -E $(STD_CPP_DEFINES)
	ALLINCLUDES	= -I/usr/Navigator/include 		\
			  -I/home/bab/tmp/gcc-include 		\
			  $(INCLUDES) $(EXTRA_INCLUDES) 	\
			  $(TOP_INCLUDES) $(STD_INCLUDES

and in the makefile command sections,

	CC		= gcc
	WHICH_X		= /usr/public/X/X11R5

When I run "gmake clean all", I get a bunch of warnings :

lwlib-Xm.c: In function `destroy_all_children':
lwlib-Xm.c:158: warning: passing arg 1 of `XtFree' from incompatible pointer type
lwlib-Xm.c: In function `make_menu_in_widget':
lwlib-Xm.c:371: warning: passing arg 1 of `XtFree' from incompatible pointer type
lwlib-Xm.c: In function `xm_update_menu':
lwlib-Xm.c:459: warning: passing arg 1 of `XtFree' from incompatible pointer type

I've looked at these warnings, and they are from passing XtFree a Widget*
instead of a widget. This shouldn't matter, since the object at that address
is a widget anyhow. The warnings are a little disconcerting, though :(

After lwlib.a is built, I go up one level to src, and start defining 
config.h. I make these modifications to that file:

Comment out the stuff about using GNU_MALLOC.
Use s/s-sunos4.h, m/m-sparc.h
Uncomment #define LWLIB_USES_MOTIF
Uncomment LD_SWITCH_SITE and set it to
  LD_SWITCH_SITE -L/usr/Navigator/lib -L/usr/wgep/mbin/gcc-lib/sparc/2.2.2
Uncomment C_SWITCH_SITE and set it to
  C_SWITCH_SITE -I/usr/Navigator/include -I/home/bab/tmp/gcc-include
(gcc-include is a directory build with fix-includes)

Then I run gmake clean all, and I get the following warnings:

event-Xt.c: In function `emacs_Xt_select_process':
event-Xt.c:1290: warning: passing arg 3 of `XtAppAddInput' makes pointer from integer without a cast

gcc -g   -I/usr/Navigator/include -I/home/bab/tmp/gcc-include  -Demacs  -I./lwlib  -c  menubar.c
In file included from /usr/include/signal.h:15, from events.h:185, from menubar.c:29:
/home/bab/tmp/gcc-include/sys/signal.h:271: warning: `sigmask' redefined
xterm.h:113: warning: this is the location of the previous definition

gcc -g   -I/usr/Navigator/include -I/home/bab/tmp/gcc-include  -Demacs  -I./lwlib  -c  ScreenWidget.c
ScreenWidget.c:139: warning: initialization of `emacsScreenClassRec.core_class.initialize' from incompatible pointer type
ScreenWidget.c:139: warning: initialization of `emacsScreenClassRec.core_class.set_values' from incompatible pointer type

And the worst failure happens when I try to link, and I get a bunch of 
unresolved references for functions which are defined in lwlib/energize
and referenced in lwlib. Since I'm not using energize, why are these 
being called?

Does anyone have any suggestions about what I may be doing wrong? I've 
tried stubbing out these energize functions, but then I'd core dump
as soon as I started to run lemacs.

HELP!!

bab
--
|-----------------------|----------------------------------------------------|
| Brian Button          | email : button@wg2.waii.com                        |
| Design Engineer       |         71023.276@compuserve.com                   |
| Western Geophysical   | voice : (713)964-6221                              |
| 3600 Briarpark        |----------------------------------------------------|
| Houston, Texas  77042 |                  Opinions Be Mine!!                |
|-----------------------|----------------------------------------------------|
x-gateway: rodan.UU.NET from help-lucid-emacs to alt.lucid-emacs.help; Sun, 22 Nov 1992 15:51:45 EST
Date: Sun, 22 Nov 1992 12:51:40 PST
X-Windows: Don't get frustrated without it.
From: jwz@lucid.com (Jamie Zawinski)
Subject: Re: Problems with lemacs on Sparc 10
	<1992Nov22.060255.23045@lucpum.it.luc.edu>
Newsgroups: alt.lucid-emacs.help