Subject: Compiling sources - advice sought
To: NetBSD Mailing List <port-arm32@netbsd.org>
From: Timothy Coltman <tim@auroral.freeserve.co.uk>
List: port-arm32
Date: 11/21/1998 23:26:42
Hello, experts

I decided to do something different from a change and compile arm32 from the
sources, downloaded from sunsite.doc.ic.ac.uk (normal NetBSD mirror), the
sources were dated 19981114. I didn't use CVS or SUP to download them,
just common FTP (xferred from Acorn to BSD using UnixFS). However, I have
a few questions (again). Perhaps the more knowledgable of you (ie most
people, I'm specifically asking the people who have been conversing on
the topic of ld.so which wouldn't work properly when installed, I think
Todd W and Todd V, maybe a few more ppl).

Anyway, I too ran into problems when the bugged ld.so installed, in that
everything stopped. Unfortunately this was before the 'DOA ld.so' thread
started on the mailing list and try as I may, I couldn't get my installation
working again and it got completely trashed :-))) [fortunately I had all my
packages backed up [phew]]. I've re-installed now, using the 19981001
snapshots, and I've decompressed all of the 19981114 sources into /usr/src
and I'm ready to start again.

Following (as best I could) various instructions, I downloaded the
following:

distrib/patch
gnu/patch
lib/patch
sys/patch
usr/sbin/patch

from the NetBSD FTP site mirror, and:

arm32-current/patch

from Todd W's site (ftp://ftp.toddpw.org/arm32-current.patch).

I fired up NetBSD and tried to apply the NetBSD patches. Several of them
barfed all over my nice newly formatted partition, so I then tried
Todd's patch, which worked better but which still complained
vociferously in the usual patch 'can't apply the patch correctly'
manner. The following didn't work (for me):

patches for	./gnu/usr.bin/ld/ld/ld.c
		./gnu/usr.bin/ld/ld/rrs.c
		./gnu/usr.bin/ld/rtld/rtld.c
		./lib/csu/c++/c++rt0.c
		
(relative to /usr/src, I cleared up the mess and just applied Todd's
patch)

When I looked at the files, they looked fine, and I managed to apply
the patches manually (by opening the .rej file in one virtual console
and the file-to-be-patched in another and switching between the two
(fun)). I can't see why patch failed.

Anyway, I tried again (after building compile_et and make_cmds) and it
died at a different point, when constructing libc - ld complaining
about various things. Hmmm.... this is fun.

However, I'm not really sure of what I'm doing, exactly. Help!

Can anyone provide me with a comprehensive guide to how to get the stupid
thing to work correctly? Everyone else seems to be getting on fine. Should I
update my sources? (fortunately my brother has a very fast connection at uni
so that's not too much of a problem, as he can download sources onto a zip
disc and mail it to me) Should I wait for a new snapshot (if any)? If I get
some newer sources, what should I do about applying the patches to them (as
the sources have changed (as far as I can see) since October 1.

My main reason for installing newer sources was because I found that
egcs is in the source tree, by randomly perusing the untarred sources
at the FTP site. Today I found out it'll still compile gcc 2.7.2.2 on
arm32. What's the status of egcs on arm32? I've got an old version which
works (sort of). Should I install the sources and then manually build
egcs (I've got 1.1.1-prerelease-2, I think), and use all the patch files
that various people have stuck on the mailing list? Will there be an
announcement made when egcs properly works on arm32 (and that the super
duper new fully working version is in the source tree) on this mailing list?

Last question (collective hurrah): do any of the C++ compilers (g++ or
egcs) support namespaces fully? And do they both have the STL (standard
template library). This may be why me and various others can't get
mico (and thereafter KDE Office to compile).

Anyway, any pointers/help/instructions that anyone could give would be
appreciated.

Cheers,
tim

PS	I've had to reinstall everything from scratch again. Nice.
-- 
tim@auroral.freeserve.co.uk