On 2/9/10 1:05 PM, Bush, Stephen F (GE, Research) wrote: > > > I'm getting the following installation error when trying to install > ns-allinone-2.34 on cygwin. > > I've manually installed tcl and tk versions 8.4.19; that corrected my last > problem. > > I'm now getting the "too long for GCC" error below. > > Can someone point me to a fix for this? > > Thanks, > Steve > > g++ -c -Wall -Wno-write-strings -DTCP_DELAY_BIND_ALL -DNO_TK > -DTCLCL_CLASSINSTVAR -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H > -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 > -DHAVE_TCLINT_H -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC > -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. > -I/usr/X11R6/include -I. -I/cygdrive/c/cygwin/ns-allinone-2.34/tclcl-1.19 > -I/cygdrive/c/cygwin/ns-allinone-2.34/otcl-1.13 > -I/cygdrive/c/cygwin/ns-allinone-2.34/include > -I/cygdrive/c/cygwin/ns-allinone-2.34/include > -I/cygdrive/c/cygwin/ns-allinone-2.34/include -I/usr/include/pcap -I./tcp > -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile > -I./trace -I./routing -I./tools -I./classifier -I./mcast > -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr > -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv > -I./satellite -I./wpan -o tcp/scoreboard1.o tcp/scoreboard1.cc > g++ -c -Wall -Wno-write-strings -DTCP_DELAY_BIND_ALL -DNO_TK > -DTCLCL_CLASSINSTVAR -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H > -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 > -DHAVE_TCLINT_H -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC > -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. > -I/usr/X11R6/include -I. -I/cygdrive/c/cygwin/ns-allinone-2.34/tclcl-1.19 > -I/cygdrive/c/cygwin/ns-allinone-2.34/otcl-1.13 > -I/cygdrive/c/cygwin/ns-allinone-2.34/include > -I/cygdrive/c/cygwin/ns-allinone-2.34/include > -I/cygdrive/c/cygwin/ns-allinone-2.34/include -I/usr/include/pcap -I./tcp > -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile > -I./trace -I./routing -I./tools -I./classifier -I./mcast > -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr > -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv > -I./satellite -I./wpan -o tcp/tcp-linux.o tcp/tcp-linux.cc > g++ -c -Wall -Wno-write-strings -DTCP_DELAY_BIND_ALL -DNO_TK > -DTCLCL_CLASSINSTVAR -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H > -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 > -DHAVE_TCLINT_H -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC > -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. > -I/usr/X11R6/include -I. -I/cygdrive/c/cygwin/ns-allinone-2.34/tclcl-1.19 > -I/cygdrive/c/cygwin/ns-allinone-2.34/otcl-1.13 > -I/cygdrive/c/cygwin/ns-allinone-2.34/include > -I/cygdrive/c/cygwin/ns-allinone-2.34/include > -I/cygdrive/c/cygwin/ns-allinone-2.34/include -I/usr/include/pcap -I./tcp > -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile > -I./trace -I./routing -I./tools -I./classifier -I./mcast > -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr > -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv > -I./satellite -I./wpan -o tcp/linux/ns-linux-util.o tcp/linux/ns-linux-util.c c > gcc -c -Wall -Wno-write-strings -DTCP_DELAY_BIND_ALL -DNO_TK > -DTCLCL_CLASSINSTVAR -DNDEBUG -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H > -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 > -DHAVE_TCLINT_H -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC > -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. > -I/usr/X11R6/include -I. -I/cygdrive/c/cygwin/ns-allinone-2.34/tclcl-1.19 > -I/cygdrive/c/cygwin/ns-allinone-2.34/otcl-1.13 > -I/cygdrive/c/cygwin/ns-allinone-2.34/include > -I/cygdrive/c/cygwin/ns-allinone-2.34/include > -I/cygdrive/c/cygwin/ns-allinone-2.34/include -I/usr/include/pcap -I./tcp > -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile > -I./trace -I./routing -I./tools -I./classifier -I./mcast > -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr > -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv > -I./satellite -I./wpan -o tcp/linux/ns-linux-c.o tcp/linux/ns-linux-c.c > In file included from /usr/include/cygwin/types.h:21, > from /usr/include/sys/types.h:495, > from /usr/include/stdio.h:46, > from tcp/linux/ns-linux-c.h:23, > from tcp/linux/ns-linux-c.c:22: > /usr/include/stdint.h:28: error: duplicate ‘unsigned’ > /usr/include/stdint.h:30: error: duplicate ‘unsigned’ > /usr/include/stdint.h:30: error: ‘long long long’ is too long for GCC > /usr/include/stdint.h:30: error: ‘long long long’ is too long for GCC > make: *** [tcp/linux/ns-linux-c.o] Error 1 > Ns make failed! > See http://www.isi.edu/nsnam/ns/ns-problems.html for problems >
This is because there is a chain of defines in ns-linux-util.h that effectively does this: #define uint64_t unsigned long long #define uint32_t unsigned long but they are later defined in /usr/include/stdint.h as: typedef unsigned int uint32_t typedef unsigned long long uint64_t hence the duplicate unsigned in the expansion. This patch worked for me: *** ns-linux-util.h.orig 2010-02-13 17:31:58.778255887 -0500 --- ns-linux-util.h 2010-02-13 17:36:13.057615897 -0500 *************** *** 18,23 **** --- 18,24 ---- #ifndef NS_LINUX_UTIL_H #define NS_LINUX_UTIL_H #include <stdlib.h> + #include <stdint.h> #include "ns-linux-param.h" extern struct tcp_congestion_ops tcp_reno; *************** *** 47,55 **** #define s32 long #define s64 long long - #define uint64_t u64 - #define uint32_t u32 - #define ktime_t s64 extern ktime_t net_invalid_timestamp(); extern int ktime_equal(const ktime_t cmp1, const ktime_t cmp2); --- 48,53 ----