You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Eric Hanchrow <of...@blarg.net> on 2003/06/23 19:16:29 UTC

0.24.2: hard-to-repro build trouble on Cygwin

I don't know if you'll be able to do anything about this, but I
figured it wouldn't hurt to mention it.

This is on a Cygwin system that was updated today, and on which I
installed everything that the Cygwin setup program offers.

I did not unpack the Berkeley DB tarball (or anything else) into the
subversion directory, since I only wanted to build the client.

I configured like this:

        ./configure --prefix=/usr/local/stow/svn-0.24.2/

Then I did `make', and saw this error:

swigutil_py.c, line 52:
        #error The python bindings require threads. APR was compiled
without threads.

I didn't (and still don't) understand the error.  Since I've built
many previous releases of subversion with no problem, I decided to
sweep the problem under the rug by adding the line `#undef
WITH_THREAD' just before `#if defined (WITH_THREAD)'.  Then the build
completed, and `make check' reported no failures, so I did `make
install' and it seems to work OK.

But I tried to repro the problem on another machine, and couldn't.
That machine was a VMware box on which I'd freshly installed Win2k and
Cygwin; the build worked fine the first time, with no tweaks.

Both machines have the same version of Python, whose
/usr/include/python2.2/pyconfig.h file says `#define WITH_THREAD 1'.
And on both machines,
/usr/local/src/subversion-0.24.2/apr/include/apr.h says `#define
APR_HAS_THREADS 0'.  I can't understand why the problem appeared on
one machine and not the other.

For what it's worth: on the machine on which the problem occurred, I
originally installed Cygwin a long time ago, and have been upgrading
it, whereas the machine which had no problem (as I mentioned above)
was a virgin installation.

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

Re: 0.24.2: hard-to-repro build trouble on Cygwin

Posted by Andy McCarty <mc...@lom.med.va.gov>.
* Ben Collins-Sussman <su...@collab.net> [2003-06-23 17:48:39 -0500]:

