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

Re: [PATCH] perl swig bindings failure in svn 1.1.0

From: Ben Reser <ben_at_reser.org>
Date: 2004-10-07 08:58:40 CEST

On Wed, Oct 06, 2004 at 07:41:43PM -0700, J Robert Ray wrote:
> Hello,
> I had a problem building and using the perl swig bindings that ship with
> subversion 1.1.0. I am using perl 5.8.0.
> Sample error message:
> Modification of a read-only value attempted at
> subversion-1.1.0/subversion/bindings/swig/perl/native/Core.pm line 6.
> Compilation failed in require.
> BEGIN failed--compilation aborted.
> In Core.pm, the 'use SVN::Base qw(Core svn_);' line seems to create a
> $SVN::Core::VERSION variable, set to '1.1.0'. The next line also tries
> to set this variable and produces the above error.
> I found the most sensible approach was to comment out the two lines that
> try to redundantly set the VERSION variable. Patch attached.
> Another approach that works (but is silly) is to put those two lines in
> a BEGIN {} block above the 'use SVN::Base qw(Core svn_);' line.
> Without this patch, the perl binding test suite fails a bunch of times
> with that same error message above. With the patch, the test suite
> succeeds and the perl binding do indeed to work fine.
> I don't know if this problem is happening for everyone or is something
> specific to my configuration, but I wanted to point it out to the
> developers.

I can't seem to replicate this. Can you provide the output of the
following commands:

perl -v
swig -version

The error you got is indicitive of an attempt to change a constant.
$SVN::Core::VERSION shouldn't be a constant. Though this might be
related to the addtiion of svn_*_version() functions to the various
libraries. But Perl has case sensitive namespaces... So VERSION
shouldn't be mapping to a constant since there is no svn_VERSION.

Also if you could post your subversion/bindings/swig/perl dir that might
be helpful. It's possible SWIG is generating some weird code on your

Lastly, looks like this may have been a Perl 5.8.0 bug, though I'm a bit
suprised we haven't seen it before. I build and test the bindings with
5.8.0 on Linux:

Ben Reser <ben@reser.org>
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 7 10:31:36 2004

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.