Bug 27172 - Problem building httpd 2.0.48 on Solaris 2.8
Summary: Problem building httpd 2.0.48 on Solaris 2.8
Alias: None
Product: APR
Classification: Unclassified
Component: APR (show other bugs)
Version: 0.9.4
Hardware: Sun Solaris
: P3 blocker (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL: http://www.cs.umb.edu/~kimmylin/httpd...
Keywords: ErrorMessage
Depends on:
Reported: 2004-02-23 18:29 UTC by Kimmy Lin
Modified: 2004-11-16 19:05 UTC (History)
1 user (show)

config.log under srlib/apr (155.06 KB, text/plain)
2004-02-23 18:32 UTC, Kimmy Lin
Output running ./configure (41.08 KB, text/plain)
2004-02-23 18:32 UTC, Kimmy Lin
Include file for Solaris8 to successfully compile httpd 2.0.49 using gcc3 (12.66 KB, text/plain)
2004-04-10 01:07 UTC, Bill Bruns

Note You need to log in before you can comment on or make changes to this bug.
Description Kimmy Lin 2004-02-23 18:29:06 UTC
> 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)
Comment 1 Kimmy Lin 2004-02-23 18:32:16 UTC
Created attachment 10500 [details]
config.log under srlib/apr
Comment 2 Kimmy Lin 2004-02-23 18:32:56 UTC
Created attachment 10501 [details]
Output running ./configure
Comment 3 Joe Orton 2004-02-24 17:15:30 UTC
If you run configure like


does it build?
Comment 4 Kimmy Lin 2004-02-24 17:40:01 UTC
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.
Comment 5 Bill Bruns 2004-04-09 18:39:16 UTC
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 
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.
Comment 6 Bill Bruns 2004-04-10 01:07:34 UTC
Created attachment 11205 [details]
Include file for Solaris8 to successfully compile httpd 2.0.49 using gcc3
Comment 7 Bill Bruns 2004-04-10 01:13:14 UTC
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.
Comment 8 Joe Orton 2004-04-13 10:21:42 UTC
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.