[comp.lang.c++] Compiling NIHCL 3.0 under AT&T cfront 2.0

kkenny@lava.nrtc.northrop.com (Kevin B. Kenny KE9TV) (11/17/90)

When I try to build NIHCL under ATT cfront 2.0 on a SpacrStation
running SunOS 4.1, there are a number of problems.

(1) Many of the 'make' options don't get passed into subordinate
    Makefiles.  This was easy to fix by editing the various Makefiles,
    and I enclose context diffs.

(2) When I try to make the multiple-inheritance version (`make mi'),
    the compilation fails with the following:

"ArrayOb.c", line 72: error: ambiguous Object::nil and Object::nil (one not in v
irtual base)
"ArrayOb.c", line 129: error: ambiguous Object::nil and Object::nil (one not in
virtual base)
"ArrayOb.c", line 140: error: ambiguous Object::nil and Object::nil (one not in
virtual base)
"ArrayOb.c", line 177: error: two initializers for Collection
"ArrayOb.c", line 177: error: two initializers for Object
"ArrayOb.c", line 218: error: two initializers for Collection
"ArrayOb.c", line 218: error: two initializers for Object

Anyone else seen this problem before?  Any suggestions what to do
about it?

Thanks,

Kevin Kenny	KE9TV			ke9tv@nrtc.northrop.com

Context diffs for Makefiles:

*** Makefile.orig	Tue May 22 19:58:50 1990
--- Makefile	Fri Nov 16 16:14:57 1990
***************
*** 85,91 ****
  VECTEST = vectest
  EX = ex
  SUBDIRS = ${ERRFAC} ${CLASSES} ${TEST} ${VECTOR} ${VECTEST} ${EX}
! COMMONFLAGS = CC=${CC} CCDEBUG=${CCDEBUG} CCFLAGS="${CCFLAGS}" I=$I SYS=${SYS} NESTED_TYPES=${NESTED_TYPES} BUGDEFS="${BUGDEFS}" DEBUGDEFS="${DEBUGDEFS}"
   
  all: nihclclasses nihcltest vectorclasses vectortest
  
--- 87,96 ----
  VECTEST = vectest
  EX = ex
  SUBDIRS = ${ERRFAC} ${CLASSES} ${TEST} ${VECTOR} ${VECTEST} ${EX}
! COMMONFLAGS = CC=${CC} CCDEBUG=${CCDEBUG} CCFLAGS="${CCFLAGS}" I=$I SYS=${SYS} NESTED_TYPES=${NESTED_TYPES} BUGDEFS="${BUGDEFS}" DEBUGDEFS="${DEBUGDEFS}" \
! LNFLAGS=${LNFLAGS} MAIN="${MAIN}" LIB_ID=${LIB_ID} \
! NIHCLLIBDIR=${NIHCLLIBDIR} NIHCLINCDIR=${NIHCLINCDIR} CLIBDIR=${CLIBDIR} \
! ERRGENDIR=${ERRGENDIR} ERRTABDIR=${ERRTABDIR} ERRINCDIR=${ERRINCDIR}
   
  all: nihclclasses nihcltest vectorclasses vectortest
  
***************
*** 94,106 ****
  errorfacility:
  	cd ${ERRFAC}; \
  		${MAKE} -f MAKEFILE ${MFLAGS} ${COMMONFLAGS}; \
! 		${MAKE} -f MAKEFILE ${MFLAGS} install ${COMMONFLAGS} \
! 		ERRGENDIR=${ERRGENDIR} ERRTABDIR=${ERRTABDIR} ERRINCDIR=${ERRINCDIR} \
! 		CLIBDIR=${CLIBDIR} LIB_ID=${LIB_ID}
  
  nihclclasses:
  	cd ${CLASSES}; ${MAKE} -f MAKEFILE ${MFLAGS} \
! 		${COMMONFLAGS} MAIN=${MAIN} LNFLAGS=${LNFLAGS}
  
  nihcltest:
  	cd ${TEST}; ${MAKE} -f MAKEFILE ${MFLAGS} \
--- 99,109 ----
  errorfacility:
  	cd ${ERRFAC}; \
  		${MAKE} -f MAKEFILE ${MFLAGS} ${COMMONFLAGS}; \
! 		${MAKE} -f MAKEFILE ${MFLAGS} install ${COMMONFLAGS}
  
  nihclclasses:
  	cd ${CLASSES}; ${MAKE} -f MAKEFILE ${MFLAGS} \
! 		${COMMONFLAGS}
  
  nihcltest:
  	cd ${TEST}; ${MAKE} -f MAKEFILE ${MFLAGS} \
***************
*** 115,121 ****
  
  nihclmiclasses:
  	cd ${CLASSES}; ${MAKE} -f MAKEFILE ${MFLAGS} \
! 		${COMMONFLAGS} MAIN=${MAIN} LNFLAGS=${LNFLAGS} \
  		MI=-DMI NIHCLLIB=libnihclmi.a
  
  nihclmitest:
--- 118,124 ----
  
  nihclmiclasses:
  	cd ${CLASSES}; ${MAKE} -f MAKEFILE ${MFLAGS} \
! 		${COMMONFLAGS} \
  		MI=-DMI NIHCLLIB=libnihclmi.a
  
  nihclmitest:
***************
*** 139,146 ****
  install:
  	for i in ${CLASSES} ${VECTOR}; do \
  		(echo $$i; cd $$i; ${MAKE} -f MAKEFILE ${MFLAGS} install \
! 		NIHCLLIBDIR=${NIHCLLIBDIR} NIHCLINCDIR=${NIHCLINCDIR} \
! 		); done
  
  examples:
  	cd ${EX}; ${MAKE} -f MAKEFILE ${MFLAGS} ${COMMONFLAGS}
--- 142,149 ----
  install:
  	for i in ${CLASSES} ${VECTOR}; do \
  		(echo $$i; cd $$i; ${MAKE} -f MAKEFILE ${MFLAGS} install \
! 		${COMMONFLAGS} \
! 		); done	
  
  examples:
  	cd ${EX}; ${MAKE} -f MAKEFILE ${MFLAGS} ${COMMONFLAGS}
*** lib/MAKEFILE.orig	Sun May 20 18:03:19 1990
--- lib/MAKEFILE	Thu Nov 15 16:50:33 1990
***************
*** 74,81 ****
  
  all: always nihclerrsx.h regex.o ${NIHCLLIB}
  
! always:
! 	${MAKE} generic _main.c
  
  nihclerrsx.h: nihclerrs.err
  	-if test -f /usr/bin/errcom ; then errcom nihclerrs.err ; else ${ERRGENDIR}/errgen -R${ERRTABDIR} nihclerrs.err; fi
--- 74,80 ----
  
  all: always nihclerrsx.h regex.o ${NIHCLLIB}
  
! always: generic _main.c
  
  nihclerrsx.h: nihclerrs.err
  	-if test -f /usr/bin/errcom ; then errcom nihclerrs.err ; else ${ERRGENDIR}/errgen -R${ERRTABDIR} nihclerrs.err; fi

kgorlen@sapporo.dcrt.nih.gov (Keith Gorlen) (11/19/90)

In article <13066@gremlin.nrtc.northrop.com> kkenny@lava.nrtc.northrop.com (Kevin B. Kenny KE9TV) writes:
->
->When I try to build NIHCL under ATT cfront 2.0 on a SpacrStation
->running SunOS 4.1, there are a number of problems.
->
->(2) When I try to make the multiple-inheritance version (`make mi'),
->    the compilation fails with the following:
->
->"ArrayOb.c", line 72: error: ambiguous Object::nil and Object::nil (one not in v
->irtual base)
->"ArrayOb.c", line 129: error: ambiguous Object::nil and Object::nil (one not in
->virtual base)
->"ArrayOb.c", line 140: error: ambiguous Object::nil and Object::nil (one not in
->virtual base)
->"ArrayOb.c", line 177: error: two initializers for Collection
->"ArrayOb.c", line 177: error: two initializers for Object
->"ArrayOb.c", line 218: error: two initializers for Collection
->"ArrayOb.c", line 218: error: two initializers for Object
->
->Anyone else seen this problem before?  Any suggestions what to do
->about it?
->
->Thanks,
->
->Kevin Kenny	KE9TV			ke9tv@nrtc.northrop.com

Quite a few people have reported this problem to me.  It is a C++
compiler bug that I reported to AT&T during the R2.0 beta test period
around May, 1989.  *Some* distributions of Sun C++ R2.0 still seem to
have the bug, although the copy I use does not.  I suggest you
complain to Sun.

--
	Keith Gorlen			phone: (301) 496-1111
	Building 12A, Room 2033		uucp: uunet!kgorlen%alw.nih.gov
	National Institutes of Health	Internet: kgorlen@alw.nih.gov
	Bethesda, MD 20892