[comp.soft-sys.andrew] Problems installing ATK on DECstation 5000

henke@ipa.fhg.de (Juergen Henke) (09/25/90)

Short time ago Christer Bernerus (bernerus@birk.cs.chalmers.se) posted a
few hints on getting ATK built on a DECstation 5000, running Ultrix 4.0.

Some points i already figured out, some were new (to me).

Ok. I started to build the ATK from scratch, and ended in atk/basics/common.

I tried (in chronological order)

	- putting crt0.o in the ld command in makedo.csh and dofix.c

	- replacing the ld with cc (silly that, i know !)

	- building libcx.a again

No change !

The whole stuff in overhead built without errors.

----------------- result of a 'make Install' in atk/basics/common -----------
cc -Dvoid=int -G 0 "-Wl,-D,1000000" -c -I.  -O -I/usr/andrew/include/atk 
   -I/usr/andrew/include -I/usr/include/X11   environ.c
/usr/andrew/bin/makedo  -d /usr/andrew/lib -b /usr/andrew/bin 
                        -o environ.do  environ.o  /usr/andrew/lib/libutil.a
doindex: indexing environ.do ...doload:  Undefined symbol: __Argc
doload:  Undefined symbol: __Argv
doload:  Undefined symbol: _gp
doload:  Undefined symbol: main
doload:  Undefined symbol: sys_errlist
doload:  External R_GPREL relocation does not result in a gp addresable value.
doload:  Errors while processing
doindex: NULL entrypoint from environ.do...program terminated!
*** Error code 1
---------------- the end ----------------------------------------------------

Many, many thanks in advance,

Juergen.

____________________________________________________________
Juergen Henke (henke@IAO.FhG.de or juh_ipa@IPA.FhG.de)
Fraunhofer-Institut f. Produktionstechnik u. Automatisierung
Eierstrasse 46, D-7000 Stuttgart 1

bernerus@BIRK.CS.CHALMERS.SE (Christer Bernerus) (09/25/90)

Excerpts from info-andrew: 25-Sep-90 Problems installing ATK on ..
Juergen Henke@ipa.fhg.de (1599)

> 	- putting crt0.o in the ld command in makedo.csh and dofix.c

>> - building libcx.a again

Sorry, I wrote the last letter in quite a hurry, so a think I missed
some points:

This is my Imakefile in overhead/class/machdep/dec_mips:

    /*
    ********************************************************************** *\
     *         Copyright IBM Corporation 1988,1989 - All Rights Reserved      *
     *        For full copyright information see:'andrew/config/COPYRITE'     *
    \*
    ********************************************************************** */
    DependTarget()

    NormalObjectRule()
    NormalAsmPPRule()

    all:: globals.o entry.o doload.o

    globals.o: globalrefs._h

    entry.o: entry.s
            cc -c -I. entry.s

    globalrefs._h:  libc.eplist
                    $(AWK) '{printf "\tglobalref(%s)\n", $$2}'
    libc.eplist >,globalrefs._h
                    $(MV) ,globalrefs._h globalrefs._h

    libc.eplist:    $(MIPSLIBC_G0).a /lib/crt0.o getlist.awk
                    $(RM) /tmp/libhack.a
                    $(AR) /tmp/libhack.a /lib/crt0.o
                    $(NM) -go $(MIPSLIBC_G0).a /tmp/libhack.a | $(TR)
    ":" " " | \
                            $(AWK) -f getlist.awk >,libc.eplist
                    $(MV) ,libc.eplist libc.eplist
                    $(RM) /tmp/libhack.a

    InstallLibrary(libcx.a, $(DESTDIR)/lib)
    InstallFileToFile(makedo.csh,$(INSTPROGFLAGS),$(DESTDIR)/bin/makedo)

    all::           libcx.a

    DelList._:      libc.eplist
                    $(AWK) '{print $$1}' libc.eplist | $(SORT) -u > ,DelList._
                    $(MV) ,DelList._ DelList._

    errlst.o:       mkerrlst
                    ./mkerrlst >errlst.c
                    $(CC) -c errlst.c

    libcx.a:        $(MIPSLIBC_G0).a DelList._ errlst.o
                    rm -rf new
                    mkdir new
                            cd new;\
                            ar x $(MIPSLIBC_G0).a;\
                            cp ../errlst.o .;\
                            ar cq ,libcx.a *.o /lib/crt0.o;\
                            ar d ,libcx.a `cat ../DelList._`;\
                            $(RANLIB) ,libcx.a
                    $(MV) new/,libcx.a libcx.a
                    rm -rf new

    ProgramTarget(dofix,dofix.o,,)
    ProgramTarget(mkerrlst,mkerrlst.o,,)
    InstallProgram(dofix,$(DESTDIR)/bin)

    clean::
            $(RM) DelList._ libc.eplist globalrefs._h ,* libcx.a
    errlst.o errlst.c mkerrlst mkerrlst.o


This Imakefile makes sure that errlst.o will be included in libcx.a. 
Rebuild libcx.a and verify that errlst.o is there, it is definitely needed. 

Crt0.o is NOT needed in libcx.a. (I.e. it works better without it ... )
(Maybe you'll have trouble building runapp, then you'll have to link in
/lib/crt0.o explictily)

Btw,  ATK folks, what is libcx.a used for, I'm not sure I understand you
fully (:-))

Remove it with %ar d /usr/andrew/lib/libcx.a crt0.o and ranlib.

After this is done, try rebuilding environ.do

> The whole stuff in overhead built without errors.

(Without any reported errors, that is ... )



-------------------------------------------------------
Christer Bernirus 			! E-mail: bernerus@cs.chalmers.se
Chalmers University of Technology		! Phone: +46 31 721000
Department of Computer Science		! Ham radio: SM6FBQ	144.3 MHz
S-412 96 Gvteborg, SWEDEN