You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Sander Striker <st...@apache.org> on 2003/03/27 20:36:26 UTC

Refactoring apxs, WAS: RE: using installed apxs when apr and apache are installed in different directories

> From: Thom May [mailto:thom@planetarytramp.net]
> Sent: Thursday, March 27, 2003 8:17 PM

> * Thom May (thom@planetarytramp.net) wrote :
>> * Jeff Trawick (trawick@attglobal.net) wrote :
>>> can somebody confirm my results?
>>> 
>>> apxs -c mod_foo.c
>>> 
>>> first breakage is due to libtool referenced from wrong directory (apxs 
>>> looks for libtool in apache's installbuilddir instead of apr's)
>>> 
>>> once that is fixed, now only Apache includes are found so still nothing 
>>> will compile since we need to find APR includes also
>> yup, been looking at this for a teeny while but work keeps interupting :/
>> The solution I was looking at was to add a new argument that would allow
>> apxs to return true include and link lines, including the information for
>> apr and apr-util.
>> I'm not entirely happy that this is the right route to take, but can't
>> currently think of a better one.
> 
> Ok, so sander and I were just discussing the creation of an httpd-config
> script, analogous to apr-config etc, which apxs or module developers could
> just call at need. 
> Apxs could then shed a lot of code and become a program specifically to
> build modules, rather than also having to be used to query build variables
> and the myriad of other stuff it currently does.
>
> Thoughts?

Just chiming in... Currently we have a dependency on perl to figure out
stuff like include dirs etc, which is a bit silly.  httpd-config could be
done as a shell script, removing that dependency.

Specializing apxs sounds like a good idea aswell.

Sander

Re: Refactoring apxs, WAS: RE: using installed apxs when apr and apache are installed in different directories

Posted by Thom May <th...@planetarytramp.net>.
* Justin Erenkrantz (justin@erenkrantz.com) wrote :
> --On Thursday, March 27, 2003 8:44 PM +0000 Thom May 
> <th...@planetarytramp.net> wrote:
> 
> >can we really not rely on /bin/sh doing something vaguely posix-ish?
> 
> Nah, we can.
> 
> apr-config should work on any real /bin/sh - it's already used right now in 
> httpd's configure script to query APR's flags, so if there was a problem 
> with a Unix-like platform, it should have made itself obvious by now.  -- 
yeah, that's what i thought...
-Thom

PHP Causing Worker MPM children to segfault

Posted by Tim Nagel <ti...@merkworx.com>.
Hi all.

Im not totally sure on how to go about this, but installing WROWE_2_0_45_RC2
tagged httpd-2, and loading the compiled libphp4.so into apache, seems to go
fine.

But to access a file that needs php to parse(or whatever it does ;)), causes
the child to segfault.

What sort of details do i need to provide(if any), to which list, and is
there any easy method of determining the problem?

Thanks in Advance.

Tim Nagel
tim@merkworx.com


Re: Refactoring apxs, WAS: RE: using installed apxs when apr and apache are installed in different directories

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Thursday, March 27, 2003 8:44 PM +0000 Thom May <th...@planetarytramp.net> 
wrote:

> can we really not rely on /bin/sh doing something vaguely posix-ish?

Nah, we can.

apr-config should work on any real /bin/sh - it's already used right now in 
httpd's configure script to query APR's flags, so if there was a problem with 
a Unix-like platform, it should have made itself obvious by now.  -- justin

Re: Refactoring apxs, WAS: RE: using installed apxs when apr and apache are installed in different directories

Posted by Thom May <th...@planetarytramp.net>.
* Ian Holsman (ianh@apache.org) wrote :
> Sander Striker wrote:
> >>From: Thom May [mailto:thom@planetarytramp.net]
> >>Sent: Thursday, March 27, 2003 8:17 PM
> >
> >Just chiming in... Currently we have a dependency on perl to figure out
> >stuff like include dirs etc, which is a bit silly.  httpd-config could be
> >done as a shell script, removing that dependency.
> >
> 
> and which shell do you propose to standardise on ?
> 
> just from personal experience, I don't think there is one shell
> which is available on *every* system that we support.
can we really not rely on /bin/sh doing something vaguely posix-ish?
-Thom

RE: Refactoring apxs

Posted by Sander Striker <st...@apache.org>.
> From: Ian Holsman [mailto:ianh@apache.org]
> Sent: Thursday, March 27, 2003 9:10 PM

