You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "William A. Rowe, Jr." <wr...@lnd.com> on 2000/04/16 01:50:45 UTC

Draft proposal: Win32 Compilation Environment Step 1

Ok, it's easier to talk from documentation on this, I think.

Attached is the proposed new win_compiling.html doc.
You may have notice I split out what was currently
in there... the file peaked at about 30k while I was in
the midst of working on it.  Not an effective html size.

So to replace that split-out, here's the proposal in a nutshell.

1) VC5 -won't- MSDEV command line build.  I'm sorry, I am
   absolutely against forcing the users to upgrade for no
   valid technical reason (we support C89!?!) so I am -1 for 
   invalidating what exists, if that counts for anything.

2) Create the Apache.dsw workspace file.  Dependencies on every
   required library.  I have it, it's working.

3) Any VC -will- export MAK files, so roll a set of MAK files
   ONLY at the time of the release build.  If we tack on a 
   borland/watcom/whatnot converter, roll those for the release 
   as well (I'm thinking opensource c or pl somewhere down the 
   road.  If our dsp's wig it out, then we can fix it ourselves.)

4) Problem... MAK files will invoke their required libraries'
   mak files provided dependencies.  So add RECURSE=0 to every
   build in Makefile.win (we know the order there already).
   Further, kill the clean code and invoke with a _build 
   COMMONTARGET=CLEAN tag, which does the same thing and makes
   the file shorter, and more consistent.

   [our only alternative is two workspaces, one without any
    dependencies whatsoever, or to hand load each dsp and export 
    its make file, which I guess is what some do today. But
    that's one more thing to explain to Joe user in (6) below.]

5) Add an installbin.dsp that simply invokes the nmake with
   _install short= long= instdir=.. (note I suggest .., but
   this can be changed by the user.  If you are building 
   multiple versions \apache is a pretty useless default.)

6) FINALLY... VC6 users can invoke something like
   MSDEV Apache.dsw /MAKE "InstallBin - Win32 Release"
   and that's it.  VC5 users must first export all the
   make files (if they are building the tree instead of
   a release), then use the old nmake /f makefile.win

7) SOMEDAY... between releases, bcc/watcom folk will run a
   .c or .pl converter against the tree, or those make files
   will be pre-converted in the release build.

Fair?  Good?  Simple Enough?  Then here's the first scratch
at the proposed docs... ignore if you've had enough already
and couldn't give a rat's fart over Win32 :-)

If we can agree, we can kill .mak files TODAY.  I will submit
two files, Makefile.win and Apache.dsp to do what I describe above.

Re: Draft proposal: Win32 Compilation Environment Step 1

Posted by Bill Stoddard <st...@raleigh.ibm.com>.
+1 for Apache 2.0
Bill
----- Original Message ----- 
From: William A. Rowe, Jr. <wr...@lnd.com>
To: <ne...@apache.org>
Sent: Saturday, April 15, 2000 7:50 PM
Subject: Draft proposal: Win32 Compilation Environment Step 1


