donn@utah-cs.UUCP (04/15/87)
Here are some notes I made while installing c++ 1.2 on our 4.3 BSD VAXen and HP-UX 5.2 (System V) hp9000 workstations. They may help you out if you're still trying to get the installation to work on one of these systems. ------------------------------------------------------------------------ 'basename' doesn't permit patterns in the suffix on Berkeley Unix, and it's not documented on the System V boxen around here either... [CC.sh] 'vax' doesn't exist on our VAX; I made it a link to /bin/true. [makefile] If you run 'make libC.a' twice, it will return a bad status in the huge 'if' statement the second time. Adding a '-' to the beginning of this statement forces 'make' to continue. [makefile] There still is the same old problem with incl/signal.h including <sys/signal.h> and getting a complaint about redefining the type of signal(), which is declared in both files. I hacked around this by inserting '#define signal SIGNAL' before the '#include <sys/signal.h>' and putting '#undef signal' after it. [incl: signal.h] 'make clean' doesn't work because it uses 'test -f *.o' and '*.o' of course expands to several files. I simply threw out all the tests and used '-rm -f ...' instead. What version of 'test' does this 'right'? [makefile] There was no entry for 'make install'. I added a Berkeley-style install entry based on Keith Muller's. Several variables control the placement of the compiler shell, the front end, the include files and the manual page. [makefile] The manual page needs to be updated to reflect local conventions for file locations. Note that the FILES section is a botch since it uses tabs in 'fill' mode, expecting troff to produce line breaks in predictable places. [CC.1] I changed the makefile to run 'sed' over a 'CC.sh' file to produce the 'CC' script. The 'sed' invocation sets INCDIR (include directory) and LIBDIR (where 'cfront' lives) from the corresponding makefile variables. For configuration convenience, BSD and PATCH are also substituted. [CC.sh, makefile] I needed to build a System V version of C++ and I found that makefile goes through some unnecessary agony to produce distinct Berkeley and System V compilers. I consolidated much of the code, basically by extensively propagating the PATCH makefile variable. The Patch subdirectory should no longer be needed. [makefile, CC.sh; lib/static: _main.c, dtors.c] [N.B. -- The HP9000 compiler does NOT use COFF, so HP9000 c++ should use neither BSD nor PATCH.] HP9000 boxen have a short flags member in struct _iobuf, but are otherwise like System V; bsd.sed was modified into hp.sed. The c++ include file was also modified. BEWARE -- the makefile sticks a definition for BSD into stdio.h; you can't just copy it to a System V box, unfortunately. [scratch: hp.sed; incl: stdio.h] HP9000 boxen have a peculiar way of obtaining MAXFLOAT. [incl: math.h] A note: makefile, math.h, stdio.h, task.c, *_swap.s and size.h all have configuration information for particular host types... It would be nice to consolidate all this but I'm not that ambitious just yet. When I tried compiling on the HP9000, I didn't notice that the size.h file by default declares all sizes and alignments to be 0. It really should barf its guts out when you compile for an unknown box. Just a little reminder. [src: size.h] We have a host named 'cc', which is pretty useless, but it did stimulate me to add a line to CC.sh which sets the PATH variable to something innocent. [CC.sh] ------------------------------------------------------------------------ One aside about hp9000s -- the distributed 'sed' runs at least 30 times slower than a 'sed' freshly compiled from Berkeley sources. It took me nearly an hour to run 'hp.sed'... I suppose I could be convinced to churn out some 'patch' files which would apply these changes to a fresh c++ 1.2 distribution, if enough people were interested. Donn Seeley University of Utah CS Dept donn@cs.utah.edu 40 46' 6"N 111 50' 34"W (801) 581-5668 utah-cs!donn