> Sander Striker wrote:
> >>From: Thom May [mailto:thom@planetarytramp.net]
> >>Sent: Thursday, March 27, 2003 8:17 PM
> > 
> > Just chiming in... Currently we have a dependency on perl to figure out
> > stuff like include dirs etc, which is a bit silly.  httpd-config could be
> > done as a shell script, removing that dependency.
> > 
> 
> and which shell do you propose to standardise on ?

The same one we standardized apr-config on?
 
> just from personal experience, I don't think there is one shell
> which is available on *every* system that we support.

Hmpf.

Sander


Re: Refactoring apxs, WAS: RE: using installed apxs when apr and apache are installed in different directories

Posted by Ian Holsman <ia...@apache.org>.
Sander Striker wrote:
>>From: Thom May [mailto:thom@planetarytramp.net]
>>Sent: Thursday, March 27, 2003 8:17 PM
> 
> Just chiming in... Currently we have a dependency on perl to figure out
> stuff like include dirs etc, which is a bit silly.  httpd-config could be
> done as a shell script, removing that dependency.
> 

and which shell do you propose to standardise on ?

just from personal experience, I don't think there is one shell
which is available on *every* system that we support.
> 
> Sander
> 



Re: Refactoring apxs, WAS: RE: using installed apxs when apr and apache are installed in different directories

Posted by Thom May <th...@planetarytramp.net>.
* William A. Rowe, Jr. (wrowe@rowe-clan.net) wrote :
> At 11:58 AM 5/21/2003, you wrote:
> >Is the first bit meaning:
> >if you try and have an httpd-config, you'll break apxs on Win32? but this
> >makes no sense to me, cos surely ap{r,u}-config will have already broken
> >apxs for you?
> 
> No, apxs for 2.0 is altogether broken for us, it needs surgery to become 
> a useful tool again on Win32.  If you look at apache-1.3 you will see that
> I'd thunked what we needed and everything was working ok.  apxs for 2.0
> is too radically different.
>
Right. But how do we get to that point? Is it actually worth thinking about
having a totally different tool for windows? It seems that the route it
would need to go down is potentially different enough that that might be a
less resource intensive approach?

> >My suggestion for httpd-config and the refactoring of apxs would reduce apxs 
> >to as minimal as possible a wrapper for the *-config scripts; really it
> >would only be there for backwards compatibility and to allow the easy
> >production of Makefiles for modules.
> 
> The upshot - anything you put into perl we can somehow ultimately deal
> with.  Anything that is shell script will have no value in ever getting all of
> the plumbing hooked up for Win32 :-)
> 
OIC. :-) 
-Thom

Re: Refactoring apxs, WAS: RE: using installed apxs when apr and apache are installed in different directories

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 11:58 AM 5/21/2003, you wrote:
>> 
>> Actually, Thom's point actually makes win32 much *easier* to set up to
>> support APXs on win32... if we can only get rid of the libtool dependency ;-)
>> In any case, I'm thinking if you want to create a parallel .sh script and we
>> can all agree to keep the .sh and .pl flavors of apxs in working order, this
>> could be a good thing for everyone :-)
>> 
>OK, i just reread this thread in the light of what I just commited to
>httpd-2.0/STATUS; and this comment still somewhat confuses me :-)
>
>Is the first bit meaning:
>if you try and have an httpd-config, you'll break apxs on Win32? but this
>makes no sense to me, cos surely ap{r,u}-config will have already broken
>apxs for you?

No, apxs for 2.0 is altogether broken for us, it needs surgery to become 
a useful tool again on Win32.  If you look at apache-1.3 you will see that
I'd thunked what we needed and everything was working ok.  apxs for 2.0
is too radically different.

>Does apxs actually make sense on Win32 anyway? As Will points out, it's very
>dependent on libtool. 

The idea may be a 'libtool'ish thunk, borrowing on Jeff's or Brian's work.

>My suggestion for httpd-config and the refactoring of apxs would reduce apxs 
>to as minimal as possible a wrapper for the *-config scripts; really it
>would only be there for backwards compatibility and to allow the easy
>production of Makefiles for modules.

The upshot - anything you put into perl we can somehow ultimately deal
with.  Anything that is shell script will have no value in ever getting all of
the plumbing hooked up for Win32 :-)

