Subject: Re: Issues with X11R6 native on NetBSD/sparc
To: None <scion@symtec.com>
From: Greg Earle <earle@isolar.Tujunga.CA.US>
List: port-sparc
Date: 09/29/1994 16:41:22
> The entire X11R6 build on my IPC with 12 MBytes RAM took just under 11 hours.

Mine was 10 1/2:

Sun Sep  4 16:32:25 PDT 1994
Mon Sep  5 03:00:10 PDT 1994

> I am in the middle of bringing X11R6 up on an IPC with a CG6 running 
> the August 10 snapshots of 1.0_beta.

Does a CG6 work?  With X11R6?  I'm about to do a hardware swap and will use
an IPC with 36 Mb and a GX (present is 24 Mb and a CG3) if it works ...

> I applied fixes 1-4; then the patch supplied by Greg Earle.

I suggest applying fix-05 as well.

The good news with fix-05 is that it only alters 2 files that are changed by
the Aussie patches (and thus by my twiddled-for-fix-04 patches).  Those are
sun.h and sunInit.c down in xc/programs/Xserver/hw/sun.

You can apply fix-05 by going down in there to that directory, and move the
NetBSD-ized sun.h and sunInit.c out of the way (i.e., move the Consortium
.orig's back temporarily).  Once you've done that, you can apply fix-05.
You'll then have to go back and re-patch (NetBSD-ize) sun.h and sunInit.c
manually.

If you haven't done this already (i.e., applied the NetBSD patches to an
up-to-fix-04 R6), then you can use the twiddled-for-fix-04 stuff I posted,
with one tiny change:

netbsd4me# diff -rc1 X11R6_NetBSD_sparc_patches.thru_fix-04 X11R6_NetBSD_sparc_patches.thru_fix-05
*** X11R6_NetBSD_sparc_patches.thru_fix-04      Sat Sep  3 20:46:15 1994
--- X11R6_NetBSD_sparc_patches.thru_fix-05      Thu Sep 29 16:06:37 1994
***************
*** 192,194 ****
  ***************
! *** 274,280 ****
    
--- 192,194 ----
  ***************
! *** 276,282 ****
    
***************
*** 200,202 ****
        char* /* arg */
! --- 283,289 ----
    
--- 200,202 ----
        char* /* arg */
! --- 285,291 ----
    
i.e., in the very last fix for "sun.h", bump up the line numbers by 2.

Then you can apply the NetBSD patches and be on your way.

> Some problems (2&3) are fatal, some are warnings which I have
> successfully ignored before.
> 
> 1. warning making imake right off the bat.
> 
>     imake.c: In function `LogFatal':
>     imake.c:513: warning: type mismatch with previous external decl
>     /usr/include/stdio.h:236: warning: previous external decl of `sys_errlist'

I got this too and ignored it.  imake.c declares it "char *"; stdio.h says
"const char *".  #ifdef __NetBSD__ it if you care.

> 2. Makefiles in programs/xdm/config and programs/xinit are broken
> 
>     making all in programs/xdm/config...
>     "Makefile", line 5: Need an operator
> 
>     making all in programs/xinit...
>     "Makefile", line 5: Need an operator

Hmmn, this didn't happen to me ... I wonder if the SharedXmuReqs change to
bsdLib.tmpl, perhaps?  (I didn't make that change when I built it originally)

Sometimes you get this error if you have spaces instead of a tab as the first
whitespace on a dependancy line ...

The other check is more basic - is the Imakefile (or Makefile) mangled?

The top of both Makefiles should just have comments in them:

netbsd4me# head programs/xinit/Makefile
# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.89 94/08/12 00:45:51 gildea Exp $

# -----------------------------------------------------------------------
# Makefile generated from "Imake.tmpl" and <Imakefile>
# $XConsortium: Imake.tmpl,v 1.219 94/05/13 15:58:31 matt Exp $
#

.SUFFIXES: .i

netbsd4me# head programs/xdm/config/Makefile
# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.89 94/08/12 00:45:51 gildea Exp $

# -----------------------------------------------------------------------
# Makefile generated from "Imake.tmpl" and <Imakefile>
# $XConsortium: Imake.tmpl,v 1.219 94/05/13 15:58:31 matt Exp $
#

.SUFFIXES: .i

Line 5 in both is "# Makefile generated from "Imake.tmpl" and <Imakefile>".

> 3. cannot find Wraphelp.c when depending in lib/X11
> 
>     ../../config/makedepend/makedepend: warning:  cannot open "Wraphelp.c"
>     depending in lib/X11...
>     make: don't know how to make ../../lib/Xdmcp/Wraphelp.c (continuing)
>     `depend' not remade because of errors.

Ah, you got bitten by the "crypt" Secret Hidden File Trick :-)

There's a file hidden in ftp.X.ORG's FTP tree that you can grab iff you're in
the US that you're supposed to install as xc/lib/Xdmcp/Wraphelp.c first.
Read the RELNOTES:

3.4.  Configuration Parameters

...
The file xc/lib/Xdmcp/Wraphelp.c, for XDM-AUTHORIZATION-1, is not included
in this release.  The file is available within the US; for details get
/pub/R6/xdm-auth/README from ftp.x.org via anonymous FTP.

> 4. a number of times the call to select warns as so:
> 
>     XlibInt.c: In function `_XWaitForWritable':
>     XlibInt.c:252: warning: passing arg 2 of `select' from incompatible
>     pointer type
>     XlibInt.c:252: warning: passing arg 3 of `select' from incompatible
>     pointer type
> 5. a smaller number of the old faithful:
> 
>     lcWrap.c: In function `_XlcCopyFromArg':
>     lcWrap.c:466: warning: cast from pointer to integer of different size
> 
> 6. a couple of variable range errors:
> 
>     XSync.c: In function `XSyncInitialize':
>     XSync.c:262: warning: comparison is always 1 due to limited range of data
>     type

Got these and ignored them.  (-:

> At the end, libXdcmp, libsun and libX11 do not get made, thus no executable
> ( save a few utils) does either.

Fetch the Wraphelp.c file and rebuild, that'll get you libX11 which will get
you the rest (libXdmcp at least).

> I am going to ad an argument of YES to the #defines in site.cf to see if
> that brings joy to xdm/config and xinit's Makefile. 

I suggest you check the Imakefile and Makefile for spaces vs. tabs, although
it would help if you told us just what *is* on line 5 of your Makefiles ...