You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Stipe Tolj <to...@wapme-systems.de> on 2001/10/10 19:08:26 UTC

[PATCH] 1.3: fix for broken binbuild.sh on Cygwin 1.x platform

Hi,

I have a couple of things to change to support again
src/helpers/binbuild.sh for the "new" shared module support of the
Cygwin 1.x platform.

Please commit to CVS -- Bill, Martin?!

Here are the changes:

  * src/Configure: changed OS_MODULE_INCLUDE to full path. This is
necessary because src/modules/proxy/Makefile includes it too and could
not find it otherwise.

  * src/helpers/binbuild.sh: added "standard" CONFIGPARAM for Cygwin
platform and a kludge to force binbuild.sh to run "make" twice for
Cygwin. See src/modules/standard/Makefile.Cygwin for why this is
needed. Can we do this better?

  * src/helpers/install.sh: changed again if statement that attaches
".exe" extensions to $src and $dst. Martin, AFAIK, this code has
_only_ effect on Cygwin. The way it is done now does _not_ work, both
if statements are true and hence the extension is _not_ attached to
the vars. We need to change this! _please_ - binbuild.sh relies on a
clean install.sh to run.

  * src/modules/proxy/Makefile.tmpl: added a kludge to handle
libproxy.dll for Cygwin. Since binbuild.sh now support the
"traditional" build setup on Cygwin here is where the pain begins.
Cygwin produces DLLs as shared modules and the target "libproxy.dll"
seems to be only for OS/2 here. So we need to handle both OS (OS/2 and
Cygwin) for that target in a different way. Any suggestions on how to
do this better?

  * src/modules/standard/Makefile.Cygwin: added target rule for the
.def file required by the target "libproxy.dll" within
src/modules/proxy/Makefile.tmpl (the kludge above). Added a file
checking if the Cygwin specific compilation warning is shown. This is
used to ensure the warning is shown only once, even if there are
several shared modules to be linked.


That's it.

Stipe

tolj@wapme-systems.de
-------------------------------------------------------------------
Wapme Systems AG

Münsterstr. 248
40470 Düsseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: info@wapme-systems.de
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are

Re: [PATCH] 1.3: fix for broken binbuild.sh on Cygwin 1.x platform

Posted by Stipe Tolj <to...@wapme-systems.de>.
> I was not aware of that; thanks for explaining. Until now, I thought
> it only gave FALSE for "[ ! -f httpd ]", that's why I reversed the test
> to check for "[ -f httpd ]". Sorry for the misunderstanding.

:))

> Does that mean that a test "[ -f httpd ] && cat httpd >/dev/null 2>&1"
> must be used to be sure? Well, so be it.

yes, this works!

> I was only afraid that --if somehow I created an httpd.exe with whatever
> contents in my unix directory-- then magically install.sh would behave
> incorrectly. That's why I would prefer a safer (safer for unix) check.

I know. -- may I resend a patch or are you going to the the install.sh
changes?

> Hmmm. The possibility _is_ remote, granted; but still: can the test case
> be somehow changed to be better suited for systems where we KNOW that they
> sometimes need *.exe suffixes?

now, if the _need_ .exe extensions for their executables, then they
will propably need to set ".exe" as extensions within install.sh to do
a clean "make install", if they _use_ install.sh.

This would fit the .exe extension paradigm for all needed systems.

Stipe

tolj@wapme-systems.de
-------------------------------------------------------------------
Wapme Systems AG

Münsterstr. 248
40470 Düsseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: info@wapme-systems.de
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are

Re: [PATCH] 1.3: fix for broken binbuild.sh on Cygwin 1.x platform

Posted by Martin Kraemer <Ma...@Fujitsu-Siemens.com>.
On Thu, Oct 11, 2001 at 06:38:17PM +0200, Stipe Tolj wrote:
> First of all, of course all unix brands use install.sh (I knot that).
> Second, Cygwin gives boolean TRUE for both if checks, that means for
> if [ -f httpd ] _and_ [ -f httpd.exe ], even while there resists
> _only_ httpd.exe in that dir.

