You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Marcus Comstedt <ma...@mc.pp.se> on 2002/07/22 14:02:01 UTC

Building Apache & mod_dav_svn

Well, I figured I should try som i18n tests with a DAV repository, but
I'm failing utterly in building the server.

If I configure Subversion with --disable-shared, the makefile fails to
create mod_dav_svn.so.  If I configure Subversion without
--disable-shared, I get a mod_dav_svn.so, but it's linked dynamically
against APR.  The Apache main binary OTOH, is linked statically
against APR.  This leads to instant coredump.  I'm in libtool hell.

How am I supposed to get an Apache and a mod_dav_svn.so that's working
together?  (Yes, I'm building both from scratch following the
directions in INSTALL.)


  // Marcus



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

Re: Building Apache & mod_dav_svn

Posted by Marcus Comstedt <ma...@mc.pp.se>.
Ben Collins-Sussman <su...@collab.net> writes:

> libsvn_* libraries should be installed to /usr/local/lib/.  The only

Sorry, but no dice.  I don't install _anything_ in /usr/local/lib.
Every package gets its own --prefix.  Period.  That's the only way to
keep a sane system.


  // Marcus


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

Re: Building Apache & mod_dav_svn

Posted by Ben Collins-Sussman <su...@collab.net>.
Marcus Comstedt <ma...@mc.pp.se> writes:

> Karl Fogel <kf...@newton.ch.collab.net> writes:
> 
> > Marcus Comstedt <ma...@mc.pp.se> writes:
> > > The Apache main binary OTOH, is linked statically
> > > against APR.
> > 
> > ??
> > 
> > I thought Apache should be dynamically linked against APR; that's what
> > you get if you follow the INSTALL recipe, at any rate...
> 
> 
> Maybe it's because I tried to share APR dir between subversion and
> Apache (didn't see the point in having two of them...).  Now I have
> copied it, and rebuild, and Apache indeed seems to be dynamically
> linked this time.  To be on the safe side, I tried using the same
> --prefix for Subversion and Apache this time as well.  Still some
> trouble though, it seems that the only lib that gets installed in
> Apaches libdir is libsvn_subr-1.so.  Well, I'll keep trying, but this
> really has to be simpler...

libsvn_* libraries should be installed to /usr/local/lib/.  The only
libraries in /usr/local/apache2/lib/ should be libapr, libaprutil, and
maybe libexpat.


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

Re: Building Apache & mod_dav_svn

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Ben Collins-Sussman <su...@collab.net> writes:
> It took me a while to figure out that this was a freebsd bug;  so in
> the meantime, I spread vicious rumors about everyone needing to delete
> all of /usr/local/lib/libsvn_* when re-building shared.   It's not
> true.  :-)

Ben may be the original instigator of the paranoia, but I have still
seen problems on my Linux box occasionally, if I don't clean.

I don't have detailed descriptions, unfortunately.  But cleaning out
the old installation before rebuilding solved the problems, so I
assume there was some connection.

I agree it shouldn't be necessary, but I'm sick of wasting time
debugging ghost problems that aren't really there, so I usually clean,
when it won't cost me anything extra (i.e., when I am rebuilding and
reinstalling both http and subversion anyway).

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

Re: Building Apache & mod_dav_svn

Posted by Marcus Comstedt <ma...@mc.pp.se>.
Ben Collins-Sussman <su...@collab.net> writes:

> I was the original instigator of the paranoia.
> 
> It turns out that on freebsd, the LD_LIBRARY_PATH variable takes
> precedence over the default runtime-linker search locations, which is
> *totally* broken IMO. 

Quite the opposite.  LD_LIBRARY_PATH should only be used to override
the compiled-in run path, so this is the correct behaviour.  Normally
LD_LIBRARY_PATH shouldn't be set at all.  Solaris has the same
behaviour and it works great.


> I happen to set LD_LIBRARY_PATH=/usr/local/lib in my .bash_profile, so

Which is stupid.  Programs that use libs in /usr/local/lib should have
/usr/local/lib in their runpath.  To ensure that all apps you link
have /usr/local/lib in their runpath, set LD_RUN_PATH to
/usr/local/lib in your profile instead.


  // Marcus



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

Re: Building Apache & mod_dav_svn

Posted by Ben Collins-Sussman <su...@collab.net>.
Garrett Rooney <ro...@electricjellyfish.net> writes:

> On Mon, Jul 22, 2002 at 05:42:20PM +0100, Philip Martin wrote:
>  
> > > Hmmm.  Before I do a full, dynamic build, I always "clean up" my
> > > system using a shell script (included at the end of this mail).
> > 
> > I usually use a dynamic Subversion build but I never "clean up" first,
> > what problems does it solve?
> 
> there used to be issues with your new build getting linked against old
> versions of the libs that you had installed, leading to weird bugs.  i
> believe they've been fixed, but karl is probably still paranoid.

I was the original instigator of the paranoia.

It turns out that on freebsd, the LD_LIBRARY_PATH variable takes
precedence over the default runtime-linker search locations, which is
*totally* broken IMO. 

