[comp.windows.interviews] Help compiling IV 3.0 on Sun4/SunOS 4.1.1

lms@RLE-VLSI.MIT.EDU (Luis Miguel Silveira) (05/06/91)

I am having a problem compiling Interviews 3.0 on a SUN4 running
SunOS 4.1.1 with AT&T C++ 2.0.

A compilation error shows up in iv/src/lib/Interviews/world.c:

  /usr/local/bin/CC    -O  -pic   -Dcplusplus_2_0     -I..    -I../../../.././src/include       -c ../world.c
  CC  ../world.c:
  "/usr/local/include/CC/stddef.h", line 6: error:  size_t redefined: previous: int  now:  unsigned int
  "/usr/local/include/CC/stddef.h", line 6: error:  size_t  declared as  int  and unsigned int
  2 errors
  *** Error code 1
  make: Fatal error: Command failed for target `world.o'

This causes libInterviews not to be "made" and leads to lots of
subsequent errors.

Not being a C++ programmer so I really do not understand what is
happening other than the info provided above.  Is this an Interviews
problem or (more likely) a problem with our local C++ installation ?

Any help will be appreciated.  Please e-mail directly as I do not read
the newsgroup often.

-Miguel


===============================================================================
Luis Miguel Silveira                              e-mail : lms@rle-vlsi.mit.edu
===============================================================================
Research Laboratory for Electronics  ---  Massachusetts Institute of Technology
Room 36-893, 77 Massachusetts Av, Cambridge MA 02139      Phone: (617)-253-7307
===============================================================================

interran@lurch.Stanford.EDU (John Interrante) (05/07/91)

In article <9105061443.AA00902@galerkin.MIT.EDU> lms@RLE-VLSI.MIT.EDU
(Luis Miguel Silveira) writes:

   A compilation error shows up in iv/src/lib/Interviews/world.c:

     /usr/local/bin/CC    -O  -pic   -Dcplusplus_2_0     -I..    -I../../../.././src/include       -c ../world.c
     CC  ../world.c:
     "/usr/local/include/CC/stddef.h", line 6: error:  size_t redefined: previous: int  now:  unsigned int
     "/usr/local/include/CC/stddef.h", line 6: error:  size_t  declared as  int  and unsigned int
     2 errors
     *** Error code 1
     make: Fatal error: Command failed for target `world.o'

   Not being a C++ programmer so I really do not understand what is
   happening other than the info provided above.  Is this an Interviews
   problem or (more likely) a problem with our local C++ installation ?

Neither.  The problem is with SunOS 4.1.  They goofed and defined
size_t as int instead of unsigned int.  We patched the offending
header file as follows:

*** /usr/include/sys/stdtypes.h.save	Wed Feb  7 23:01:52 1990
--- /usr/include/sys/stdtypes.h	Fri Jun  1 02:18:40 1990
***************
*** 24,30 ****
  typedef	long		clock_t;	/* units=ticks (typically 60/sec) */
  typedef	long		time_t;		/* value = secs since epoch */
  
! typedef	int		size_t;		/* ??? */
  typedef int		ptrdiff_t;	/* result of subtracting two pointers */
  
  typedef	unsigned short	wchar_t;	/* big enough for biggest char set */
--- 24,30 ----
  typedef	long		clock_t;	/* units=ticks (typically 60/sec) */
  typedef	long		time_t;		/* value = secs since epoch */
  
! typedef	unsigned int	size_t;		/* ??? */
  typedef int		ptrdiff_t;	/* result of subtracting two pointers */
  
  typedef	unsigned short	wchar_t;	/* big enough for biggest char set */
--
John Interrante / interran@lurch.stanford.edu