> Ok, it's easier to talk from documentation on this, I think.
> 
> Attached is the proposed new win_compiling.html doc.
> You may have notice I split out what was currently
> in there... the file peaked at about 30k while I was in
> the midst of working on it.  Not an effective html size.
> 
> So to replace that split-out, here's the proposal in a nutshell.
> 
> 1) VC5 -won't- MSDEV command line build.  I'm sorry, I am
>    absolutely against forcing the users to upgrade for no
>    valid technical reason (we support C89!?!) so I am -1 for 
>    invalidating what exists, if that counts for anything.
> 
> 2) Create the Apache.dsw workspace file.  Dependencies on every
>    required library.  I have it, it's working.
> 
> 3) Any VC -will- export MAK files, so roll a set of MAK files
>    ONLY at the time of the release build.  If we tack on a 
>    borland/watcom/whatnot converter, roll those for the release 
>    as well (I'm thinking opensource c or pl somewhere down the 
>    road.  If our dsp's wig it out, then we can fix it ourselves.)
> 
> 4) Problem... MAK files will invoke their required libraries'
>    mak files provided dependencies.  So add RECURSE=0 to every
>    build in Makefile.win (we know the order there already).
>    Further, kill the clean code and invoke with a _build 
>    COMMONTARGET=CLEAN tag, which does the same thing and makes
>    the file shorter, and more consistent.
> 
>    [our only alternative is two workspaces, one without any
>     dependencies whatsoever, or to hand load each dsp and export 
>     its make file, which I guess is what some do today. But
>     that's one more thing to explain to Joe user in (6) below.]
> 
> 5) Add an installbin.dsp that simply invokes the nmake with
>    _install short= long= instdir=.. (note I suggest .., but
>    this can be changed by the user.  If you are building 
>    multiple versions \apache is a pretty useless default.)
> 
> 6) FINALLY... VC6 users can invoke something like
>    MSDEV Apache.dsw /MAKE "InstallBin - Win32 Release"
>    and that's it.  VC5 users must first export all the
>    make files (if they are building the tree instead of
>    a release), then use the old nmake /f makefile.win
> 
> 7) SOMEDAY... between releases, bcc/watcom folk will run a
>    .c or .pl converter against the tree, or those make files
>    will be pre-converted in the release build.
> 
> Fair?  Good?  Simple Enough?  Then here's the first scratch
> at the proposed docs... ignore if you've had enough already
> and couldn't give a rat's fart over Win32 :-)
> 
> If we can agree, we can kill .mak files TODAY.  I will submit
> two files, Makefile.win and Apache.dsp to do what I describe above.


RE: Draft proposal: Win32 Compilation Environment Step 1

Posted by Greg Marr <gr...@alum.wpi.edu>.
At 04:14 PM 04/17/2000 -0500, William A. Rowe, Jr. wrote:
>Greg Marr wrote:
> > If the problem is with the programs in the support directory being
> > able to find the APR dll, then put a copy of the APR dll in the
> > support directory, put the support programs in the main directory, or
> > have the support programs link to APR statically.
>
>Which is it then?  :)
>
>State your preference, man.

I really don't have any clear preference.  I would assume that the support 
programs don't use a lot of APR, so the static linking wouldn't add that 
much to their size.


RE: Draft proposal: Win32 Compilation Environment Step 1

Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
> If the problem is with the programs in the support directory being 
> able to find the APR dll, then put a copy of the APR dll in the 
> support directory, put the support programs in the main directory, or 
> have the support programs link to APR statically.

Which is it then?  :)

State your preference, man.

Re: Draft proposal: Win32 Compilation Environment Step 1

Posted by Chuck Murcko <ch...@topsail.org>.
Greg Stein wrote:
> 
> Ah. Yah... we ship those other guys, and modules are going to be DLLs,
> typically. Okay. I agree... a .DLL would be nicer.
> 
> Okay. Then always build APR as a DLL in our Apache distribution -- NEVER
> as a static library. Put the thing into the right location.
> 
> OtherBill is posting a whole lot of noise regarding aprlib.dll apr.dll or
> aprlib.lib or whatever the hell.
> 
> Simplify! Have an APR.DLL and its export symbols in APR.LIB. Done.
> 
> If somebody wants more, then they can go set up their own .dsp file.
> 
This is totally the way to do this. It's how we built the portability
lib a year ago for NT where I worked. Side benefit of using the
export/import DLL stuff was that it builds the symbol reference/.lib
file for you as part of the make. No more changing stupid symbol files
needed for the make when you add some code. God, I hate build schemes
that make me do that.
-- 
Chuck
Chuck Murcko
Topsail Group
chuck@topsail.org


RE: Draft proposal: Win32 Compilation Environment Step 1

Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
> From: Greg Stein [mailto:gstein@lyra.org]
> Sent: Monday, April 17, 2000 8:30 PM
> 
> Ah. Yah... we ship those other guys, and modules are going to be DLLs,
> typically. Okay. I agree... a .DLL would be nicer.

Fine... done.
 
> Okay. Then always build APR as a DLL in our Apache 
> distribution -- NEVER
> as a static library. Put the thing into the right location.

Sure.  Choose - bin or sbin folder?  We throw apache server and
every exe/dll in that folder.  We call it I'd be happy with that.
We can path it later in the install for admins.

> Simplify! Have an APR.DLL and its export symbols in APR.LIB. Done.

I'll make it so.


RE: Draft proposal: Win32 Compilation Environment Step 1