Bill



RE: Refactoring apxs, WAS: RE: using installed apxs when apr and apache are installed in different directories

Posted by "Marc M. Adkins" <mm...@Doorways.org>.
> Does apxs actually make sense on Win32 anyway?

Hoping I don't misunderstand the context of the question...

I run the binary Windows release of 2.0.45.  Which doesn't come with apxs.
I wanted to build a non-core module.  Wrote myself a makefile, NBD, all the
include files and libraries were there.  Still, 'twould have been nice to
have a tool to build and install the module.

Note that on Linux I build from source and would have had apxs.  On Windows
building (pretty much _any_ open source software) from source tends to put
me in a bad mood so I download binaries, but not all third-party modules
come as binaries.

So not only does apxs make sense to me for win32 but I would make a case for
it being distributed as part of the binary if at all possible.  I'm sure
it's not possible now, but if you're re-architecting it anyway maybe that
can be addressed.

If it's a script, I would generally prefer Perl to shell.  Perl downloads as
a single entity (load-n-go) vs. the many variants of unix shell look-alikes
I always seem to get mired in when I have to run a shell script on Windows.
But this last bit is more personal preference than reasoned argument.

mma


Re: Refactoring apxs, WAS: RE: using installed apxs when apr and apache are installed in different directories

Posted by Thom May <th...@planetarytramp.net>.
* William A. Rowe, Jr. (wrowe@rowe-clan.net) wrote :
> At 01:36 PM 3/27/2003, Sander Striker wrote:
> >> From: Thom May [mailto:thom@planetarytramp.net]
> >> 
> >> Ok, so sander and I were just discussing the creation of an httpd-config
> >> script, analogous to apr-config etc, which apxs or module developers could
> >> just call at need. 
> >> Apxs could then shed a lot of code and become a program specifically to
> >> build modules, rather than also having to be used to query build variables
> >> and the myriad of other stuff it currently does.
> >
> >Just chiming in... Currently we have a dependency on perl to figure out
> >stuff like include dirs etc, which is a bit silly.  httpd-config could be
> >done as a shell script, removing that dependency.
> 
> WHOH!  Go ahead, f* us win32 users ;-)
> 
> Actually, Thom's point actually makes win32 much *easier* to set up to
> support APXs on win32... if we can only get rid of the libtool dependency ;-)
> In any case, I'm thinking if you want to create a parallel .sh script and we
> can all agree to keep the .sh and .pl flavors of apxs in working order, this
> could be a good thing for everyone :-)
> 
OK, i just reread this thread in the light of what I just commited to
httpd-2.0/STATUS; and this comment still somewhat confuses me :-)

Is the first bit meaning:
if you try and have an httpd-config, you'll break apxs on Win32? but this
makes no sense to me, cos surely ap{r,u}-config will have already broken
apxs for you?
Does apxs actually make sense on Win32 anyway? As Will points out, it's very
dependent on libtool. 
My suggestion for httpd-config and the refactoring of apxs would reduce apxs 
to as minimal as possible a wrapper for the *-config scripts; really it
would only be there for backwards compatibility and to allow the easy
production of Makefiles for modules.
Cheers,
-T, hoping for the cluebat of enlightenment to strike

Re: Refactoring apxs, WAS: RE: using installed apxs when apr and apache are installed in different directories

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 01:36 PM 3/27/2003, Sander Striker wrote:
>> From: Thom May [mailto:thom@planetarytramp.net]
>> 
>> Ok, so sander and I were just discussing the creation of an httpd-config
>> script, analogous to apr-config etc, which apxs or module developers could
>> just call at need. 
>> Apxs could then shed a lot of code and become a program specifically to
>> build modules, rather than also having to be used to query build variables
>> and the myriad of other stuff it currently does.
>
>Just chiming in... Currently we have a dependency on perl to figure out
>stuff like include dirs etc, which is a bit silly.  httpd-config could be
>done as a shell script, removing that dependency.

WHOH!  Go ahead, f* us win32 users ;-)

Actually, Thom's point actually makes win32 much *easier* to set up to
support APXs on win32... if we can only get rid of the libtool dependency ;-)
In any case, I'm thinking if you want to create a parallel .sh script and we
can all agree to keep the .sh and .pl flavors of apxs in working order, this
could be a good thing for everyone :-)

Bill