[comp.lang.c++] C++ on SUN 2's and SUN 3's

rlee@sri-spam.UUCP (09/30/87)

I am trying to port C++ 1.2 to a Sun 2 and 3, and have encountered several
problems.  I appreciate any suggestions you may have, especially from those
who have ported version 1.2 to a Sun.

In the past, I have seen notes in this newsgroup about porting C++ 1.1
to a Sun 2 and 3, but not for the upgraded 1.2 version.  Seems like alot
of problems initially encountered with porting 1.1 to a Sun was fixed in
the C++ 1.2 release.  For instance, the 1.2 version had a lib/task/swap.s
for the Sun, whereas the former probably didn't.

But nevertheless I have encountered other problems.  Here's a synopsis of
I've tried:

1.  Installed C++ version 1.2 on a Vax.  On the Vax I used the following
    procedure:

    a.  Ran "bsd.fix"
    b.  Fixed 'signal declaration' problem in incl/signal.h
    c.  Ran "make scratch" to build bootstrap versions of libC.a
	munch, cfront.
    d.  Ran "make," which first copied lib/task/vax_swap.s to lib/task/swap.s,
	then created installed versions of libC.a, munch and cfront.
    e.  Ran "make test."  Everything compiled and executed o.k.  So the
	port of C++ 1.2 to a Vax appeared to be SUCCESSFUL.

2.  Copied everything over to the Sun 2 (and Sun 3) -- with the exception
    of Vax generated binaries: *.o files, cfront, libC.a and munch.

3.  Re-iterated step 1c on the Sun 2 (and Sun 3).  'make scratch' succeeded
    without a hitch on the Sun 2 (and Sun 3).

4.  Finally, tried to re-iterate step 1d on the Sun 2 (and Sun 3).
    'make'  first copied lib/task/sun_swap.s to lib/task/swap.s,
    then made libC.a ok,
    but when trying to make munch and cfront, CC reported "Memory Faults"

    Taking a closer at CC, the bug is the result of line 243 of the CC
    shell script.

 241   elif test  "$DASHR" != 1      # find ctors/dtors
 242   then
 243          nm $NMFLAGS $OO | $munchC $P >__ctdt.c  <----caused Memory Fault
 244          case $? in
 245          1)      $ccC -c __ctdt.c >/dev/null

    Apparently the command line "nm munch | munch >__ctdt.c" caused a
    segmentation fault:

 nm munch | munch >__ctdt.c
	     /|\
	      |_____________  caused a segmentation violation.


5.  I also repeated steps 2-4 in re-attempts to get C++ 1.2 working on the Sun.
    But I either experienced the same "Memory Fault" problem above, or had
    cfront hang when trying to compile a simple test program.


These problems look familiar to anyone?   Appreciate any kind of help.
Thanks in advance.
-ron

					Ronald C Lee
					SRI International
					Menlo Park, CA

				Net Address: <rlee@spam.istc.sri.com>
					also <rlee@spam.istc.sri.com.ARPA>
					 and <rlee@sri-spam.istc.sri.com.ARPA>