> I am simply installing httpd-2.0.48 on Solaris 2.8. I gave the following > commands. > > % ./configure --prefix=/tools/apache-2.0.48 --enable-module=so > % make > > then got this error > > proc_mutex.c: In function `proc_mutex_proc_pthread_create': > proc_mutex.c:372: `PTHREAD_MUTEX_ROBUST_NP' undeclared (first use in this > function) > proc_mutex.c:372: (Each undeclared identifier is reported only once > proc_mutex.c:372: for each function it appears in.) > proc_mutex.c:379: `PTHREAD_PRIO_INHERIT' undeclared (first use in this > function)
Created attachment 10500 [details] config.log under srlib/apr
Created attachment 10501 [details] Output running ./configure
If you run configure like ./configure CFLAGS="-D_POSIX_THREAD_PRIO_INHERIT" does it build?
I gave this command ./configure --prefix=/tools/apache-2.0.48 CFLAGS="-D_POSIX_THREAD_PRIO_INHERIT" and the same error came back. The two variables are still not declared.
This problem happens because the two symbols PTHREAD_MUTEX_ROBUST_NP and PTHREAD_PRIO_INHERIT are not defined in the include file "pthread.h". The copy of this file that comes along with the gcc compiler does not include these symbols. In Solaris 2.7 this file did not contain the symbols. Since then, Sun has released a new copy of the file that does contain them. However, the gcc compiler has its own copy that has a warning label in it saying not to edit the file and that the manufacturer's version has non-standard usage in it. I don't know if the new include file from Sun has this "non-standard" problem or not. --- It would be nice if the installation process for httpd-2 checked for the presence of these symbols, and made sure it was checking for them in the copy of "pthread.h" that the compiler will be using.
Created attachment 11205 [details] Include file for Solaris8 to successfully compile httpd 2.0.49 using gcc3
Clarification: during the installation of gcc, it makes a private copy of pthread.h, so if the local copy does not have the two symbols that this bug is about, then gcc will never have them. If a Sun patch is applied to the system later, it will bring only the system copies of pthread.h file up to speed. The local copy that gcc has will still not have the symbols. So when gcc tries to compile proc_mutex.c, it will fail, thus blocking the install. NOTE: this occurs with httpd 2.0.49 also, of course.
OK, thanks for tracking it down. This is a "Don't do that" bug, then: it's not really feasible for configure to detect the mis-match between the gcc fixed-includes and the system headers.