I was not aware of that; thanks for explaining. Until now, I thought
it only gave FALSE for "[ ! -f httpd ]", that's why I reversed the test
to check for "[ -f httpd ]". Sorry for the misunderstanding.

> So following current install.sh we do _not_ get the extension set to
> ".exe", fine so long.
> 
> Now the copy facility tries to copy httpd and _not_ httpd.exe, this
> fails!!! because there is no httpd.

Does that mean that a test "[ -f httpd ] && cat httpd >/dev/null 2>&1"
must be used to be sure? Well, so be it.

I was only afraid that --if somehow I created an httpd.exe with whatever
contents in my unix directory-- then magically install.sh would behave
incorrectly. That's why I would prefer a safer (safer for unix) check.

Hmmm. The possibility _is_ remote, granted; but still: can the test case
be somehow changed to be better suited for systems where we KNOW that they
sometimes need *.exe suffixes?

   Martin
-- 
<Ma...@Fujitsu-Siemens.com>         |     Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany

Re: [PATCH] 1.3: fix for broken binbuild.sh on Cygwin 1.x platform

Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
Err... so -f httpd is coded to return true for httpd.exe?

Just want to clarify.

I'm working on win32/perl/shell/make stuff right now, and hope someday
to leverage the make system.

Bill

----- Original Message -----
From: "Stipe Tolj" <to...@wapme-systems.de>
To: <de...@httpd.apache.org>
Sent: Thursday, October 11, 2001 12:14 PM
Subject: Re: [PATCH] 1.3: fix for broken binbuild.sh on Cygwin 1.x platform


> > Please don't make the assumption that non-cygwin ports will never use
> > install.sh.
>
> it's very unlikely that Win32 native will use it, isn't it?
>
> > Why do we find 'httpd' and 'httpd.exe'?  That's where I get confused.
>
> Cygwin's shell internals, who knows :))
>
> Stipe
>
> tolj@wapme-systems.de
> -------------------------------------------------------------------
> Wapme Systems AG
>
> Münsterstr. 248
> 40470 Düsseldorf
>
> Tel: +49-211-74845-0
> Fax: +49-211-74845-299
>
> E-Mail: info@wapme-systems.de
> Internet: http://www.wapme-systems.de
> -------------------------------------------------------------------
> wapme.net - wherever you are
>


Re: [PATCH] 1.3: fix for broken binbuild.sh on Cygwin 1.x platform

Posted by Stipe Tolj <to...@wapme-systems.de>.
> Please don't make the assumption that non-cygwin ports will never use
> install.sh.

it's very unlikely that Win32 native will use it, isn't it?

> Why do we find 'httpd' and 'httpd.exe'?  That's where I get confused.

Cygwin's shell internals, who knows :))

Stipe

tolj@wapme-systems.de
-------------------------------------------------------------------
Wapme Systems AG

Münsterstr. 248
40470 Düsseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: info@wapme-systems.de
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are

Re: [PATCH] 1.3: fix for broken binbuild.sh on Cygwin 1.x platform

Posted by "William A. Rowe, Jr." <wr...@covalent.net>.
From: "Stipe Tolj" <to...@wapme-systems.de>
Sent: Thursday, October 11, 2001 11:38 AM


> First of all, of course all unix brands use install.sh (I knot that).
> Second, Cygwin gives boolean TRUE for both if checks, that means for
> if [ -f httpd ] _and_ [ -f httpd.exe ], even while there resists
> _only_ httpd.exe in that dir.
> 
> So following current install.sh we do _not_ get the extension set to
> ".exe", fine so long.
> 
> Now the copy facility tries to copy httpd and _not_ httpd.exe, this
> fails!!! because there is no httpd.
> 
> AFAIK, Cygwin is the _only_ OS which fits these two conditions:
> 
>   1) if a Win32 system, so produces httpd.exe
>   2) is the _only_ Win32 system running install.sh
> 
> so it is obvious that the proposed change has no impact on other unix
> or even the Win32 (which does not use install.sh at all).

Please don't make the assumption that non-cygwin ports will never use
install.sh.

Why do we find 'httpd' and 'httpd.exe'?  That's where I get confused.

Bill


