Subject: macppc, build.sh: sim is not built, so make gdb fails
To: None <current-users@netbsd.org>
From: David Young <dyoung@onthejob.net>
List: current-users
Date: 01/31/2002 02:49:48
I am building on macppc for macppc.

As root, I run the build command:

    sh build.sh -D /home/dyoung/.../obj -R /home/dyoung/.../release

Apparently, whichever of the two directories sim/ is the important one is
omitted from the build.  It is not ./configure'd or make'd. But the build
process tries to link gdb with -lsim. So nbmake fails in gdb/gdb.new/
with a link error. Darn.

I've worked around this by a long and torturous process that I am only
able to reconstruct from my command-line history, and I still may have
gotten it wrong. If someone is able to translate this history to a fix
in the build process, I will sure appreciate it! Here is my history,
polished and commented as best I can:

#
# Let's see if I can produce spreg.h 
#
cd ~/anoncvs/src/gnu/dist/toolchain/sim/ppc/

./configure

../../../../../tools/obj/tools.NetBSD-1.5ZA-powerpc/bin/nbmake-macppc

#
# at this point, spreg.h exists. Possibly -lsim has not built. In any case,
# I still have no gdb.
#
# I try building in a new directory:
#

cd ~/anoncvs/src/gnu/usr.bin/sim/

#
# I restore to initial conditions as best I can. Excuse my voodoo.
#

../../../tools/obj/tools.NetBSD-1.5ZA-powerpc/bin/nbmake-macppc cleandir

../../../tools/obj/tools.NetBSD-1.5ZA-powerpc/bin/nbmake-macppc obj

#
# I try to build. I'm missing igen. I copy it in. Missing dgen. I copy it in.
#

../../../tools/obj/tools.NetBSD-1.5ZA-powerpc/bin/nbmake-macppc

cp ~dyoung/anoncvs/src/gnu/dist/toolchain/sim/ppc/igen ./ppc/obj/.

../../../tools/obj/tools.NetBSD-1.5ZA-powerpc/bin/nbmake-macppc

cp ~dyoung/anoncvs/src/gnu/dist/toolchain/sim/ppc/dgen ./ppc/obj/.

#
# Success, at last!
#

../../../tools/obj/tools.NetBSD-1.5ZA-powerpc/bin/nbmake-macppc
 
Dave

-- 
David Young                   On the Job Consulting
dyoung@onthejob.net     Urbana, IL * (217) 278-3933