Hi,
I am having a problem to compile udpcast 20081130 using gcc 3.2.2. I got
the error messages like:
...
udp-sender.c: At top level:
udp-sender.c:425: parse error before '}' token
udp-sender.c:453: parse error before string constant
...
The details are attached.
Does udpcast only support gcc 4 now ?
Thanks.
Steven.
--
Steven Shiau <steven _at_ nchc org tw> <steven _at_ stevenshiau org>
National Center for High-performance Computing, Taiwan.
http://www.nchc.org.tw
Public Key Server PGP Key ID: 1024D/9762755A
Fingerprint: A2A1 08B7 C22C 3D06 34DB F4BC 08B3 E3D7 9762 755A
# ~/udpcast-20081130>./configure
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking whether gcc needs -traditional... no
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for pthread_create in -lpthread... yes
checking for dlsym in -ldl... yes
checking for ANSI C header files... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/sockio.h usability... no
checking sys/sockio.h presence... no
checking for sys/sockio.h... no
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for memory.h... (cached) yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking net/if.h usability... yes
checking net/if.h presence... yes
checking for net/if.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking winsock2.h usability... no
checking winsock2.h presence... no
checking for winsock2.h... no
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for string.h... (cached) yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for struct ip_mreqn.imr_ifindex... yes
checking for in_addr_t... yes
checking whether llseek declared in unistd.h... no
checking whether lseek64 declared in unistd.h... yes
checking for htons... yes
checking for an ANSI C-conforming const... (cached) yes
checking for inline... (cached) inline
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking return type of signal handlers... void
checking for atexit... yes
checking for on_exit... yes
checking for tcsetattr... yes
checking for lseek64... yes
checking for snprintf... yes
checking for inet_pton... yes
checking for inet_aton... yes
checking for getopt_long... yes
checking for dlsym... yes
checking for 64-bit off_t... no
checking whether gcc supports loff_t type... yes
checking whether gcc supports offset_t type... no
checking whether gcc supports long long type... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
# ~/udpcast-20081130>make
gcc -g -O2 -Wall -Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG -DUSE_ASSEMBLER -O6 -DNO_BB -I. -I. -c -o udp-receiver.o udp-receiver.c
gcc -g -O2 -Wall -Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG -DUSE_ASSEMBLER -O6 -DNO_BB -I. -I. -c -o socklib.o socklib.c
gcc -g -O2 -Wall -Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG -DUSE_ASSEMBLER -O6 -DNO_BB -I. -I. -c -o udpcast.o udpcast.c
gcc -g -O2 -Wall -Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG -DUSE_ASSEMBLER -O6 -DNO_BB -I. -I. -c -o receiver-diskio.o receiver-diskio.c
gcc -g -O2 -Wall -Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG -DUSE_ASSEMBLER -O6 -DNO_BB -I. -I. -c -o receivedata.o receivedata.c
gcc -g -O2 -Wall -Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG -DUSE_ASSEMBLER -O6 -DNO_BB -I. -I. -c -o udpr-negotiate.o udpr-negotiate.c
gcc -g -O2 -Wall -Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG -DUSE_ASSEMBLER -O6 -DNO_BB -I. -I. -c -o produconsum.o produconsum.c
gcc -g -O2 -Wall -Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG -DUSE_ASSEMBLER -O6 -DNO_BB -I. -I. -c -o fifo.o fifo.c
gcc -g -O2 -Wall -Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG -DUSE_ASSEMBLER -O6 -DNO_BB -I. -I. -c -o log.o log.c
gcc -g -O2 -Wall -Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG -DUSE_ASSEMBLER -O6 -DNO_BB -I. -I. -c -o statistics.o statistics.c
gcc -c -I. -I. -g -O2 -Wall -Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG -DUSE_ASSEMBLER -O6 -DNO_BB -fno-inline fec.c
gcc -g -O2 -Wall -Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG -DUSE_ASSEMBLER -O6 -DNO_BB -I. -I. -c -o udpc_version.o udpc_version.c
gcc -g -O2 -Wall -Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG -DUSE_ASSEMBLER -O6 -DNO_BB -I. -I. -c -o console.o console.c
gcc -g -O2 -Wall -Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG -DUSE_ASSEMBLER -O6 -DNO_BB -I. -I. -c -o process.o process.c
gcc -s udp-receiver.o socklib.o udpcast.o receiver-diskio.o receivedata.o udpr-negotiate.o produconsum.o fifo.o log.o statistics.o fec.o udpc_version.o console.o process.o -ldl -lpthread -ldl -lpthread -o udp-receiver
gcc -g -O2 -Wall -Wall -DBB_FEATURE_UDPCAST_FEC -D_FILE_OFFSET_BITS=64 -DUSE_SYSLOG -DUSE_ASSEMBLER -O6 -DNO_BB -I. -I. -c -o udp-sender.o udp-sender.c
udp-sender.c:226:1: directives may not be used inside a macro argument
udp-sender.c:225:28: unterminated argument list invoking macro "getopt_l"
udp-sender.c: In function `main':
udp-sender.c:227: `getopt_l' undeclared (first use in this function)
udp-sender.c:227: (Each undeclared identifier is reported only once
udp-sender.c:227: for each function it appears in.)
udp-sender.c:227: parse error before string constant
udp-sender.c:239: case label not within a switch statement
udp-sender.c:243: case label not within a switch statement
udp-sender.c:246: case label not within a switch statement
udp-sender.c:249: case label not within a switch statement
udp-sender.c:252: case label not within a switch statement
udp-sender.c:255: case label not within a switch statement
udp-sender.c:258: case label not within a switch statement
udp-sender.c:261: case label not within a switch statement
udp-sender.c:264: case label not within a switch statement
udp-sender.c:278: case label not within a switch statement
udp-sender.c:281: case label not within a switch statement
udp-sender.c:285: case label not within a switch statement
udp-sender.c:288: case label not within a switch statement
udp-sender.c:294: case label not within a switch statement
udp-sender.c:302: case label not within a switch statement
udp-sender.c:307: case label not within a switch statement
udp-sender.c:310: case label not within a switch statement
udp-sender.c:315: case label not within a switch statement
udp-sender.c:319: case label not within a switch statement
udp-sender.c:354: case label not within a switch statement
udp-sender.c:357: case label not within a switch statement
udp-sender.c:360: case label not within a switch statement
udp-sender.c:379: case label not within a switch statement
udp-sender.c:382: case label not within a switch statement
udp-sender.c:385: case label not within a switch statement
udp-sender.c:388: case label not within a switch statement
udp-sender.c:391: case label not within a switch statement
udp-sender.c:394: case label not within a switch statement
udp-sender.c:397: case label not within a switch statement
udp-sender.c:400: case label not within a switch statement
udp-sender.c:404: case label not within a switch statement
udp-sender.c:408: case label not within a switch statement
udp-sender.c:412: case label not within a switch statement
udp-sender.c:416: case label not within a switch statement
udp-sender.c:420: `default' label not within a switch statement
udp-sender.c:421: case label not within a switch statement
udp-sender.c:175: warning: unused variable `r'
udp-sender.c:238: break statement not within loop or switch
udp-sender.c:242: break statement not within loop or switch
udp-sender.c:245: break statement not within loop or switch
udp-sender.c:248: break statement not within loop or switch
udp-sender.c:251: break statement not within loop or switch
udp-sender.c:254: break statement not within loop or switch
udp-sender.c:257: break statement not within loop or switch
udp-sender.c:260: break statement not within loop or switch
udp-sender.c:263: break statement not within loop or switch
udp-sender.c:277: break statement not within loop or switch
udp-sender.c:280: break statement not within loop or switch
udp-sender.c:284: break statement not within loop or switch
udp-sender.c:287: break statement not within loop or switch
udp-sender.c:293: break statement not within loop or switch
udp-sender.c:301: break statement not within loop or switch
udp-sender.c:306: break statement not within loop or switch
udp-sender.c:309: break statement not within loop or switch
udp-sender.c:314: break statement not within loop or switch
udp-sender.c:317: break statement not within loop or switch
udp-sender.c:353: break statement not within loop or switch
udp-sender.c:356: break statement not within loop or switch
udp-sender.c:359: break statement not within loop or switch
udp-sender.c:362: break statement not within loop or switch
udp-sender.c:381: break statement not within loop or switch
udp-sender.c:384: break statement not within loop or switch
udp-sender.c:387: break statement not within loop or switch
udp-sender.c:390: break statement not within loop or switch
udp-sender.c:393: break statement not within loop or switch
udp-sender.c:396: break statement not within loop or switch
udp-sender.c:399: break statement not within loop or switch
udp-sender.c:402: break statement not within loop or switch
udp-sender.c:406: break statement not within loop or switch
udp-sender.c:410: break statement not within loop or switch
udp-sender.c:414: break statement not within loop or switch
udp-sender.c:418: break statement not within loop or switch
udp-sender.c: At top level:
udp-sender.c:425: parse error before '}' token
udp-sender.c:453: parse error before string constant
udp-sender.c:453: warning: type defaults to `int' in declaration of `fprintf'
udp-sender.c:453: warning: conflicting types for built-in function `fprintf'
udp-sender.c:453: warning: data definition has no type or storage class
udp-sender.c:455: parse error before string constant
udp-sender.c:455: warning: type defaults to `int' in declaration of `fprintf'
udp-sender.c:455: warning: data definition has no type or storage class
udp-sender.c:456: parse error before numeric constant
udp-sender.c:456: warning: type defaults to `int' in declaration of `exit'
udp-sender.c:456: conflicting types for `exit'
/usr/include/stdlib.h:612: previous declaration of `exit'
udp-sender.c:456: warning: data definition has no type or storage class
udp-sender.c:465: parse error before string constant
udp-sender.c:465: warning: type defaults to `int' in declaration of `fprintf'
udp-sender.c:465: warning: data definition has no type or storage class
udp-sender.c:467: parse error before string constant
udp-sender.c:467: warning: type defaults to `int' in declaration of `fprintf'
udp-sender.c:467: warning: data definition has no type or storage class
udp-sender.c:482: parse error before string constant
udp-sender.c:482: warning: type defaults to `int' in declaration of `fprintf'
udp-sender.c:482: warning: data definition has no type or storage class
udp-sender.c:491: parse error before '(' token
udp-sender.c:498: parse error before '&' token
udp-sender.c:498: warning: type defaults to `int' in declaration of `rgShutdownAll'
udp-sender.c:498: conflicting types for `rgShutdownAll'
udpcast.h:111: previous declaration of `rgShutdownAll'
udp-sender.c:498: warning: data definition has no type or storage class
udp-sender.c:41: warning: `options' defined but not used
make: *** [udp-sender.o] Error 1
# gcc --version
gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# uname -r
2.4.33.4-6