Re: [PATCH] 1.3: fix for broken binbuild.sh on Cygwin 1.x platform

Posted by Stipe Tolj <to...@wapme-systems.de>.
> > why, httpd.exe is probably only available on Win32 systems, and
> > install.sh itself is not running on any other OS then Cygwin?!?!
> 
> What? There are Un*x's out there, and they sure run it. It's not a
> private Cygwin thingie. So you have to maintain the interoperability
> with Unix (and clones).
> My suggestion is that you simply leave it as it is: as you don't
> have "httpd", but you have "httpd.exe", the if..then case does not
> apply to you, and the else case does what you want.
> 
> > Any other suggestion would be recommended. We _need_ install.sh to run
> > clean, so "make install" works propably.
> 
> What _is_ the problem with if [ -f httpd ]; then do nothing;
> else set extension to .exe ?

I think we are talking beside each other for a while for this
install.sh thing. I clean this up now:

First of all, of course all unix brands use install.sh (I knot that).
Second, Cygwin gives boolean TRUE for both if checks, that means for
if [ -f httpd ] _and_ [ -f httpd.exe ], even while there resists
_only_ httpd.exe in that dir.

So following current install.sh we do _not_ get the extension set to
".exe", fine so long.

Now the copy facility tries to copy httpd and _not_ httpd.exe, this
fails!!! because there is no httpd.

AFAIK, Cygwin is the _only_ OS which fits these two conditions:

  1) if a Win32 system, so produces httpd.exe
  2) is the _only_ Win32 system running install.sh

so it is obvious that the proposed change has no impact on other unix
or even the Win32 (which does not use install.sh at all).


Stipe

tolj@wapme-systems.de
-------------------------------------------------------------------
Wapme Systems AG

Münsterstr. 248
40470 Düsseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: info@wapme-systems.de
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are

Re: [PATCH] 1.3: fix for broken binbuild.sh on Cygwin 1.x platform

Posted by Martin Kraemer <Ma...@Fujitsu-Siemens.com>.
On Thu, Oct 11, 2001 at 05:29:31PM +0200, Stipe Tolj wrote:
> > Also, for me this is a "-1".
> 
> it ain't a major problem. I can build a clean binbuild.sh tarball by
> hand the same way.

A "-1" is not a veto for all times. It's a hint that you can
resubmit an updated patch ;-)

> > > +  if [ "x$MAKERERUN" = "xyes" ]; then make; fi && \
> > 
> > uhmmm. I am not 100% sure whether ... && if []; then ... fi &&
> > will be digested correctly by all shells.
> 
> this may not be the best way, I know. The problem is that we currently
> require to run "make" twice on Cygwin, because the libhttpd.dll
> library is not available while the first run and we have to re-run so
> the shared modules can be linked.
> 
> Any suggestion on how this may be done better?

