You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@arctic.org> on 1997/04/26 10:34:43 UTC
[PATCH] properly clean up linux compilation troubles
This reverts my LINUX_TWEAK patch, which I am regretting submitting. It
detects linux 1.x and 2.x systems. For 1.x systems it leaves their conf.h
defines the same as 1.2b7 and earlier. For 2.x systems it defines the
HAVE_SHMGET, and HAVE_SYS_RESOURCE_H. In both cases it leaves
USE_FCNTL_SERIALIZED_ACCEPT defined since I don't want to introduce the
multiple Listen bug into Linux.
I would really like to get this into 1.2b9. I'm going to go recruit a few
testers from one of the linux lists and report back here.
Can we do 1.2b9 on Sunday night?
Dean
Index: Configuration.tmpl
===================================================================
RCS file: /export/home/cvs/apache/src/Configuration.tmpl,v
retrieving revision 1.59
diff -c -3 -r1.59 Configuration.tmpl
*** Configuration.tmpl 1997/04/25 22:02:44 1.59
--- Configuration.tmpl 1997/04/26 08:30:16
***************
*** 57,63 ****
# functions. The format is: Rule RULE=value
#
# At present, only the following RULES are known: WANTHSREGEX, SOCKS4,
! # STATUS, IRIXNIS, and LINUX_TWEAK.
#
# For all Rules, if set to "yes", then Configure knows we want that
# capability and does what is required to add it in. If set to "default"
--- 57,63 ----
# functions. The format is: Rule RULE=value
#
# At present, only the following RULES are known: WANTHSREGEX, SOCKS4,
! # STATUS, and IRIXNIS.
#
# For all Rules, if set to "yes", then Configure knows we want that
# capability and does what is required to add it in. If set to "default"
***************
*** 80,97 ****
# SGI IRIX. If you are, and you are using NIS, you should set this
# to 'yes'
#
- # LINUX_TWEAK:
- # Only takes effect if Configure determines that you are running a Linux
- # system. This enables two optimizations that work well on i386 linux 2.0
- # or later systems. They aren't enabled by default because of kernel and
- # library problems with various versions of linux. We'd rather release
- # something known stable and let you choose the optimizations yourself.
- #
Rule STATUS=yes
Rule SOCKS4=no
Rule IRIXNIS=no
- Rule LINUX_TWEAK=no
# The following rules should be set automatically by Configure. However, if
# they are not set by Configure (because we don't know the correct value for
--- 80,89 ----
Index: Configure
===================================================================
RCS file: /export/home/cvs/apache/src/Configure,v
retrieving revision 1.92
diff -c -3 -r1.92 Configure
*** Configure 1997/04/15 20:00:21 1.92
--- Configure 1997/04/26 08:30:17
***************
*** 133,139 ****
RULE_STATUS=`./helpers/CutRule STATUS $file`
RULE_SOCKS4=`./helpers/CutRule SOCKS4 $file`
RULE_IRIXNIS=`./helpers/CutRule IRIXNIS $file`
- RULE_LINUX_TWEAK=`./helpers/CutRule LINUX_TWEAK $file`
#
# Now we determine the OS/Platform automagically, thanks to
--- 133,138 ----
***************
*** 259,271 ****
CFLAGS="$CFLAGS -DIRIX"
fi
;;
! *-linux*)
DEF_WANTHSREGEX=yes
OS='Linux'
! CFLAGS="$CFLAGS -DLINUX"
! if [ "$RULE_LINUX_TWEAK" = "yes" ]; then
! CFLAGS="$CFLAGS -DLINUX_TWEAK"
! fi
;;
*-lynx-lynxos*)
OS='LynxOS'
--- 258,272 ----
CFLAGS="$CFLAGS -DIRIX"
fi
;;
! *-linux2)
DEF_WANTHSREGEX=yes
OS='Linux'
! CFLAGS="$CFLAGS -DLINUX=2"
! ;;
! *-linux1)
! DEF_WANTHSREGEX=yes
! OS='Linux'
! CFLAGS="$CFLAGS -DLINUX=1"
;;
*-lynx-lynxos*)
OS='LynxOS'
Index: conf.h
===================================================================
RCS file: /export/home/cvs/apache/src/conf.h,v
retrieving revision 1.93
diff -c -3 -r1.93 conf.h
*** conf.h 1997/04/15 20:00:21 1.93
--- conf.h 1997/04/26 08:30:17
***************
*** 114,119 ****
--- 114,120 ----
#define NO_LONG_DOUBLE
#define HAVE_BSTRING_H
#define NO_LINGCLOSE
+ #define HAVE_SYS_RESOURCE_H
#elif defined(HIUX)
#define HAVE_SYS_RESOURCE_H
***************
*** 253,272 ****
#define NO_USE_SIGACTION
#elif defined(LINUX)
! #ifndef LINUX_TWEAK
! /* the old "stable" way ... it's unfortunate that by doing this we'll incur
! * bug reports from linux users that run multiple Apaches without setting
! * a different ScoreBoardFile for each of them.
! */
! /* #define HAVE_SHMGET */
! #define USE_FCNTL_SERIALIZED_ACCEPT
! #else
! /* this stuff works under 2.0 on i386, but we've had bug reports of it
! * causing compile-time problems on 1.x systems, and on 2.x alphas.
! */
#define HAVE_SHMGET
! /* #define USE_FCNTL_SERIALIZED_ACCEPT */
#endif
#undef HAVE_GMTOFF
#undef NO_KILLPG
#undef NO_SETSID
--- 254,265 ----
#define NO_USE_SIGACTION
#elif defined(LINUX)
! #if LINUX > 1
#define HAVE_SHMGET
! #define HAVE_SYS_RESOURCE_H
! typedef int rlim_t;
#endif
+ #define USE_FCNTL_SERIALIZED_ACCEPT
#undef HAVE_GMTOFF
#undef NO_KILLPG
#undef NO_SETSID
Index: helpers/GuessOS
===================================================================
RCS file: /export/home/cvs/apache/src/helpers/GuessOS,v
retrieving revision 1.18
diff -c -3 -r1.18 GuessOS
*** GuessOS 1997/02/20 00:54:21 1.18
--- GuessOS 1997/04/26 08:30:17
***************
*** 90,96 ****
echo "${MACHINE}-sgi-irix64"; exit 0
;;
! Linux:*)
echo "${MACHINE}-whatever-linux"; exit 0
;;
--- 90,100 ----
echo "${MACHINE}-sgi-irix64"; exit 0
;;
! Linux:2.*)
! echo "${MACHINE}-whatever-linux2"; exit 0
! ;;
!
! Linux:1.*)
echo "${MACHINE}-whatever-linux"; exit 0
;;
Re: [PATCH] properly clean up linux compilation troubles
Posted by Dean Gaudet <dg...@arctic.org>.
I looked a the linux kernel code for alpha and it does define SHM_R and
SHM_W, and it does support them. So I'm not convinced that the user in
#336 had their system properly installed. I'm finding some people to test
it for me.
I seem to recall shm stuff being an option in the 1.x kernels... but I've
also been cautioned by the kernel folk that shared memory wasn't very
stable. So yeah while we might be able to find some define or something,
I don't think it's worth it. In particular, 2.0.30 is lightyears ahead of
1.x in terms of performance.
I'll fix the typo. And support linux 3.
Dean
On Sat, 26 Apr 1997, Paul Sutton wrote:
> On Sat, 26 Apr 1997, Dean Gaudet wrote:
> > This reverts my LINUX_TWEAK patch, which I am regretting submitting. It
> > detects linux 1.x and 2.x systems. For 1.x systems it leaves their conf.h
> > defines the same as 1.2b7 and earlier. For 2.x systems it defines the
> > HAVE_SHMGET, and HAVE_SYS_RESOURCE_H. In both cases it leaves
> > USE_FCNTL_SERIALIZED_ACCEPT defined since I don't want to introduce the
> > multiple Listen bug into Linux.
>
> I agree in principle with this patch (and particularly getting rid of
> LINUX_TWEAK). However didn't PR#336 have the problem that SHMGET did not
> exists on Alpha hardware, although they were using a v2 kernel? Perhaps
> the check in the Configure script should be for
>
> i?86-*-linux2
>
> instead?
>
> Also if 1.2 might be out there for a long time, isn't it possible there'll
> be a Linux 3 in the future? To make it a bit more future-proof, why not
> check for Linux:[2-9].* instead of just Linux:2.*
>
> Incidently, I don't seem to have any problems with SHMGET on my Linux
> 1.2.13 system (from a RedHat distribution). If many or most 1.2 and higher
> users are ok with shared memory, but Apache defaults to a file, many
> people will get less than optimum performance. Isn't there any other more
> portable way to check if a _particular_ system has shared memory (e.g.
> look for an include file, try and compile a program with shmget() in it
> and see if it fails)? I think autoconf would be very useful here.
>
> Also one little typo:
>
> Configure:
> > ! *-linux2)
> > DEF_WANTHSREGEX=yes
> > OS='Linux'
> > ! CFLAGS="$CFLAGS -DLINUX=2"
> > ! ;;
> > ! *-linux1)
> > ! DEF_WANTHSREGEX=yes
> > ! OS='Linux'
> > ! CFLAGS="$CFLAGS -DLINUX=1"
>
> GuessOS:
> > ! Linux:2.*)
> > ! echo "${MACHINE}-whatever-linux2"; exit 0
> > ! ;;
> > !
> > ! Linux:1.*)
> > echo "${MACHINE}-whatever-linux"; exit 0
> > ;;
> ^^^^^^
> linux1
>
> //pcs
>
>
>
Re: [PATCH] properly clean up linux compilation troubles
Posted by Paul Sutton <pa...@ukweb.com>.
On Sat, 26 Apr 1997, Dean Gaudet wrote:
> This reverts my LINUX_TWEAK patch, which I am regretting submitting. It
> detects linux 1.x and 2.x systems. For 1.x systems it leaves their conf.h
> defines the same as 1.2b7 and earlier. For 2.x systems it defines the
> HAVE_SHMGET, and HAVE_SYS_RESOURCE_H. In both cases it leaves
> USE_FCNTL_SERIALIZED_ACCEPT defined since I don't want to introduce the
> multiple Listen bug into Linux.
I agree in principle with this patch (and particularly getting rid of
LINUX_TWEAK). However didn't PR#336 have the problem that SHMGET did not
exists on Alpha hardware, although they were using a v2 kernel? Perhaps
the check in the Configure script should be for
i?86-*-linux2
instead?
Also if 1.2 might be out there for a long time, isn't it possible there'll
be a Linux 3 in the future? To make it a bit more future-proof, why not
check for Linux:[2-9].* instead of just Linux:2.*
Incidently, I don't seem to have any problems with SHMGET on my Linux
1.2.13 system (from a RedHat distribution). If many or most 1.2 and higher
users are ok with shared memory, but Apache defaults to a file, many
people will get less than optimum performance. Isn't there any other more
portable way to check if a _particular_ system has shared memory (e.g.
look for an include file, try and compile a program with shmget() in it
and see if it fails)? I think autoconf would be very useful here.
Also one little typo:
Configure:
> ! *-linux2)
> DEF_WANTHSREGEX=yes
> OS='Linux'
> ! CFLAGS="$CFLAGS -DLINUX=2"
> ! ;;
> ! *-linux1)
> ! DEF_WANTHSREGEX=yes
> ! OS='Linux'
> ! CFLAGS="$CFLAGS -DLINUX=1"
GuessOS:
> ! Linux:2.*)
> ! echo "${MACHINE}-whatever-linux2"; exit 0
> ! ;;
> !
> ! Linux:1.*)
> echo "${MACHINE}-whatever-linux"; exit 0
> ;;
^^^^^^
linux1
//pcs