Posted by Greg Stein <gs...@lyra.org>.
Ah. Yah... we ship those other guys, and modules are going to be DLLs,
typically. Okay. I agree... a .DLL would be nicer.

Okay. Then always build APR as a DLL in our Apache distribution -- NEVER
as a static library. Put the thing into the right location.

OtherBill is posting a whole lot of noise regarding aprlib.dll apr.dll or
aprlib.lib or whatever the hell.

Simplify! Have an APR.DLL and its export symbols in APR.LIB. Done.

If somebody wants more, then they can go set up their own .dsp file.

Cheers,
-g

On Mon, 17 Apr 2000, Greg Marr wrote:
> At 04:31 PM 04/17/2000, Greg Stein wrote:
> >Forget delay loading and all that stuff. Statically link APR into 
> >apache.exe and be done with it.
> >
> >APR will still build outside of Apache, but when we redistribute APR 
> >as part of Apache, then we should do a static link. That solves the 
> >path problem, the relocation problem, etc.
> 
> It also increases the code size of any server that uses any DLL 
> modules that use APR, since they'll have to statically link against 
> APR as well.  This can also cause no end of problems with static 
> variables, if APR has any, since Apache itself, and every module that 
> it loads, will have its own copy of the statics.  Leaving APR as a 
> DLL means that everything can use the same copy of the code, and 
> there's only one of every static.  This is the same reason that 
> Apache and all the modules link against the DLL version of the C 
> Runtime library.
> 
> >I see no purpose served by having the Apache distribution be able to 
> >build an APR DLL. When APR starts shipping standalone, then we can 
> >possible update Apache to dynlink against it.
> 
> I see no purpose served by having Apache link statically against APR.
> 
> If the problem is with the programs in the support directory being 
> able to find the APR dll, then put a copy of the APR dll in the 
> support directory, put the support programs in the main directory, or 
> have the support programs link to APR statically.
> 
> --
> Greg Marr
> gregm@alum.wpi.edu
> "We thought you were dead."
> "I was, but I'm better now." - Sheridan, "The Summoning"
> 

-- 
Greg Stein, http://www.lyra.org/


RE: Draft proposal: Win32 Compilation Environment Step 1

Posted by Greg Marr <gr...@alum.wpi.edu>.
At 04:31 PM 04/17/2000, Greg Stein wrote:
>Forget delay loading and all that stuff. Statically link APR into 
>apache.exe and be done with it.
>
>APR will still build outside of Apache, but when we redistribute APR 
>as part of Apache, then we should do a static link. That solves the 
>path problem, the relocation problem, etc.

It also increases the code size of any server that uses any DLL 
modules that use APR, since they'll have to statically link against 
APR as well.  This can also cause no end of problems with static 
variables, if APR has any, since Apache itself, and every module that 
it loads, will have its own copy of the statics.  Leaving APR as a 
DLL means that everything can use the same copy of the code, and 
there's only one of every static.  This is the same reason that 
Apache and all the modules link against the DLL version of the C 
Runtime library.

>I see no purpose served by having the Apache distribution be able to 
>build an APR DLL. When APR starts shipping standalone, then we can 
>possible update Apache to dynlink against it.

I see no purpose served by having Apache link statically against APR.

If the problem is with the programs in the support directory being 
able to find the APR dll, then put a copy of the APR dll in the 
support directory, put the support programs in the main directory, or 
have the support programs link to APR statically.

--
Greg Marr
gregm@alum.wpi.edu
"We thought you were dead."
"I was, but I'm better now." - Sheridan, "The Summoning"


RE: Draft proposal: Win32 Compilation Environment Step 1

