[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] installation problem: 'blksize_t'?



Hi,

ns-2 installation drives me crazy! It has problem with a SYSTEM header file!
The problem installing it (on a UNIX machine, Solaris 8) appears to be a
compiler or operting system issue, as the stat.h file is of course correct.

1) compiling from pieces, it says:

chunlin% make
g++ -c  -DTCP_DELAY_BIND_ALL -DNO_TK -DNIXVECTOR -DTCLCL_CLASSINSTVAR
-DNDEBUG -mv8 -msupersparc -D__svr4__ -DUSE_SHM -DHAVE_LIBTCLCL
-DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A7 -DHAVE_OTCL_H -DHAVE_LIBTCL8_3
-DHAVE_TCL_H  -DHAVE_CONFIG_H -I.   -I/ece/jordan/fardito/tclcl-1.0b11
-I/ece/jordan/fardito/otcl-1.0a7 -I/ece/jordan/fardito/tcl8.3.2/generic -o
traffictrace.o traffictrace.cc
In file included from traffictrace.cc:30:
/usr/include/sys/stat.h:258: 'blksize_t' is used as a type, but is not
defined as a type.
/usr/include/sys/stat.h:318: 'blksize_t' is used as a type, but is not
defined as a type.
*** Error code 1
make: Fatal error: Command failed for target `traffictrace.o'

but stat.h includes types.h (in the same directory!), where there is:

#ifdef _LP64
typedef int blksize_t; /* used for block sizes */
#else
typedef long blksize_t; /* used for block sizes */
#endif

2) compiling "all-in-one" has problems only with Tcl:

gcc -pipe -c -O -Wall -Wconversion -Wno-implicit-int -fPIC  -I./../generic
-I.  -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1
-DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1
-DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_TIMEZONE_VAR=1
-DSTDC_HEADERS=1 -DNO_UNION_WAIT=1 -DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1
-DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_FILIO_H=1 -DSTATIC_BUILD=1
-DTCL_SHLIB_EXT=\".so\" -DUSE_TCLALLOC=0 ./../generic/tclAlloc.c
In file included from ../unix/tclUnixPort.h:63,
                 from ../generic/tclPort.h:27,
                 from ../generic/tclAlloc.c:22:
/usr/include/sys/stat.h:258: parse error before "blksize_t"
/usr/include/sys/stat.h:262: parse error before '}' token
/usr/include/sys/stat.h:318: parse error before "blksize_t"
/usr/include/sys/stat.h:319: conflicting types for `st_blocks'
/usr/include/sys/stat.h:259: previous declaration of `st_blocks'
/usr/include/sys/stat.h:322: parse error before '}' token
*** Error code 1
make: Fatal error: Command failed for target `tclAlloc.o'
tcl8.3.2 make failed! Exiting ...

But the stat.h (read-only) file of course is OK!

machine:
Ultra5

OS:
SunOS chunlin.ece.uci.edu 5.8 Generic sun4u sparc SUNW,Ultra-5_10

compiler:
Reading specs from
/dcs/packages/gnu/lib/gcc-lib/sparc-sun-solaris2.6/3.0.2/specs
Configured with: ./configure --prefix=/dcs/packages/gnu
Thread model: posix
gcc version 3.0.2

May someone help me? Thank you!

Filippo Ardito

e-mail [email protected]