[comp.os.minix] MacMinix kernel building difficulties

paul@ukpoit.co.uk (Paul Wood) (12/12/90)

I recently posted the following ...

> My mac has 4mb of memory, no inits, etc.
> While making the kernel, actually making idle.c, I got the following message:
>     "/usr/include/mac/Resources.h", line 54: fatal error - out of memory
>     make: Error Code 256
>
> I would have thought that 4mb was enough. BTW I tried it with disk cache off
> as well as disk cache on with 1mb.
>
> Help Please!

I have investigated a bit further, so here are my findings ...

It appeared that cc was running out of memory, so quickly turning to the manual
page I discovered the -F option, perhaps this would help, unfortuately it is
marked [IBM], so I did the next best thing, I amended the Makefile-s in
/usr/src/kernel, fs and mm, as follows:
    CPP=/usr/lib/cpp
    CPPFLAGS=-DACK
    CFLAGS=-DACK -T.

    .c.o:
	    $(CPP) $(CPPFLAGS) $*.c > $*.i
	    $(CC) $(CFLAGS) $*.i -c -o $*.o
	    rm -f $*.i

    .s.o:
	    $(CC) $(CFLAGS) $*.s -c -o $*.o

This had the effect of splitting up the cc into a cpp followed by a cc without
the cpp phase (I hope! The manual is somewhat lacking in a full description of
the parameters which each phase of cc uses. Can someone post this info?).

Also I changed the sizes of the following:
    /usr/lib/cpp        100000
    /usr/lib/cem        150000
    /usr/lib/cv          50000
    /usr/bin/rmaker     300000 and eventually 600000 (see below)

Does anybody have any better recommendations for the size of the above. I guess
that these would be machine specific. I have a MacPlus with 4MB memory and a
20MB harddisk (root 200KB, /usr 13MB, /tmp 1MB).

With the above changes the make process went much smoother. This is not to say
that nothing went wrong. After a make failure I entered another make, and if
that failed I entered the following:
    make -n > /tmp/m
    sh /tmp/m

This seems to suggest that the problem lies with where make calls the various
programs, and subsequently receives their exit codes (I think anyway).

I had problems with rmaker. Applying the fix which was posted recently solved
some of the problems, but it was difficult to decide what size to make it, so
I amended the fatal call as follows:
    fatal("Exhausted mem. Requested Mem=%ld\n",size);

Then at least I knew how much memory was being requested (sometimes as much as
375000 bytes). chmem-ing rmaker solved these problems. Then I had finally made
the NEWminixboot program. Wheeew! Next I changed the minix/config.h, but that is
another story ... ... ...

Paul Wood           | UUCP Mail:  paul@ukpoit.co.uk   |
31 Buttermere Drive | Bang-Style: ...!ukc!ukpoit!paul |
Dronfield Woodhouse | Voice:      +44 246 214256      |
Sheffield           | FAX:        +44 246 214353      |
England S18 5PX     |