Posted by Greg Stein <gs...@lyra.org>.
On Mon, 17 Apr 2000, William A. Rowe, Jr. wrote:
> > From: Greg Stein [mailto:gstein@lyra.org]
> > Sent: Monday, April 17, 2000 3:32 PM
> 
> > Forget delay loading and all that stuff. Statically link APR into
> > apache.exe and be done with it.
> 
> I'm quite certain you mean link apr into apachecore.dll, and have
> a single core executable (don't you?)  ApacheCore.dll has been around
> a very, very long time, and I don't think we are even talking about
> changing it.

Basically. I space on the support proggies and the separate modules. The
separate modules would be linking against apachecore.dll, so the above
static link would work. It wouldn't help for the support proggies.

> It's not ApacheCore I'm worrying about, it's really all those little
> support exe's running around (log resolution, passwords etc) that
> need apr.  Do we link to them all, or put them in the same folder
> and be done with it?

See my recent post.

My main emphasis here is *SIMPLIFY*. I've seen a bunch of posts about how
we can do it <this> way, or <that> way, or gee! how about <like this>.
It's getting silly.

Create APR.DLL and APR.LIB. Done.

Put APR.DLL into one or more directories as needed.

APR.LIB sits around somewhere, so that <foo> can use it to link against
the APR.DLL stuff.

No more options. No more alternatives. Simple.

If somebody wants an alternative, then let them reconfig the .dsp. There
is nothing inherent in APR that prevents a static build or anything.

Simplify simplify simplify.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/


RE: Draft proposal: Win32 Compilation Environment Step 1

Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
> From: Greg Stein [mailto:gstein@lyra.org]
> Sent: Monday, April 17, 2000 3:32 PM

> Forget delay loading and all that stuff. Statically link APR into
> apache.exe and be done with it.

I'm quite certain you mean link apr into apachecore.dll, and have
a single core executable (don't you?)  ApacheCore.dll has been around
a very, very long time, and I don't think we are even talking about
changing it.

It's not ApacheCore I'm worrying about, it's really all those little
support exe's running around (log resolution, passwords etc) that
need apr.  Do we link to them all, or put them in the same folder
and be done with it?

RE: Draft proposal: Win32 Compilation Environment Step 1

Posted by Greg Stein <gs...@lyra.org>.
On Mon, 17 Apr 2000, William A. Rowe, Jr. wrote:
> > From: Bill Stoddard [mailto:stoddard@raleigh.ibm.com]
> > Sent: Monday, April 17, 2000 11:10 AM
> > 
> > > BTW, what's wrong with linking multiple programs against the same
> > > dll?  Why wouldn't we want to do this?  Isn't this the Windows way?
> > >
> > It causes more problems that it is worth in many cases and is 
> > sometimes referred to as
> > "DLL Hell". Ever notice that many Win32 install packages 
> > replace one or more of the
> > standard distribution DLLs?  Sometimes a later version dll is 
> > replaced by an earlier
> > version.  I'd prefer not to deal with it at the possible 
> > expense of a little extra
> > memory/storage usage.
> 
> If the path to aprlib/ApacheCore was always at the start of the PATH 
> env var for all shelled programs/add-in dynamic modules, then they 
> could very effectively share the specific version's apr and 
> apachecore dll's.  For programs like support/ stuff, launched 
> outside of apache, this gets dirtier.  My feeling is that aprlib.dll
> needs to sit in the same folder as support and apache.exe.  If we
> can delayload apache.exe to not bind to apachecore.dll until the 
> modules path is added to the PATH env var, and NEVER load Apache.exe
> to launch the child processes (launch ApacheCore.dll with the PATH
> already set up correctly) we will be better off.

Forget delay loading and all that stuff. Statically link APR into
apache.exe and be done with it.

APR will still build outside of Apache, but when we redistribute APR as
part of Apache, then we should do a static link. That solves the path
problem, the relocation problem, etc.

I see no purpose served by having the Apache distribution be able to build
an APR DLL. When APR starts shipping standalone, then we can possible
update Apache to dynlink against it.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/


RE: Draft proposal: Win32 Compilation Environment Step 1

Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
> From: Bill Stoddard [mailto:stoddard@raleigh.ibm.com]
> Sent: Monday, April 17, 2000 11:10 AM
> 
> > BTW, what's wrong with linking multiple programs against the same
> > dll?  Why wouldn't we want to do this?  Isn't this the Windows way?
> >
> It causes more problems that it is worth in many cases and is 
> sometimes referred to as
> "DLL Hell". Ever notice that many Win32 install packages 
> replace one or more of the
> standard distribution DLLs?  Sometimes a later version dll is 
> replaced by an earlier
> version.  I'd prefer not to deal with it at the possible 
> expense of a little extra
> memory/storage usage.

If the path to aprlib/ApacheCore was always at the start of the PATH 
env var for all shelled programs/add-in dynamic modules, then they 
could very effectively share the specific version's apr and 
apachecore dll's.  For programs like support/ stuff, launched 
outside of apache, this gets dirtier.  My feeling is that aprlib.dll
needs to sit in the same folder as support and apache.exe.  If we
can delayload apache.exe to not bind to apachecore.dll until the 
modules path is added to the PATH env var, and NEVER load Apache.exe
to launch the child processes (launch ApacheCore.dll with the PATH
already set up correctly) we will be better off.

Re: Draft proposal: Win32 Compilation Environment Step 1

Posted by Bill Stoddard <st...@raleigh.ibm.com>.
> > > linked into Apache.
> >
> > I'm not... I believe you will hear from rbb if we tried :-)
> > This really is a seperate support package, IMHO.  Why
> > bleed through the symbols for ApacheCore?
> >
>
> I have been avoiding this conversation, because I haven't touched Windows
> is a very long time.  I am actually working on getting a working NT system
> right now, so hopefully I will be able to help out on NT later today.
>
> I think APR should be a library on Windows.  Statically linking it with
> Apache is fine, when we are building an Apache dist, but if the only way
> to get APR to build is as a part of Apache, then the general usefulness of
> APR goes out the window.

Yes, I agree that we should be able to build APR seperate from Apache. My comment was
directed at APRs use in Apache.

>
> BTW, what's wrong with linking multiple programs against the same
> dll?  Why wouldn't we want to do this?  Isn't this the Windows way?
>
It causes more problems that it is worth in many cases and is sometimes referred to as
"DLL Hell". Ever notice that many Win32 install packages replace one or more of the
standard distribution DLLs?  Sometimes a later version dll is replaced by an earlier
version.  I'd prefer not to deal with it at the possible expense of a little extra
memory/storage usage.

Bill


RE: Draft proposal: Win32 Compilation Environment Step 1

Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
> From: rbb@covalent.net [mailto:rbb@covalent.net]
> Sent: Monday, April 17, 2000 7:47 AM
> 
> On Mon, 17 Apr 2000, William A. Rowe, Jr. wrote:
> 
> > > To: new-httpd@apache.org
> > > Subject: Re: Draft proposal: Win32 Compilation Environment Step 1
> > > 
> > > +1 on blasting the makefiles, provided it is very easy to 
> > > regen them when using VC++ 5.
> > 
> > It is, once I've posted the Apache.dsw.
> > 
> > > I am ambivilant about whether APR is a dll or is statically 
> > > linked into Apache.  
> > 
> > I'm not... I believe you will hear from rbb if we tried :-)
> > This really is a seperate support package, IMHO.  Why
> > bleed through the symbols for ApacheCore?
> > 
> 
> I have been avoiding this conversation, because I haven't 
> touched Windows
> is a very long time.  I am actually working on getting a 
> working NT system
> right now, so hopefully I will be able to help out on NT 
> later today.  
> 
> I think APR should be a library on Windows.  Statically 
> linking it with
> Apache is fine, when we are building an Apache dist, but if 
> the only way
> to get APR to build is as a part of Apache, then the general 
> usefulness of
> APR goes out the window.
> 
> BTW, what's wrong with linking multiple programs against the same
> dll?  Why wouldn't we want to do this?  Isn't this the Windows way?

It's wonderful, but there's the issue of resolving the paths to the
dll (we have several executable folders today, and due to developers
and admins trying to use several different versions, we can't trust
the shell path to resolve anything).  

We are of the same mind... aprlib.dll is its own beast, unless 10
or fewer functions are invoked (think ap_snprintf etc, and especially
the installation helper dll).

By the way, the startup time dropped by 50% once the linker didn't
need to relocate the dll's.

RE: Draft proposal: Win32 Compilation Environment Step 1

Posted by rb...@covalent.net.
On Mon, 17 Apr 2000, William A. Rowe, Jr. wrote:

> > To: new-httpd@apache.org
> > Subject: Re: Draft proposal: Win32 Compilation Environment Step 1
> > 
> > +1 on blasting the makefiles, provided it is very easy to 
> > regen them when using VC++ 5.
> 
> It is, once I've posted the Apache.dsw.
> 
> > I am ambivilant about whether APR is a dll or is statically 
> > linked into Apache.  
> 
> I'm not... I believe you will hear from rbb if we tried :-)
> This really is a seperate support package, IMHO.  Why
> bleed through the symbols for ApacheCore?
> 

I have been avoiding this conversation, because I haven't touched Windows
is a very long time.  I am actually working on getting a working NT system
right now, so hopefully I will be able to help out on NT later today.  

I think APR should be a library on Windows.  Statically linking it with
Apache is fine, when we are building an Apache dist, but if the only way
to get APR to build is as a part of Apache, then the general usefulness of
APR goes out the window.

BTW, what's wrong with linking multiple programs against the same
dll?  Why wouldn't we want to do this?  Isn't this the Windows way?

Ryan

------------------------------------------------------------------------------
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


RE: Draft proposal: Win32 Compilation Environment Step 1

Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
> To: new-httpd@apache.org
> Subject: Re: Draft proposal: Win32 Compilation Environment Step 1
> 
> +1 on blasting the makefiles, provided it is very easy to 
> regen them when using VC++ 5.

It is, once I've posted the Apache.dsw.

> I am ambivilant about whether APR is a dll or is statically 
> linked into Apache.  

I'm not... I believe you will hear from rbb if we tried :-)
This really is a seperate support package, IMHO.  Why
bleed through the symbols for ApacheCore?

> We definitely should -not- attempt to support multiple 
> applications each accessing the same dll (with perhaps 
> one exception, the support routines that ship with 
> Apache could/should use the common APR dll).

OK ... if we are committed to this, then we have an issue,
read my notes below.

> The one requirement we do have is that the exported symbol 
> ordinals do not change when a new function or variable is 
> added to then exported from APR.  We don't
> want to require Apache module authors to recompile their 
> modules because someone adds new
> functions to APR, but does not change the interface of any of 
> the existing functions the
> module depends on.

Back to binary compatibility <LOL>.  I agree with ordinals
and suggest we resort right before the 2.0b release.
Agreed on compatibility within version 2.0.any.

> > Step 2 will build an apr.lib from the apr.dsp/apr.mak project files
> > which mirrors the aprlib.  But it will become a STATIC library,
> > for those applications that call for it. Namely, support 
> applications.
> >
> > Here's where I am absolutely jammed.  Now I know why I created
> > that apr.dsp 4 project library...
> >
> > We don't want aprlib.dll in winnt/system32 since it's a moving
> > target.
> 
> Agreed.
> 
> > So what do we want?
> > ??? A second copy of aprlib.dll in support?
> >     That's rather sad.

I'm guessing you agreed.  However, if we link to aprlib.dll, and
don't put it in support, we are sort of screwed.

> > ??? Have both apr and aprlib declare all the sources?  This
> >     looks like a headache.

Project apr lists all the sources and builds a lib, aprlib lists
all the sources and builds a dll.  This sucks.

> > ??? Have apr build a lib with the export symbols defined,
> >     have aprlib turn that lib into a dll, and continue
> >     to use the apr.lib with symbols to link to static exe's?
> >     Just some wasted space, if I am correct, or perhaps I
> >     can throw away the export table from the linker.
> >
> 
> I think this would be perfectly acceptable.

I'm ready to go with this solution myself.  If it needs to be
reworked, then we will rework it after the fixups of APR_EXPORT_X.
Let's try this for today.
 
> > ??? Go to the idea of "Win32 Static" projects, as I've
> >     proposed once before?
> 
> Never quite had a handle on this.
 
Dynamic link project configs  This Proj - Win32 Release (/Debug)
Static  link project configs  This Proj - Win32 Static Release (/Debug)

Apr configs
apr - Win32 Standalone Release (/Debug) -> library without dllexport'ed
apr - Win32 Release (/Debug) -> library with all __declspec'ed dllexport's

Aprlib config
aprlib - Win32 Release (/Debug) <- library with all __declspec's -> dll


The build path ends up looking like

(Dynamic)
apr - Win32 Release -> lib (only a source to aprlib)
  aprlib - Win32 Release -> dll + dll's export lib
    ApacheCore - Win32 Release -> dll + dll's export lib
      Apache - Win32 Release <- aprlib + ApacheCore dll's export libs

(Static)
apr - Win32 Static Release -> static lib (no exports whatsoever)
  htdigest - Win32 Static Release <- apr static library


Dynamics don't depend on apr (directly), statics don't depend on aprlib,
and ONLY the apr project contains all four configs (R/D * Dyn/Static)


This works REALLY WELL, until we get into what happens when:


(Examples above)
Apache - Win32 Release
htdigest - Win32 Static Release
  InstallBin - Win32 Release (wraps makefile.win)

Ok, InstallBin knows to build the - Win32 Release of all the projects
it depends on - great!  But what will it choose when the name is
ambigous:

htdigest - Win32 Static Release  !=  - Win32 Release
htdigest - Win32 Static Debug    !=  - Win32 Release

I'm not sure we can predict how this will behave in VC5, and we can't
explicitly tell VC5 by config (we could in VC6).

That's why I've killed the idea.


I say, today:

apr (lib with all export symbols declared) -> aprlib (dll with exports lib)

We can link an app to apr.lib or aprlib.lib (to bind to the aprlib.dll).

Link all support, for debugging now, to apr.lib (not bound to aprlib.dll).

Also, before beta release, 
  rename support to sbin (?) (make modules a folder within sbin?)
  add it to the system path in the install (admins can htpasswd anywhere)
  put Apache.exe in sbin
  put Aprlib.dll in sbin
  put ApacheCore.dll in modules (it is, isn't it :-) ?)
  make Apache.exe late bind to ApacheCore and add
      arg[0]path\..\modules to the running path.

  *** Create the process of ApacheCore.dll, rather than Apache.exe!
      Task manager would show (1) Apache, (1+) ApacheCore in the list.
      [I'm trying to figure out how to accomplish this cleanly.]

That's my thought.  New Apache.dsw and apr.dsp, plus patches to aprlib.dsp,
makefile.win, and all support/ .dsp/.c to bind to apr to follow tommorow.

Bill

Re: Draft proposal: Win32 Compilation Environment Step 1

Posted by Bill Stoddard <st...@raleigh.ibm.com>.
I completely agree that we should NOT put aprlib.dll into winnt/system32.  +1 on blasting
the makefiles, provided it is very easy to regen them when using VC++ 5. I am ambivilant
about whether APR is a dll or is statically linked into Apache.  We definitely
should -not- attempt to support multiple applications each accessing the same dll (with
perhaps one exception, the support routines that ship with Apache could/should use the
common APR dll). The one requirement we do have is that the exported symbol ordinals do
not change when a new function or variable is added to then exported from APR.  We don't
want to require Apache module authors to recompile their modules because someone adds new
functions to APR, but does not change the interface of any of the existing functions the
module depends on.

>
> Step 2 will build an apr.lib from the apr.dsp/apr.mak project files
> which mirrors the aprlib.  But it will become a STATIC library,
> for those applications that call for it. Namely, support applications.
>
> Here's where I am absolutely jammed.  Now I know why I created
> that apr.dsp 4 project library...
>
> We don't want aprlib.dll in winnt/system32 since it's a moving
> target.

Agreed.

> So what do we want?
> ??? A second copy of aprlib.dll in support?
>     That's rather sad.
>
> ??? Continue to compile the apr sources within support apps?
>     That's just nuts.

Agreed.

>
> ??? Have both apr and aprlib declare all the sources?  This
>     looks like a headache.

??

>
> ??? Have apr build a lib with the export symbols defined,
>     have aprlib turn that lib into a dll, and continue
>     to use the apr.lib with symbols to link to static exe's?
>     Just some wasted space, if I am correct, or perhaps I
>     can throw away the export table from the linker.
>

I think this would be perfectly acceptable.

> ??? Go to the idea of "Win32 Static" projects, as I've
>     proposed once before?

Never quite had a handle on this.



RE: Draft proposal: Win32 Compilation Environment Step 1

Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
> From: William A. Rowe, Jr. [mailto:wrowe@lnd.com]
> Sent: Saturday, April 15, 2000 8:56 PM
> Step 2 will build an apr.lib from the apr.dsp/apr.mak project files 
> which mirrors the aprlib.  But it will become a STATIC library, 
> for those applications that call for it. Namely, support applications.
> 
> Here's where I am absolutely jammed.  Now I know why I created
> that apr.dsp 4 project library...
> 
> We don't want aprlib.dll in winnt/system32 since it's a moving
> target.  So what do we want?
> 
> ??? A second copy of aprlib.dll in support?
>     That's rather sad.
> 
> ??? Continue to compile the apr sources within support apps?
>     That's just nuts.
> 
> ??? Have both apr and aprlib declare all the sources?  This
>     looks like a headache.
> 
> ??? Have apr build a lib with the export symbols defined,
>     have aprlib turn that lib into a dll, and continue
>     to use the apr.lib with symbols to link to static exe's?
>     Just some wasted space, if I am correct, or perhaps I
>     can throw away the export table from the linker.

As another option along the same lines, 

  ??? add a lib as a post build step to build the very same
      .obj files into a library.  Don't know if this would
      be clean and easy, but it would roll it all into one
      project

> 
> ??? Go to the idea of "Win32 Static" projects, as I've
>     proposed once before?  
>     I sort of junked that idea since I'm not certain the
>     dependencies of VC5 will call the right mate from the
>     master InstallBin project (InstallBin Win32 Debug
>     invokes htdigest - Static ... how reliably will
>     it choose htdigest - Static Debug?  I KNOW that VC6
>     will handle it... and again I'm not ready to toss
>     the VB5 users of the world over make file issues!)
> 
> Preferences anyone?
> 


RE: Draft proposal: Win32 Compilation Environment Step 1

Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
Can't win for loosing

> If we can agree, we can kill .mak files TODAY.  I will submit
> two files, Makefile.win and Apache.dsp to do what I describe above.

Ok... the way I was looking at this is broken in one respect...
we may first need to finish cleaning up the support path for me
to be able to submit a worthwhile apache.dsp.

So to start with I'm just submitting the Makefile.win changes.
They really don't do anything today (well, except work), but
that's step 1.  

1) offers a single execution list, regardless of the CTARGET.
   Sans CTARGET, it builds the default (the .exe or .dll).
   With CTARGET=CLEAN, it cleans back up. 

2) To eliminate the _clean block needed to move the delete
   generated headers out of that block.  They now get wiped only
   on a full NMAKE -f makefile.win clean

3) Also threw in the _installdll cleanup with the full
   NMAKE -f makefile.win clean.

4) Added RECURSE=0, the REAL reason this patch is absolutely
   necessary.  As we start tweaking individual .dsp project files,
   we will need to prevent the makefile.win from going nuts.

