[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Fix Makefile.svn to build APR with threads

From: Stefan Sperling <stsp_at_elego.de>
Date: Tue, 30 Nov 2010 12:41:41 +0100

On Tue, Nov 30, 2010 at 02:09:10PM +0530, Ramkumar Ramachandra wrote:
> Hi,
>
> Here's a quick patch to fix Makefile.svn. I need a +1 to commmit this.

If the build breaks because of threadless APR, that's a bug in Subversion,
not in Makefile.svn.

If you want to build with thread support, please make it conditional
on a global Makefile flag, as in "make THREADED=1".
I'd like to keep the default non-threaded for two reasons.

The first is that I use OpenBSD and OpenBSD's threading implementation
is a pure userspace implementation. It has to set stdin and stdout to
non-blocking -- otherwise, whenever a thread blocks for i/o in the kernel the
userspace thread-scheduler would also be blocked and couldn't switch to
another thread. However, non-blocking stdio makes it very inconvenient
to do things like "svn diff | less" because less expects blocking reads.
The lines get garbled when you start scrolling in less.
(Kernel thread support is being worked on by OpenBSD developers.)

The second reason is that virtually nobody else is compiling and running
without thread support in APR. This sometimes causes thread-less cases
to be overlooked. Most recently I found a bug in the performance branch
due to this. So it's good to have test coverage for the thread-less case.
Because of this I will likely continue compiling APR thread-less even when
OpenBSD finally gets kernel thread support.

Your patch is too short. It's missing at least one hunk. Because if threading
is enabled for APR, you should also enable it for sqlite and any other
dependencies affected.

Stefan

>
> Thanks.
>
> [[[
> Makefile.svn: Fix build
>
> * tools/dev/unix-build/Makefile.svn: Configure APR to build with
> threads enabled to prevent breaking the Subversion build.
> ]]]
>
> Index: tools/dev/unix-build/Makefile.svn
> ===================================================================
> --- tools/dev/unix-build/Makefile.svn (revision 1040428)
> +++ tools/dev/unix-build/Makefile.svn (working copy)
> @@ -238,8 +238,7 @@
> cd $(APR_OBJDIR) \
> && env CFLAGS="-O0 -g" $(APR_SRCDIR)/configure \
> --prefix=$(PREFIX)/apr \
> - --enable-maintainer-mode \
> - --disable-threads
> + --enable-maintainer-mode
> touch $@
>
> # compile apr
Received on 2010-11-30 12:42:27 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.