Win32 Build error - cannot find swig-runtime.h

Derek Atkins warlord at MIT.EDU
Mon Feb 26 20:20:21 EST 2007


Hi,

Quoting Paul J Stautzenberger-Crown <pjoseph at crownpride.com>:

> Greetings,
>
> The error I am getting is
>
> "It looks like you are NOT building from Subversion
> but I cannot find swig-runtime.h.  Check your PATH
> and make sure we can find svnversion in your PATH!
> Either that or contact gnucash-devel at gnucash.org because
> the tarball you downloaded is broken."
>
> Can you tranlate the above paragraph for me, so that I can at least
> begin to know where I want to try re-compiling or looking for a missing
> file, etc? Any ideas?

Well, which part(s) don't you understand?  If you say "all of it" then
I will quickly point you to the Dictionary.

Basically, the build system couldn't find the program "svnversion"
in your PATH.  It uses "svnversion" to detect whether or not you're
building from Subversion (and also to pull out the subversion revision
number).   Now, the build system will create swig-runtime.h ONLY if
you're building out of subversion.

This is an invariant.  If you're not building out of subversion then you
must be building out of the tarball, and the tarball should already have
swig-runtime.h (created when the tarball is created).  But if you ARE
building out of Subversion, then it needs to detect that you're building
out of subversion.

So in your case:

  1) You ARE building out of subversion, but
  2) The system couldn't detect this, and
  3) You don't have swig-runtime.h

... So it throws an error because you've just violated the invariant.

Most likely the problem is that the build system cannot find "svnversion"
in your PATH..  So you should figure out where Subversion installed that
executable, and you should make sure it's in your runtime path in your
Msys shell.

> Thanks.
>
> Paul J Crown
>
[snip]
> With Firefox, I went to
> http://svn.gnucash.org/repo/gnucash/trunk/packaging/win32/
> I downloaded each of the following into P:\Develop\gnucash\packaging.  I
> assume that the files in this directory may change, but here is what
> existed today.

This probably isn't the best way to go about getting this...  IMHO
the best way to acquire these files is to install Subversion and then
pull then out directly.

[snip]
> I renamed README and functions because when I downloaded them they ended
> up with .html extensions.  So from my cmd box,

This latter file could be a problem!  "functions" is SHELL script code.
If it got downloaded as an HTML file then it could be a problem...

> cd \Develop\gnucash\packaging
> ren README.html README
> ren functions.html functions

Yeah, this could definitely be an issue...

[snip]
> Now, I downloaded MSYS{3}, wget{4}, and Qt{5} and saved each in
> P:\Develop\gnucash\downloads
>
> {3} http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe?download
> {4} http://prdownloads.sf.net/mingw/wget-1.9.1-mingwPORT.tar.bz2?download
> {5} ftp://ftp.trolltech.com/qt/source/qt-win-opensource-4.2.2-mingw.exe

Why are you downloading Qt here?  Does it say to do this in the
packaging/win32/README instructions?  I certainly didn't see it
in my reading of the instructions..

> Next, I execute (by double-click) qt-win-opensource-4.2.2-mingw.exe.  It
> asks for an install directory and I enter P:\Develop\gnucash\Qt\4.2.2
> Then I get a warning telling me that it can't find MingW install and
> wants to know what directory to use.  I enter P:\Develop\gnucash\mingw
> and let the install finish.  (I know that Mingw is not there now, but it
> will be).

I'm not surprised..  You're installing it out of order and not following
the instructions.

> I execute (by double-click) MSYS-1.0.10.exe.  It asks me where to
> install and I enter P:\Develop\gnucash\msys.  At somepoint it shows
> which tools are to be installed and the default it shows is just 'gcc'.
> I also click on 'g++' and make sure that 'Make' is not checked, then
> just let the install finish.  After installing, a cmd box asks if
> I want to normalize, and I answered N.

Why do you answer 'N'?

> At this point, I close the various windows open on my computer and see
> the 'M' icon on my desktop.  I execute MSYS (by double-clicking this
> icon) and get a yellow window with my computer name and then a '$'.
>
> At this $ prompt, I enter
>
> export QTDIR=/p/Develop/gnucash/Qt/4.2.2
> export aqbanking_with_qt=yes
> /p/Develop/gnucash/packaging/install.sh
>
> The compile takes hours, and I run into a couple of failures.  One
> failure shows it trying repeatedly to find a website that does not
> respond.  I discover my router to have had a problem and reboot it.  I
> end up rebooting my laptop and restarting MSYS and at the prompt enter
> again:
>
> export QTDIR=/p/Develop/gnucash/Qt/4.2.2
> export aqbanking_with_qt=yes
> /p/Develop/gnucash/packaging/install.sh
>
> This time it skips over sections that are already complete.  My next
> error was due to the firewall on my computer.  I use Outpost Firewall
> Pro ver. 4.0.971.7030 (584){6} and have it set to ask permission
> whenever a new program makes a DNS request or calls another application.
> I had been watching and authorizing the dozens of apps that make a
> request during this compile, but I was too slow to respond to one of
> them and the compile errored with the message "giving up".  I just
> restarted with:
>
> /p/Develop/gnucash/packaging/install.sh

I dont know if this works..  I've always run "install.sh" from the
actual directory..:

  cd /p/Develop/gnucash/packaging
  ./install.sh

[snip]
> As I approach the end, I run into an error:
>
> ############################################################
> ###  svn update in p:\Develop\gnucash\gnucash\repos
> ############################################################
> At revision 15670.
>
> ############################################################
> ###  GnuCash
> ############################################################
> Creating ./po/POTFILES.in ...
> Creating ./aclocal.m4 ...
> Running glib-gettextize --force --copy ...
> GnuCash note: Please ignore the output of glib-gettextize below!
> Copying file mkinstalldirs
> Copying file po/Makefile.in.in
> . . . . . . .
> . . . . . . .
> . . . . . . .
> checking for native Win32... yes
> checking for Win32 platform in general... yes
> checking for the tm_gmtoff member of struct tm... no
> checking if scanf supports %lld conversions... no
> checking if scanf supports %qd conversions... no
> checking if scanf supports %I64d conversions... yes
> checking for ../repos/src/swig-runtime.h... no
> configure: error:
>
> It looks like you are NOT building from Subversion
> but I cannot find swig-runtime.h.  Check your PATH
> and make sure we can find svnversion in your PATH!
> Either that or contact gnucash-devel at gnucash.org because
> the tarball you downloaded is broken.

As I said, this probably because the build system doesn't see
"svnversion.exe" in the runtime path..   I know one other person
had this issue once (and it failed much later in the build).. So
that's why I put in the configure test, to die sooner and provide
some guidance about the issue.

I dont recall who it was that had this issue before but maybe they
can chime in with their solution?

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available



More information about the gnucash-devel mailing list