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

Re: .swg files in subversion-1.3.0-rc2

From: Mathias Weinert <mathias.weinert_at_gfa-net.de>
Date: 2005-11-21 09:13:25 CET

james82@gmail.com wrote:
> On 11/16/05, Mathias Weinert <mathias.weinert@gfa-net.de> wrote:
> > After 'make' I do 'make swig-pl' and get
> > the following (line breaks and extra lines added
> > for readability):
> >
> > -----------------------------------
> >
> > /usr/bin/python /tmp/subversion-1.3.0-rc2/build/
> > generator/swig/header_wrappers.py /tmp/subversion-1.3.0-rc2/
> > build.conf /usr/bin/swig /tmp/subversion-1.3.0-rc2/
> > subversion/include/svn_client.h
> >
> > /usr/bin/python /tmp/subversion-1.3.0-rc2/build/
> > generator/swig/header_wrappers.py /tmp/subversion-1.3.0-rc2/
> > build.conf /usr/bin/swig /tmp/subversion-1.3.0-rc2/
> > subversion/include/svn_ra_svn.h
> >
> > /usr/bin/python /tmp/subversion-1.3.0-rc2/build/
> > generator/swig/header_wrappers.py /tmp/subversion-1.3.0-rc2/
> > build.conf /usr/bin/swig /tmp/subversion-1.3.0-rc2/
> > subversion/include/svn_repos.h
> Why are these files being regenerated? These .swg files are shipped
> with the official distribution of subversion 1.3.0rc2, so they should
> not need to be regenerated. Currently, it is possible that SWIG files
> will be incorrectly regenerated under the following conditions:
> 1) The timestamps on the extracted files are different from those in
> the tarball; and
> 2) You are not using SWIG 1.3.25, but are using a different version,
> such as SWIG 1.3.24.
>
> I think we will either need to change our SWIG build procedure so that
> it does not depend on correct timestamps, or we will need to
> distribute our tarball without pregenerated SWIG headers.
>
> Some questions:
> 1) What program did you use to extract the tarball?

I extracted it under cygwin with "tar (GNU tar) 1.13.25"

> 2) After extracting the tarball, did you move it into a different
> directory, or conduct any operation which might change the timestamps?

No. The timestamps seem to be okay.

> 3) What filesystem are you using? Is it FAT32 or NTFS?

NTFS on WinXP with SP2

> 4) Are you using a pristine copy of the files in
> subversion-1.3.0-rc2-nodeps.tar.bz2, or did you modify a few files to
> make them work on cygwin?

That was the right question!

I modified some files (not only to make them work under cygwin
but some other changes) and guess which header files I changed...
svn_client.h, svn_ra_svn.h, svn_repos.h and svn_version.h

So I found the solution for the problem of the header files being
regenerated: I mustn't change the (source) header files
(or the corresponding .swg files have to be regenerated - as the
make process correctly did).

Unfortunately it doesn't help leaving these header files as they
are to solve my compile problem. I still get the same errors:
[...]
core.c:104: error: syntax error before "int"
core.c:119: error: syntax error before "int"
core.c:138: error: syntax error before "int"
[...]

After doing a 'make extraclean-swig-pl' all .swg files
are being regenerated and the compile is successfull.

>
> > [lots of error messages related to SWIG 1.3.24]
> >
> > FYI I am using SWIG Version 1.3.24 (under cygwin)
> If you use SWIG Version 1.3.25, I believe this will fix your problem.
>

Indeed, after switching to swig 1.3.25 everything is alright.

> Subversion should not be regenerating any of the ".swg" files at all,
> so it should in theory not matter what version of SWIG you have
> installed. But it looks like the files are being regenerated on your
> system.
>

To put it in a nutshell, the .swg files were regenerated because
I changed their source header files, if not changing these header
files I still get the same compiler errors, doing
'make extraclean-swig-pl' before 'make swig-pl' makes it work.

Finally, just a thought about the .swg files: I suppose that it may be
a problem if I changed some (source) header files and after that only
the corresponding .swg files are regenerated as this leads to some
.swg files generated with swig 1.3.24 (if this is the installed version)
and some with swig 1.3.25.
Wouldn't it be better to say "regenerate all .swg files if at least
one is out of date"?

Thank you very much for your help!

Mathias

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 21 09:14:11 2005

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.