I happen to set LD_LIBRARY_PATH=/usr/local/lib in my .bash_profile, so
I would see bizarre behavior:  I would compile svn shared, and then
run ldd on '.libs/lt-svn', and see that the runtime-linker was
resolving all libraries references to /usr/local/lib/libsvn_*, instead
of the libraries lying around my source tree, as it should.

It took me a while to figure out that this was a freebsd bug;  so in
the meantime, I spread vicious rumors about everyone needing to delete
all of /usr/local/lib/libsvn_* when re-building shared.   It's not
true.  :-)



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

Re: Building Apache & mod_dav_svn

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Mon, Jul 22, 2002 at 05:42:20PM +0100, Philip Martin wrote:
 
> > Hmmm.  Before I do a full, dynamic build, I always "clean up" my
> > system using a shell script (included at the end of this mail).
> 
> I usually use a dynamic Subversion build but I never "clean up" first,
> what problems does it solve?

there used to be issues with your new build getting linked against old
versions of the libs that you had installed, leading to weird bugs.  i
believe they've been fixed, but karl is probably still paranoid.

personally, i just almost always build static, since i don't mess
around with subversion servers much.

-garrett 

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski

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

Re: Building Apache & mod_dav_svn

Posted by Philip Martin <ph...@codematters.co.uk>.
Karl Fogel <kf...@newton.ch.collab.net> writes:

> Marcus Comstedt <ma...@mc.pp.se> writes:
> > Maybe it's because I tried to share APR dir between subversion and
> > Apache (didn't see the point in having two of them...).  Now I have

That's easy: have APR as part of the Apache source tree and configure
Subversion to use the installed Apache libraries.  I do it all the
time.

> Hmmm.  Before I do a full, dynamic build, I always "clean up" my
> system using a shell script (included at the end of this mail).

I usually use a dynamic Subversion build but I never "clean up" first,
what problems does it solve?

-- 
Philip Martin

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

Re: Building Apache & mod_dav_svn

Posted by Marcus Comstedt <ma...@mc.pp.se>.
Karl Fogel <kf...@newton.ch.collab.net> writes:

> Hmmm.  Before I do a full, dynamic build, I always "clean up" my
> system using a shell script (included at the end of this mail).

A simple 'make clean' turned out to do the trick.  Apparently, libtool
had decided to hang on to the old --prefix despite me having rerun
configure.  Gotta love libtool.... Not!


  // Marcus



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

Re: Building Apache & mod_dav_svn

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Marcus Comstedt <ma...@mc.pp.se> writes:
> Maybe it's because I tried to share APR dir between subversion and
> Apache (didn't see the point in having two of them...).  Now I have
> copied it, and rebuild, and Apache indeed seems to be dynamically
> linked this time.  To be on the safe side, I tried using the same
> --prefix for Subversion and Apache this time as well.  Still some
> trouble though, it seems that the only lib that gets installed in
> Apaches libdir is libsvn_subr-1.so.  

Hmmm.  Before I do a full, dynamic build, I always "clean up" my
system using a shell script (included at the end of this mail).

> Well, I'll keep trying, but this really has to be simpler...

Yes, I agree, server setup is a bitch and a half right now.  I'm not
really sure how to simplify it, though there must be a way.

Here's that script, /usr/local/cleanup.sh for me:

--------------------8-<-------cut-here---------8-<-----------------------
#!/bin/sh

# Take care of libs
cd /usr/local/lib
rm -f APRVARS
rm -f libapr*
rm -f libexpat*
rm -f libneon*
rm -f libsvn*

# Take care of headers
cd /usr/local/include/subversion-1
rm -f apr*
rm -f svn*
rm -f neon/*
cd /usr/local/include
rm -f expat.h

# And apr's config helpers
cd /usr/local/bin
rm -f apr-config
rm -f apu-config

# Take care of httpd
cd /usr/local/
if [ -d apache2 ]; then
  # Back up the backup.
  if [ -d was_apache2 ]; then
    rm -rf was_was_apache2
    mv was_apache2 was_was_apache2
  fi
  # Now get apache2 itself out of the way.
  mv apache2 was_apache2
fi

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

Re: Building Apache & mod_dav_svn

Posted by Marcus Comstedt <ma...@mc.pp.se>.
Karl Fogel <kf...@newton.ch.collab.net> writes:

> Marcus Comstedt <ma...@mc.pp.se> writes:
> > The Apache main binary OTOH, is linked statically
> > against APR.
> 
> ??
> 
> I thought Apache should be dynamically linked against APR; that's what
> you get if you follow the INSTALL recipe, at any rate...


Maybe it's because I tried to share APR dir between subversion and
Apache (didn't see the point in having two of them...).  Now I have
copied it, and rebuild, and Apache indeed seems to be dynamically
linked this time.  To be on the safe side, I tried using the same
--prefix for Subversion and Apache this time as well.  Still some
trouble though, it seems that the only lib that gets installed in
Apaches libdir is libsvn_subr-1.so.  Well, I'll keep trying, but this
really has to be simpler...


  // Marcus




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

Re: Building Apache & mod_dav_svn

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Marcus Comstedt <ma...@mc.pp.se> writes:
> The Apache main binary OTOH, is linked statically
> against APR.

??

I thought Apache should be dynamically linked against APR; that's what
you get if you follow the INSTALL recipe, at any rate...

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