MAKERERUN is, I think, uninitialized (should be set to "no", so that
it is not inherited from the environment).
MAKERUN should be documented (cut&paste your explanation, that's fine).

> 
> why, httpd.exe is probably only available on Win32 systems, and
> install.sh itself is not running on any other OS then Cygwin?!?!

What? There are Un*x's out there, and they sure run it. It's not a
private Cygwin thingie. So you have to maintain the interoperability
with Unix (and clones).
My suggestion is that you simply leave it as it is: as you don't
have "httpd", but you have "httpd.exe", the if..then case does not
apply to you, and the else case does what you want.

> Any other suggestion would be recommended. We _need_ install.sh to run
> clean, so "make install" works propably.

What _is_ the problem with if [ -f httpd ]; then do nothing;
else set extension to .exe ?

> > I am unsure about the next one. It looks to me as though the
> [...]
> Makefile.Cygwin is _only_ included via Configure settings for Cygwin,
> so there is no impact on other OS.

Oops, an oversight. Course, you're right.

   Martin
-- 
<Ma...@Fujitsu-Siemens.com>         |     Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany

Re: [PATCH] 1.3: fix for broken binbuild.sh on Cygwin 1.x platform

Posted by Stipe Tolj <to...@wapme-systems.de>.
> Please send the attachments as "text/plain", not as
> "application/x-unknown-content-type-diff_auto_file".

sorry, Nescape seems to be bogus here.

> Also, for me this is a "-1".

it ain't a major problem. I can build a clean binbuild.sh tarball by
hand the same way.

> > diff -ur apache_1.3.22/src/helpers/binbuild.sh apache_1.3.22-cygwin/src/helpers/binbuild.sh
> > --- apache_1.3.22/src/helpers/binbuild.sh     Tue Jun 12 08:39:01 2001
> > +++ apache_1.3.22-cygwin/src/helpers/binbuild.sh      Wed Oct 10 14:24:56 2001
> > @@ -55,6 +55,7 @@
> >    rm -rf bindist install-bindist.sh *.bindist
> >    echo "----------------------------------------------------------------------" && \
> >    make && \
> > +  if [ "x$MAKERERUN" = "xyes" ]; then make; fi && \
> 
> uhmmm. I am not 100% sure whether ... && if []; then ... fi &&
> will be digested correctly by all shells.

this may not be the best way, I know. The problem is that we currently
require to run "make" twice on Cygwin, because the libhttpd.dll
library is not available while the first run and we have to re-run so
the shared modules can be linked.

Any suggestion on how this may be done better?

> > --- apache_1.3.22/src/helpers/install.sh      Tue Jun 12 10:24:53 2001
> > +++ apache_1.3.22-cygwin/src/helpers/install.sh       Wed Oct 10 15:28:32 2001
> > @@ -90,11 +90,7 @@
> >  #  Check if we need to add an executable extension (such as ".exe")
> >  #  on specific OS to src and dst
> >  if [ -f "$src.exe" ]; then
> > -  if [ -f "$src" ]; then
> > -    : # Cygwin [ test ] is too stupid to do [ -f "$src.exe" ] && [ ! -f "$src" ]
> > -  else
> > -    ext=".exe"
> > -  fi
> > +  ext=".exe"
> >  fi
> 
> No. We've has that discussion before, and I am not going to switch to
> the ".exe" suffix if both httpd AND httpd.exe happen to reside in my
> unix directory. Therefore I want this extra test. But you could convince
> the cugwin people to fix their implementation of the "test" command, to
> get rid of the comment.

why, httpd.exe is probably only available on Win32 systems, and
install.sh itself is not running on any other OS then Cygwin?!?!

Any other suggestion would be recommended. We _need_ install.sh to run
clean, so "make install" works propably.

> I am unsure about the next one. It looks to me as though the
> logic  would change quite a lot (echo $(shared_dll); execute $(shared_dll);)
> but the Win32, OS/2 and Netware developers should decide about that.
> Maybe it's an improvement - i am simply ignorant.

Makefile.Cygwin is _only_ included via Configure settings for Cygwin,
so there is no impact on other OS.

See ya,
Stipe

tolj@wapme-systems.de
-------------------------------------------------------------------
Wapme Systems AG

Münsterstr. 248
40470 Düsseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: info@wapme-systems.de
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are

Re: [PATCH] 1.3: fix for broken binbuild.sh on Cygwin 1.x platform

Posted by Martin Kraemer <Ma...@Fujitsu-Siemens.com>.
On Wed, Oct 10, 2001 at 07:08:26PM +0200, Stipe Tolj wrote:
> Hi,
> 
> I have a couple of things to change to support again
> src/helpers/binbuild.sh for the "new" shared module support of the
> Cygwin 1.x platform.
> 
> Please commit to CVS -- Bill, Martin?!

Please send the attachments as "text/plain", not as
"application/x-unknown-content-type-diff_auto_file".

Also, for me this is a "-1".


> diff -ur apache_1.3.22/src/helpers/binbuild.sh apache_1.3.22-cygwin/src/helpers/binbuild.sh
> --- apache_1.3.22/src/helpers/binbuild.sh	Tue Jun 12 08:39:01 2001
> +++ apache_1.3.22-cygwin/src/helpers/binbuild.sh	Wed Oct 10 14:24:56 2001
> @@ -55,6 +55,7 @@
>    rm -rf bindist install-bindist.sh *.bindist
>    echo "----------------------------------------------------------------------" && \
>    make && \
> +  if [ "x$MAKERERUN" = "xyes" ]; then make; fi && \

uhmmm. I am not 100% sure whether ... && if []; then ... fi &&
will be digested correctly by all shells.

> --- apache_1.3.22/src/helpers/install.sh	Tue Jun 12 10:24:53 2001
> +++ apache_1.3.22-cygwin/src/helpers/install.sh	Wed Oct 10 15:28:32 2001
> @@ -90,11 +90,7 @@
>  #  Check if we need to add an executable extension (such as ".exe") 
>  #  on specific OS to src and dst
>  if [ -f "$src.exe" ]; then
> -  if [ -f "$src" ]; then
> -    : # Cygwin [ test ] is too stupid to do [ -f "$src.exe" ] && [ ! -f "$src" ]
> -  else
> -    ext=".exe"
> -  fi
> +  ext=".exe"
>  fi

No. We've has that discussion before, and I am not going to switch to
the ".exe" suffix if both httpd AND httpd.exe happen to reside in my
unix directory. Therefore I want this extra test. But you could convince
the cugwin people to fix their implementation of the "test" command, to
get rid of the comment.

I am unsure about the next one. It looks to me as though the
logic  would change quite a lot (echo $(shared_dll); execute $(shared_dll);)
but the Win32, OS/2 and Netware developers should decide about that.
Maybe it's an improvement - i am simply ignorant.

> diff -ur apache_1.3.22/src/modules/standard/Makefile.Cygwin apache_1.3.22-cygwin/src/modules/standard/Makefile.Cygwin
> --- apache_1.3.22/src/modules/standard/Makefile.Cygwin	Fri Sep 28 11:29:02 2001
> +++ apache_1.3.22-cygwin/src/modules/standard/Makefile.Cygwin	Wed Oct 10 11:06:05 2001
> @@ -28,23 +28,31 @@
>          $(SRCDIR)/$(SHCORE_IMPLIB) $(LIBS1)
>  endef
>  
> +%.def : %.c
> +	touch $*.def
> +
>  %.lo : %.c
>  	$(CC) -c $(INCLUDES) $(CFLAGS) $(CFLAGS_SHLIB) $< && mv $*.o $*.lo
>  
>  %.dll : %.lo
>  	@if [ -f "$(SRCDIR)/$(SHCORE_IMPLIB)" ]; then \
> +        rm -f $(SRCDIR)/$(SHCORE_IMPLIB).$$; \
>          echo $(shared_dll); \
>  		$(shared_dll); \
>  	else \
> -	    echo "+--------------------------------------------------------+"; \
> -		echo "| There is no shared core 'libhttpd.dll' available!      |"; \
> -		echo "|                                                        |"; \
> -		echo "| This is obviously your first 'make' run with configure |"; \
> -		echo "| flag SHARED_CORE enabled and shared modules.           |"; \
> -		echo "|                                                        |"; \
> -		echo "| You will have to re-run 'make' after this run builds   |"; \
> -		echo "| the required shared import library!                    |"; \
> -	    echo "+--------------------------------------------------------+"; \
> -        sleep 10; \
> +        if [ ! -f "$(SRCDIR)/$(SHCORE_IMPLIB).$$" ]; then \
> +	      echo "+--------------------------------------------------------+"; \
> +		  echo "| There is no shared core 'libhttpd.dll' available!      |"; \
> +		  echo "|                                                        |"; \
> +		  echo "| This is obviously your first 'make' run with configure |"; \
> +		  echo "| flag SHARED_CORE enabled and shared modules.           |"; \
> +		  echo "|                                                        |"; \
> +		  echo "| You will have to re-run 'make' after this run builds   |"; \
> +		  echo "| the required shared import library!                    |"; \
> +		  echo "+--------------------------------------------------------+"; \
> +		  sleep 10; \
> +          touch $(SRCDIR)/$(SHCORE_IMPLIB).$$; \
> +        fi; \
>  	fi;
> +

   Martin
-- 
<Ma...@Fujitsu-Siemens.com>         |     Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany