You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@collab.net> on 2002/05/28 17:04:03 UTC

messed up APR location...

Ever since revision 1922, Karl and I have been having problems linking
svn (on Debian and FreeBSD).  I don't think this patch was wrong, but
somehow it exposed a deeper bug.

The problem we're having: if we're building statically (passing
nothing but --disable-shared to ./configure), then somehow we end up
compiling and linking against the installed libapr within
/usr/local/apache2.  This is definitely wrong: if no --with-apr switch
is given, then ./configure should always search *within* our svn
working copy for an apr tree (or library) first, then search in
external locations.

Revision 1922 simply adds /usr/local/apache2 to the list of locations
to search, no big deal:

rev 1922:  kevin | Thu 9 May 2002 21:51:51 | 6 lines

Look in /usr/local/apache2 for apr and apr-util by default, since they are the
default install locations for httpd.

This allows people to just build and install httpd, then have svn's configure
find apr and apr-util automatically.

Index: ac-helpers/find_apr.m4
===================================================================
--- ac-helpers/find_apr.m4
+++ tmp.28964.00001	Tue May 28 11:53:17 2002
@@ -77,7 +77,7 @@
       apr_config="apr-config"
     else
       dnl look in some standard places (apparently not in builtin/default)
-      for lookdir in /usr /usr/local /opt/apr ; do
+      for lookdir in /usr /usr/local /opt/apr /usr/local/apache2 ; do
         if $TEST_X "$lookdir/bin/apr-config"; then
           apr_found="yes"
           apr_config="$lookdir/bin/apr-config"

Index: ac-helpers/find_apu.m4
===================================================================
--- ac-helpers/find_apu.m4
+++ tmp.28964.00001	Tue May 28 11:53:17 2002
@@ -75,7 +75,7 @@
       apu_config="apu-config"
     else
       dnl look in the some standard places (apparently not in builtin/default)
-      for lookdir in /usr /usr/local /opt/apr ; do
+      for lookdir in /usr /usr/local /opt/apr /usr/local/apache2 ; do
         if test -x "$lookdir/bin/apu-config"; then
           apu_found="yes"
           apu_config="$lookdir/bin/apu-config"


I think our m4 script is just wrong.  It's looking within the bundled
apr source directory *after* the paths above are searched.  Can
someone who understands our build system comment on my analysis?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: messed up APR location...

Posted by Ben Collins-Sussman <su...@collab.net>.
Philip Martin <ph...@codematters.co.uk> writes:

> Ben Collins-Sussman <su...@collab.net> writes:
> 
> > I think our m4 script is just wrong.  It's looking within the bundled
> > apr source directory *after* the paths above are searched.  Can
> > someone who understands our build system comment on my analysis?
> 
> I noticed this and update INSTALL in rev1989
> 
> +      The "./apr" and "./apr-util" directories will not be considered
> +      if the search for apr-config and apu-config scripts is successful.
> 
> Is the behaviour wrong? I don't know, but it is documented.

It seems wrong to me.  If I don't explicitly say which apr to use,
then Convention dictates that the "nearest" one be used.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: messed up APR location...

Posted by Philip Martin <ph...@codematters.co.uk>.
Ben Collins-Sussman <su...@collab.net> writes:

> I think our m4 script is just wrong.  It's looking within the bundled
> apr source directory *after* the paths above are searched.  Can
> someone who understands our build system comment on my analysis?

I noticed this and update INSTALL in rev1989

+      The "./apr" and "./apr-util" directories will not be considered
+      if the search for apr-config and apu-config scripts is successful.

Is the behaviour wrong? I don't know, but it is documented.

-- 
Philip

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: messed up APR location...

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
cmpilato@collab.net writes:
> Hm.  I think that the very act of checking out apr and apr-util into
> my subversion source tree indicates my desire to use *those trees* as
> my APR and APRUtil (respectively) of choice, and is therefore nearly
> as good as passing the --with-apr[util] flag to configure.
> 
> Therefore, I believe the order should be:
> 
> 1.  Check the --with-apr/--with-apr-util flags.
> 2.  Look for apr and apr-util in my subversion source dir.
> 3.  Look in the usual install locations.

Agree 100%.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: messed up APR location...

Posted by Branko Čibej <br...@xbc.nu>.
cmpilato@collab.net wrote:

>Therefore, I believe the order should be:
>
>1.  Check the --with-apr/--with-apr-util flags.
>2.  Look for apr and apr-util in my subversion source dir.
>3.  Look in the usual install locations.
>  
>
+1


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: messed up APR location...

Posted by Nuutti Kotivuori <na...@iki.fi>.
cmpilato@collab.net wrote:
> Hm.  I think that the very act of checking out apr and apr-util into
> my subversion source tree indicates my desire to use *those trees*
> as my APR and APRUtil (respectively) of choice, and is therefore
> nearly as good as passing the --with-apr[util] flag to configure.

Actually, I think this thing has something to do with the release
tarballs. Bootstrap tarballs are a non-issue since they should always
use the in tree apr and apr-util for the static compilation.

If the release tarball does not contain apr and apr-util, then me
putting those directories inside the subversion directory is like
saying: "Use these."

On the other hand, if the apr and apr-util directories come with the
subversion release, the existence of those directories cannot be taken
as a sign of anything.

Personally I'd like to use the system ones at all times unless the
user really specifies otherwise - but right now I must say that it is
a lot handier to have it use the in-tree one's automatically during
building, as long as APR is as changing as it is.

-- Naked


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: messed up APR location...

Posted by cm...@collab.net.
Greg Stein <gs...@lyra.org> writes:

> Installed copies are Right(tm).
> 
> If you want the advantages of a shared library, then everybody has to refer
> to that shared library. It makes no sense to have everybody running around
> with their own copies. Further, if you start linking SVN into programs which
> (themselves) use APR, then you ABSOLUTELY must all refer to the shared,
> installed library.
> 
> IMO, we should (even now) *always* try to use an installed library first.
> 
> If that poses problems for somebody, then the user can do something like:
> 
>   ./configure --with-apr=./apr --with-apr-util=./apr-util
> 
> Theoretically, the detection code will then recognize those directories as
> the bundled source directories and will use them, in preference to the
> installed copies.

Hm.  I think that the very act of checking out apr and apr-util into
my subversion source tree indicates my desire to use *those trees* as
my APR and APRUtil (respectively) of choice, and is therefore nearly
as good as passing the --with-apr[util] flag to configure.

Therefore, I believe the order should be:

1.  Check the --with-apr/--with-apr-util flags.
2.  Look for apr and apr-util in my subversion source dir.
3.  Look in the usual install locations.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: messed up APR location...

Posted by Greg Stein <gs...@lyra.org>.
On Wed, May 29, 2002 at 10:12:46AM -0700, Justin Erenkrantz wrote:
> On Tue, May 28, 2002 at 10:16:26PM -0500, Karl Fogel wrote:
> > By the way, by "for now" do you mean that at some point in the future
> > it *would* be preferable to look in default (installed) locations
> > before looking for subdirs in the source tree right here?  Personally
> > I agree with Ben C-S -- can't imagine that anything should override
> > the local subdirs, unless the user specifically asks for something
> > else.
> 
> When APR becomes 1.0, I would imagine it would be fine to use any
> installed copies we find.  (gstein may {dis}agree with me here.)
> At this point, the API is too unstable to rely upon, so we can't
> use any installed copies we find unless the user says otherwise.
> 
> But, when the API is frozen, installed copies may be good.  -- justin

Installed copies are Right(tm).

If you want the advantages of a shared library, then everybody has to refer
to that shared library. It makes no sense to have everybody running around
with their own copies. Further, if you start linking SVN into programs which
(themselves) use APR, then you ABSOLUTELY must all refer to the shared,
installed library.

IMO, we should (even now) *always* try to use an installed library first.

If that poses problems for somebody, then the user can do something like:

  ./configure --with-apr=./apr --with-apr-util=./apr-util

Theoretically, the detection code will then recognize those directories as
the bundled source directories and will use them, in preference to the
installed copies.

Cheers,
-g

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: messed up APR location...

Posted by Justin Erenkrantz <je...@apache.org>.
On Tue, May 28, 2002 at 10:16:26PM -0500, Karl Fogel wrote:
> By the way, by "for now" do you mean that at some point in the future
> it *would* be preferable to look in default (installed) locations
> before looking for subdirs in the source tree right here?  Personally
> I agree with Ben C-S -- can't imagine that anything should override
> the local subdirs, unless the user specifically asks for something
> else.

When APR becomes 1.0, I would imagine it would be fine to use any
installed copies we find.  (gstein may {dis}agree with me here.)
At this point, the API is too unstable to rely upon, so we can't
use any installed copies we find unless the user says otherwise.

But, when the API is frozen, installed copies may be good.  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: messed up APR location...

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Justin Erenkrantz <je...@apache.org> writes:
> Can you try taking the latest find-apr.m4/find-apu.m4 macros from
> apr and apr-util?  We turned off looking in the "default" places
> unless the program (or user) specified that it is okay.  For now, it
> isn't that good of an idea.  -- justin

Yeah -- we should really commit those into the tree.

(Karl goes to do it now.)

By the way, by "for now" do you mean that at some point in the future
it *would* be preferable to look in default (installed) locations
before looking for subdirs in the source tree right here?  Personally
I agree with Ben C-S -- can't imagine that anything should override
the local subdirs, unless the user specifically asks for something
else.

-K


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: messed up APR location...

Posted by Justin Erenkrantz <je...@apache.org>.
On Tue, May 28, 2002 at 12:04:03PM -0500, Ben Collins-Sussman wrote:
> This allows people to just build and install httpd, then have svn's configure
> find apr and apr-util automatically.

Can you try taking the latest find-apr.m4/find-apu.m4 macros from
apr and apr-util?  We turned off looking in the "default" places
unless the program (or user) specified that it is okay.  For now, it
isn't that good of an idea.  -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org