*Hi All,* * * *I am new to use tomcat. I got a problem of installing jsvc.* * * *I followed this tutorial to setup the system http://tomcat.apache.org/tomcat-7.0-doc/setup.html. Sample command lines are:*
cd $CATALINA_HOME/bin tar xvfz commons-daemon-native.tar.gz cd commons-daemon-1.0.x-native-src/unix ./configure make cp jsvc ../.. cd ../.. *I stuck at "make". Below are the outputs of "configure" and "make"* ./configure [hieule2@tarekc20 unix]$ ./configure *** Current host *** checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking cached host system type... ok *** C-Language compilation tools *** 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 ANSI C... none needed checking for ranlib... ranlib checking for strip... strip *** Host support *** checking C flags dependant on host system type... ok *** Java compilation tools *** checking for sablevm... NONE checking for kaffe... NONE checking for javac... /usr/bin/javac /usr/bin/javac checking wether the Java compiler (/usr/bin/javac) works... yes checking for jar... /usr/bin/jar gcc flags added checking for cap_init in -lcap... no *** Writing output files *** configure: creating ./config.status config.status: creating Makefile config.status: creating Makedefs config.status: creating native/Makefile *** All done *** Now you can issue "make" make (cd native; make all) make[1]: Entering directory `/home/tarek/hieule2/shenli/3_tier_server/apache-tomcat-7.0.19/bin/commons-daemon-1.0.6-native-src/unix/native' gcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"i386\" -Wall -Wstrict-prototypes -I/usr/include -I/usr/include/linux -c jsvc-unix.c -o jsvc-unix.o In file included from /usr/include/_G_config.h:44, from /usr/include/libio.h:32, from /usr/include/stdio.h:72, from jsvc.h:21, from jsvc-unix.c:18: /usr/include/gconv.h:72: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/gconv.h:88: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/gconv.h:97: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/gconv.h:174: error: expected specifier-qualifier-list before ‘size_t’ In file included from /usr/include/stdio.h:72, from jsvc.h:21, from jsvc-unix.c:18: /usr/include/libio.h:329: error: expected specifier-qualifier-list before ‘size_t’ /usr/include/libio.h:361: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libio.h:370: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/libio.h:486: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_IO_sgetn’ In file included from jsvc.h:21, from jsvc-unix.c:18: /usr/include/stdio.h:308: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdio.h:315: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdio.h:357: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdio.h:359: error: format string argument not a string type /usr/include/stdio.h:361: error: expected declaration specifiers or ‘...’ before ‘size_t’ /usr/include/stdio.h:610: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fread’ /usr/include/stdio.h:616: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fwrite’ /usr/include/stdio.h:638: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fread_unlocked’ /usr/include/stdio.h:640: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fwrite_unlocked’ In file included from jsvc.h:22, from jsvc-unix.c:18: /usr/include/stdlib.h:140: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ctype_get_mb_cur_max’ In file included from /usr/include/sys/types.h:133, from /usr/include/stdlib.h:438, from jsvc.h:22, from jsvc-unix.c:18: /usr/include/linux/time.h:10: error: expected specifier-qualifier-list before ‘time_t’ /usr/include/linux/time.h:16: error: expected specifier-qualifier-list before ‘time_t’ In file included from /usr/include/sys/select.h:46, from /usr/include/sys/types.h:220, from /usr/include/stdlib.h:438, Similar errors continues to the end. I thought it might be some problem with my gcc compiler. Below is the gcc version information. [hieule2@tarekc20 unix]$ gcc -v Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux Thread model: posix gcc version 4.1.2 20080704 (Red Hat 4.1.2-50) Could someone please help me with this problem? Thanks, Shen