You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Howarth, Richard" <rh...@sgb.co.uk> on 2002/09/13 15:07:29 UTC

[users@httpd] Success! Compiling Apache 2.0.40 on DG/UX R4.20MU07

I've managed to compile Apache 2.0.40 on DU/UX R4.20 MU07.

I had to kludge the configure and edit the top level Makefile.

System type is reported as :  i586-dg-dguxR4.20MU07

The thread definitions were the main problem.  The include file
<sys/pthread.h> has a couple of sets of declarations. I had to
define _POSIX4A_DRAFT10_SOURCE to enable one of the sections.

The thread functions are in /usr/lib/libthread.so, which I had to
add as an extra library.

Also, the real thread functions begin "__d10_".  This specifically
causes a problem for configure, as it cannot locate "pthread_key_delete".
Although this caused HAVE_PTHREAD_KEY_DELETE to be undefined, the function
is still called in the code which causes an unresolved symbol when
httpd is created.

Including <pthread.h> in the configure test helps, but then it chokes
because of the redeclaration of the function, so I changed the declaration
to "int" to match that in the header file.

Finally, "make install" fails because there is a CVS cleanup which errors
when there is no CVS directory to remove.

Here's what I did to get it to compile (and run):
1) Edit srclib/apr/configure and
   i) Add "-D_POSIX4A_DRAFT10_SOURCE" for dgux
   ii) Add "-lthread" for dgux
   iii) Add "<sys/pthread.h>" for pthread_key_delete test
   iv) Change function type to "int" for pthread_key_delete test
2) configure
3) Edit top level makefile and delete lines which clean up "CVS" directories
4) make
5) make install
6) Create a "apache" user and "apache" group
7) Edit http.conf and set the user and group to "apache"
8) apachectl start

Here's a diff for the changes to configure:
===================================================
*** configure.old	Fri Sep 13 13:44:26 2002
--- configure	Fri Sep 13 13:42:55 2002
***************
*** 3071,3080 ****
      *-dg-dgux*)
  
    if test "x$CPPFLAGS" = "x"; then
!     echo "  setting CPPFLAGS to \"-DDGUX\""
!     CPPFLAGS="-DDGUX"
    else
!     apr_addto_bugger="-DDGUX"
      for i in $apr_addto_bugger; do
        apr_addto_duplicate="0"
        for j in $CPPFLAGS; do
--- 3071,3080 ----
      *-dg-dgux*)
  
    if test "x$CPPFLAGS" = "x"; then
!     echo "  setting CPPFLAGS to \"-DDGUX -D_POSIX4A_DRAFT10_SOURCE\""
!     CPPFLAGS="-DDGUX -D_POSIX4A_DRAFT10_SOURCE"
    else
!     apr_addto_bugger="-DDGUX -D_POSIX4A_DRAFT10_SOURCE"
      for i in $apr_addto_bugger; do
        apr_addto_duplicate="0"
        for j in $CPPFLAGS; do
***************
*** 3090,3095 ****
--- 3090,3115 ----
      done
    fi
  
+   if test "x$LIBS" = "x"; then
+     echo "  setting LIBS to \"-lthread\""
+     LIBS="-lthread"
+   else
+     apr_addto_bugger="-lthread"
+     for i in $apr_addto_bugger; do
+       apr_addto_duplicate="0"
+       for j in $LIBS; do
+         if test "x$i" = "x$j"; then
+           apr_addto_duplicate="1"
+           break
+         fi
+       done
+       if test $apr_addto_duplicate = "0"; then
+         echo "  adding \"$i\" to LIBS"
+         LIBS="$LIBS $i"
+       fi
+     done
+   fi
+ 
  	;;
      *os2_emx*)
  
***************
*** 14173,14178 ****
--- 14193,14199 ----
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char $ac_func (); below.  */
  #include <assert.h>
+ #include <pthread.h>
  /* Override any gcc2 internal prototype to avoid an error.  */
  #ifdef __cplusplus
  extern "C"
***************
*** 14179,14186 ****
  #endif
  /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
! char $ac_func ();
! char (*f) ();
  
  #ifdef F77_DUMMY_MAIN
  #  ifdef __cplusplus
--- 14200,14207 ----
  #endif
  /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
! int $ac_func ();
! int (*f) ();
  
  #ifdef F77_DUMMY_MAIN
  #  ifdef __cplusplus

==============================================

Posted in the hope it will save someone else the aggravation ;)

Richard Howarth.


IMPORTANT INFORMATION & CONFIDENTIALITY NOTICE 

The information in this Email is confidential and may be legally privileged.
It is intended solely for the 
named recipient.  Access to this e-mail by anyone else is unauthorised.  If
you are not the intended recipient 
or the employee or agent responsible for delivering the message to the
recipient named, please note that any 
use, disclosure, copying, distribution of this Email or any action taken or
omitted to be taken in reliance 
on it is prohibited.  If you are not the intended recipient, please inform
us by returning a copy of the 
Email with the subject line marked "wrong address" and then deleting the
Email, and any attachments and any 
copies of it. 

Any questions should be directed to mailto:administrator@harsco.com

Harsco uses regularly updated anti-virus software in an attempt to reduce
the possibility of infection.
However we do not guarantee that any attachments to this email are virus
free.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org