Brian On 10/26/20 15:33, Paquin, Brian wrote:
I’m trying to build httpd and mod_jk for the first time on a macOS 10.15.7 box. XCode 12.1 is installed and I was able to compile OpenSSL 1.1.1g. I got an error “Can not determine the proper size for pid_t” when compiling httpd (v2.4.46) with included apr (v1.7.0). This issue https://bz.apache.org/bugzilla/show_bug.cgi?id=64753 provided a diff patch that adds “#include <stdlib.h>” in a number of locations. Applying this patch allowed me to compile httpd!
Weird. pid_it is defined in <sys/types.h> and yet the patch adds <stdlib.h> to fix it.
I don't have access to my Catalina machine right now, but my clang-based Mojave machine still says to use <sys/types.h> when you "man getpid":
" GETPID(2) BSD System Calls Manual NAME getpid, getppid -- get parent or calling process identification SYNOPSIS #include <unistd.h> pid_t getpid(void); " $ cc --version Apple LLVM version 10.0.1 (clang-1001.0.46.4) Target: x86_64-apple-darwin18.7.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Now I am trying to compile mod_jk (v1.2.48), and I get the same error. Does someone have a patch file I can use to get around this issue? $ ./configure CFLAGS='-arch x86_64' APXSLDFLAGS='-arch x86_64' --with-apxs=/usr/local/apache2/bin/apxs <snip> $ make <snip> Making all in common /usr/local/apache-2.4.46/build/libtool --silent --mode=compile gcc -I. -I/usr/local/apache-2.4.46/include -arch x86_64 -DHAVE_CONFIG_H -arch x86_64 -DHAVE_APR -I/usr/local/apache-2.4.46/include -I/usr/local/apache-2.4.46/include -arch x86_64 -DHAVE_CONFIG_H -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10 -c jk_ajp12_worker.c -o jk_ajp12_worker.lo In file included from jk_ajp12_worker.c:25: In file included from ./jk_ajp12_worker.h:26: In file included from ./jk_logger.h:26: In file included from ./jk_global.h:340: ./jk_types.h:56:2: error: Can not determine the proper size for pid_t #error Can not determine the proper size for pid_t ^ ./jk_types.h:62:2: error: Can not determine the proper size for pthread_t #error Can not determine the proper size for pthread_t ^ 2 errors generated. make[1]: *** [jk_ajp12_worker.lo] Error 1 make: *** [all-recursive] Error 1 $
I'm sorry, I have no idea how configure does its magic. The auto-generated jk_types.h looks like a hand-wavy template to me.
You can probably hack it briefly by running "configure" (which you already did) and then hand-editing include/jk_types.h (ignoring the warning NOT to hand-edit it!) and manually adding:
#include <stdlib.h> to the top. Give that a try and see if it works. -chris --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org