5) Added a commented-out logresolve make item.

So that's the patch.

Step 2 will build an apr.lib from the apr.dsp/apr.mak project files 
which mirrors the aprlib.  But it will become a STATIC library, 
for those applications that call for it. Namely, support applications.

Here's where I am absolutely jammed.  Now I know why I created
that apr.dsp 4 project library...

We don't want aprlib.dll in winnt/system32 since it's a moving
target.  So what do we want?

??? A second copy of aprlib.dll in support?
    That's rather sad.

??? Continue to compile the apr sources within support apps?
    That's just nuts.

??? Have both apr and aprlib declare all the sources?  This
    looks like a headache.

??? Have apr build a lib with the export symbols defined,
    have aprlib turn that lib into a dll, and continue
    to use the apr.lib with symbols to link to static exe's?
    Just some wasted space, if I am correct, or perhaps I
    can throw away the export table from the linker.

??? Go to the idea of "Win32 Static" projects, as I've
    proposed once before?  
    I sort of junked that idea since I'm not certain the
    dependencies of VC5 will call the right mate from the
    master InstallBin project (InstallBin Win32 Debug
    invokes htdigest - Static ... how reliably will
    it choose htdigest - Static Debug?  I KNOW that VC6
    will handle it... and again I'm not ready to toss
    the VB5 users of the world over make file issues!)

Preferences anyone?

Step 3 will be the dsp's and code changes for each of the
support apps.  I really would have liked to see that apr_md5_t
fixup first, but I suppose I can work around that problem.
They all already build on my machine.

Step 4 will be back to the Makefile.win to turn on the last two
support apps, and on to the Apache.dsp.  Once the win_building.html
is finished, then we can BLAST every last mak file.

Won't that be a great day!