DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=42959>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=42959 Summary: tomcat-connectors-1.2.23-src: source code fails to compile Product: Tomcat 5 Version: Unknown Platform: Macintosh OS/Version: Mac OS X 10.4 Status: NEW Severity: blocker Priority: P1 Component: Native:JK AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CONTEXT: I'm running Mac OS X 10.4.10. I've enabled file sharing, and I've successfully configured the built-in apache server to serve HTML and PHP files. I have successfully installed apache-tomcat-6.0.13. PROBLEM: I would like to install the Tomcat Connectors (mod_jk) but no macosx binaries exist in the download repository: http://tomcat.apache.org/download-connectors.cgi When I attempt to compile my own binaries, the compilation fails with fatal errors: jk_util.c:364: error: static declaration of 'vsnprintf' follows non-static declaration jk_util.c:384: error: static declaration of 'snprintf' follows non-static declaration jk_status.c:329: error: static declaration of 'vsnprintf' follows non-static declaration HOW TO REPRODUCE: 1. Download a fresh version of the source code for "tomcat-connectors-1.2.23-src" URL: http://www.ip97.com/apache.org/tomcat/tomcat-connectors/jk/source/jk-1.2.23/tomcat- connectors-1.2.23-src.zip 2. After downloading and extracting the source folder, follow the apache instructions in BUILD.txt: $> cd native $> ./configure --with-apxs=/usr/sbin/apxs 3. NOTE: At this point, the build fails immediately with the error: ": bad interpreter: No such file or directory" 4. To compile the "configure" file in Mac OS X 10.4.10 using gcc, the line endings need to be converted to unix line endings: $> perl -pi -e 's/\r\n?/\n/g' configure 5. With the configure is run again, the script halts at the first file with Macintosh line endings: $> ./configure --with-apxs=/usr/sbin/apxs configure: error: cannot run /bin/sh scripts/build/unix/config.sub 6. Continue by converting every file in the directory "scripts/build/unix" to the unix line endings: $> perl -pi -e 's/\r\n?/\n/g' config.sub etc... 7. Now the "configure" script runs to completion: $> ./configure --with-apxs=/usr/sbin/apxs checking build system type... powerpc-apple-darwin8.10.0 checking host system type... powerpc-apple-darwin8.10.0 checking target system type... powerpc-apple-darwin8.10.0 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes ... config.status: creating common/Makefile config.status: creating common/list.mk config.status: creating common/jk_types.h config.status: creating jni/Makefile config.status: creating common/portable.h config.status: executing depfiles commands 8. Continue following the apache instructions in BUILD.txt: $> make Making all in common /bin/sh ../libtool --mode=compile gcc -I/usr/include/httpd -g -O2 -DDARWIN -DUSE_HSREGEX - DUSE_EXPAT -I../lib/expat-lite -g -Os -pipe -DHARD_SERVER_LIMIT=2048 -DEAPI -DJK_PREFORK -g - O2 -I /System/Library/Frameworks/JavaVM.framework/Home/include -I /System/Library/Frameworks/ JavaVM.framework/Home/include/ -c jk_ajp12_worker.c -o jk_ajp12_worker.lo mkdir .libs ... gcc -I/usr/include/httpd -g -O2 -DDARWIN -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -g -Os - pipe -DHARD_SERVER_LIMIT=2048 -DEAPI -DJK_PREFORK -g -O2 -I /System/Library/Frameworks/ JavaVM.framework/Home/include -I /System/Library/Frameworks/JavaVM.framework/Home/include/ - c jk_util.c -fno-common -DPIC -o .libs/jk_util.o jk_util.c:364: error: static declaration of 'vsnprintf' follows non-static declaration jk_util.c:384: error: static declaration of 'snprintf' follows non-static declaration make[1]: *** [jk_util.lo] Error 1 make: *** [all-recursive] Error 1 9. The compilation halts at the last two errors: jk_util.c:364: error: static declaration of 'vsnprintf' follows non-static declaration jk_util.c:384: error: static declaration of 'snprintf' follows non-static declaration 10. The source file appears to be: "native/common/jk_util.c" Here is a code snippet from line 364: #if !defined(HAVE_VSNPRINTF) && !defined(HAVE_APR) static FILE *f = NULL; static int vsnprintf(char *str, size_t n, const char *fmt, va_list ap) { ... 11. After renaming the two offending functions, I encountered a similar problem in "jk_status.c": jk_status.c:329: error: static declaration of 'vsnprintf' follows non-static declaration 12. I renamed the offending function here as well (I changed each instance of "vsnprintf" to "staticvsnprintf") and tried the make again: $> make clean $> make 12. The script now fails after generating "scripts/build/instdso.sh" The line endings need to be converted to unix line endings: $> perl -pi -e 's/\r\n?/\n/g' scripts/build/instdso.sh 13. Finally, the "make" script runs to completion: $> make clean $> make Making all in common /bin/sh ../libtool --mode=compile gcc -I/usr/include/httpd -g -O2 -DDARWIN -DUSE_HSREGEX - DUSE_EXPAT -I../lib/expat-lite -g -Os -pipe -DHARD_SERVER_LIMIT=2048 -DEAPI -DJK_PREFORK -g - O2 -I /System/Library/Frameworks/JavaVM.framework/Home/include -I /System/Library/Frameworks/ JavaVM.framework/Home/include/ -c jk_ajp12_worker.c -o jk_ajp12_worker.lo mkdir .libs ... cp .libs/mod_jk.lai /Users/spencerm/Desktop/Fresh/tomcat-connectors-1.2.23-src/native/ apache-1.3/mod_jk.la cp .libs/mod_jk.a /Users/spencerm/Desktop/Fresh/tomcat-connectors-1.2.23-src/native/apache-1.3/ mod_jk.a chmod 644 /Users/spencerm/Desktop/Fresh/tomcat-connectors-1.2.23-src/native/apache-1.3/ mod_jk.a ranlib /Users/spencerm/Desktop/Fresh/tomcat-connectors-1.2.23-src/native/apache-1.3/mod_jk.a libtool: install: warning: remember to run `libtool --finish /usr/libexec' 14. Whew! It finally compiled. Hopefully one of the *real* developers can fix this permanently. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]