> Eric Hanchrow <of...@blarg.net> writes:
> 
> > I configured like this:
> > 
> >         ./configure --prefix=/usr/local/stow/svn-0.24.2/
> > 
> > Then I did `make', and saw this error:
> > 
> > swigutil_py.c, line 52:
> >         #error The python bindings require threads. APR was compiled
> > without threads.
> 
> I'm confused;  does our default 'make' target automatically try to
> bulid the swig bindings now?  If so, I must have missed the change.
> 
> If it's true, this is a Bad Thing.  The swig-py bindings *require* apr
> threads, but that apr feature isn't always available.  Meanwhile, svn
> itself does *not* require threads.  And now people with non-thready
> systems suddenly can't build svn...  bad bad bad bad bad.
> 
> 

This is the problem I was having over the weekend.  And why I asked
if APR_HAS_THREADS should be detected at configure.

-- 
~Andy

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

Re: 0.24.2: hard-to-repro build trouble on Cygwin

Posted by cm...@collab.net.
Philip Martin <ph...@codematters.co.uk> writes:

> > Well, then status quo is still badness.  It's already hit two people
> > -- a cygwin person and a freebsd person haven't been able to compile.
> 
> The glue code build can be disabled by using --without-swig when
> running configure.

Hm... perhaps we should switch the sense, then, and require
--with-swig do that some folks default 'configure' doesn't lead to
brokenness.  That, or fix configure.

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

Re: 0.24.2: hard-to-repro build trouble on Cygwin

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

> cmpilato@collab.net writes:
>
>> Ben Collins-Sussman <su...@collab.net> writes:
>> 
>> > I'm confused;  does our default 'make' target automatically try to
>> > bulid the swig bindings now?  If so, I must have missed the change.
>> >
>> > If it's true, this is a Bad Thing.  The swig-py bindings *require* apr
>> > threads, but that apr feature isn't always available.  Meanwhile, svn
>> > itself does *not* require threads.  And now people with non-thready
>> > systems suddenly can't build svn...  bad bad bad bad bad.
>> 
>> No, only tries to build the binding glue code (which is the part that
>> actually requires the APR threads).  We've been building this as part
>> of the regular 'make' target for ... well, for a very long time now.
>
> Well, then status quo is still badness.  It's already hit two people
> -- a cygwin person and a freebsd person haven't been able to compile.

The glue code build can be disabled by using --without-swig when
running configure.

-- 
Philip Martin

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

Re: 0.24.2: hard-to-repro build trouble on Cygwin

Posted by Ben Collins-Sussman <su...@collab.net>.
Justin Erenkrantz <ju...@erenkrantz.com> writes:

> A short-term solution that I'd rather see us use is to produce a
> run-time error if threads are used in Python with a threadless APR.
> Can we throw a Python exception?  This would allow the bindings to
> work if Python doesn't use threading (which I feel is the common case
> here) even if there is a mismatch.

Ahhhh, now I understand your goal.  You want the swig-py bindings to
compile no matter what, and throw a runtime error if a calling app
tries to use threads when they're not available.  Sorry for
misunderstanding.  That's a good proposal, I like it.

IIRC, Jon Trowbridge long ago made the swig-py code dependent on
threads so that his gsvn GUI app could launch svn_client_*() processes
in the background, and the GUI would still remain responsive to GUI
events.

Frankly, I don't know if it's possible to turn threads into a runtime
dependency rather than a compile-time dependency.  Someone more
knowledgable needs to answer that question.


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

Re: 0.24.2: hard-to-repro build trouble on Cygwin

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Monday, June 23, 2003 4:32 PM -0500 Ben Collins-Sussman 
<su...@collab.net> wrote:

> Not true.  I always --enable-threads when I build httpd/apr/apu.  And
> I've never had a problem, the swig-py bindings have always worked fine
> for me on FreeBSD.

And, for reasons I have previously described, FreeBSD's threads are broken and 
should not be used.  As long as you are fully aware of the risks involved, 
that's fine.  But, I don't believe SVN should be recommending enabling threads 
on FreeBSD.  And, note that the very problem with FreeBSD's threads are in the 
exact code you are enabling - thread locking is unreliable.

A short-term solution that I'd rather see us use is to produce a run-time 
error if threads are used in Python with a threadless APR.  Can we throw a 
Python exception?  This would allow the bindings to work if Python doesn't use 
threading (which I feel is the common case here) even if there is a mismatch.

As one of the maintainers of an SVN server on a FreeBSD box, I need to still 
be able to create the bindings without enabling threads.  -- justin

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

Re: 0.24.2: hard-to-repro build trouble on Cygwin

Posted by Ben Collins-Sussman <su...@collab.net>.
Justin Erenkrantz <ju...@erenkrantz.com> writes:

> --On Monday, June 23, 2003 4:02 PM -0500 Ben Collins-Sussman
> <su...@collab.net> wrote:
> 
> > If we're going to build the glue code as part of the generic 'make'
> > target, then Subversion's own configure.in needs to look to see if
> > APR_HAS_THREADS.  If not, we shouldn't try to build the glue code.
> >
> > Right?
> 
> That'd mean that FreeBSD/Cygwin won't support SWIG bindings.  Ick.

Not true.  I always --enable-threads when I build httpd/apr/apu.  And
I've never had a problem, the swig-py bindings have always worked fine
for me on FreeBSD.

The problem here is that Joe Newbie should be able unpack an svn
release tarball, run "./configure; make", and have it Just Work.  He
shouldn't have to know to pass --enable-threads to apr, or pass
--without-swig.  We should do the right thing by default:  either
don't build swig bindings by default, or build them *only* if threads
are detected.

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

Re: 0.24.2: hard-to-repro build trouble on Cygwin

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Monday, June 23, 2003 4:02 PM -0500 Ben Collins-Sussman 
<su...@collab.net> wrote:

> If we're going to build the glue code as part of the generic 'make'
> target, then Subversion's own configure.in needs to look to see if
> APR_HAS_THREADS.  If not, we shouldn't try to build the glue code.
>
> Right?

That'd mean that FreeBSD/Cygwin won't support SWIG bindings.  Ick.

I'd much rather attempt to think about what the proper thing to do when Python 
has threads and SVN/APR doesn't.  What can we do?  -- justin

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

Re: 0.24.2: hard-to-repro build trouble on Cygwin

Posted by cm...@collab.net.
Ben Collins-Sussman <su...@collab.net> writes:

> > No, only tries to build the binding glue code (which is the part that
> > actually requires the APR threads).  We've been building this as part
> > of the regular 'make' target for ... well, for a very long time now.
> 
> Well, then status quo is still badness.  

It would seem that way, yes.

> If we're going to build the glue code as part of the generic 'make'
> target, then Subversion's own configure.in needs to look to see if
> APR_HAS_THREADS.  If not, we shouldn't try to build the glue code.
> 
> Right?
> 
> Should I file an issue for this?

Unless someone has a quickie solution, then I'd say, "sure."

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

Re: 0.24.2: hard-to-repro build trouble on Cygwin

Posted by Ben Collins-Sussman <su...@collab.net>.
cmpilato@collab.net writes:

> Ben Collins-Sussman <su...@collab.net> writes:
> 
> > I'm confused;  does our default 'make' target automatically try to
> > bulid the swig bindings now?  If so, I must have missed the change.
> >
> > If it's true, this is a Bad Thing.  The swig-py bindings *require* apr
> > threads, but that apr feature isn't always available.  Meanwhile, svn
> > itself does *not* require threads.  And now people with non-thready
> > systems suddenly can't build svn...  bad bad bad bad bad.
> 
> No, only tries to build the binding glue code (which is the part that
> actually requires the APR threads).  We've been building this as part
> of the regular 'make' target for ... well, for a very long time now.

Well, then status quo is still badness.  It's already hit two people
-- a cygwin person and a freebsd person haven't been able to compile.

If we're going to build the glue code as part of the generic 'make'
target, then Subversion's own configure.in needs to look to see if
APR_HAS_THREADS.  If not, we shouldn't try to build the glue code.

Right?

Should I file an issue for this?

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

Re: 0.24.2: hard-to-repro build trouble on Cygwin

Posted by cm...@collab.net.
Ben Collins-Sussman <su...@collab.net> writes:

> I'm confused;  does our default 'make' target automatically try to
> bulid the swig bindings now?  If so, I must have missed the change.
>
> If it's true, this is a Bad Thing.  The swig-py bindings *require* apr
> threads, but that apr feature isn't always available.  Meanwhile, svn
> itself does *not* require threads.  And now people with non-thready
> systems suddenly can't build svn...  bad bad bad bad bad.

No, only tries to build the binding glue code (which is the part that
actually requires the APR threads).  We've been building this as part
of the regular 'make' target for ... well, for a very long time now.

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

Re: 0.24.2: hard-to-repro build trouble on Cygwin

Posted by Ben Collins-Sussman <su...@collab.net>.
Eric Hanchrow <of...@blarg.net> writes:

> I configured like this:
> 
>         ./configure --prefix=/usr/local/stow/svn-0.24.2/
> 
> Then I did `make', and saw this error:
> 
> swigutil_py.c, line 52:
>         #error The python bindings require threads. APR was compiled
> without threads.

I'm confused;  does our default 'make' target automatically try to
bulid the swig bindings now?  If so, I must have missed the change.

If it's true, this is a Bad Thing.  The swig-py bindings *require* apr
threads, but that apr feature isn't always available.  Meanwhile, svn
itself does *not* require threads.  And now people with non-thready
systems suddenly can't build svn...  bad bad bad bad bad.




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