Problems building with gtk-osx-build-setup.sh on Mac OS X 10.4 (ppc)

My overall goal here is to run gnucash. Having tried and failed a few different ways (macports, fink etc.) I thought I'd start fresh with a clean installation and see what happened. I'm following JRalls instructions from http://wiki.gnucash.org/wiki/MacOSX/Quartz, so have download the .jhbuild-custom file from http://github.com/jralls/gnucash-on-osx/raw/master/.jhbuildrc-custom - I don't know if that's affecting things here or not as I've not got very far.

Here's what I've done so far: -

Start with new Mac OS X 10.4 installation and apply all software updates
Install Xcode 2.558 downloaded from apple
Install Subversion 1.60 universal binary from collab.net
edit "~/.profile" to add ":/opt/subversion/bin:/Users/mje/bin" to path
download gtk-osx-build-setup.sh into /Users/mje/
download http://github.com/jralls/gnucash-on-osx/raw/master/.jhbuildrc-custom into /Users/mje/
execute "sh gtk-osx-build-setup.sh" (no problems)
execute "jhbuild bootstrap"
Step 8 (didn't record what it was called) requires autoconf 2.60 or higher, so it all stops. I started a shell, downloaded http://ftp.gnu.org/gnu/autoconf/autoconf-2.63.tar.gz and tried to build that, but it in turn requires a newer version of m4, so I downloaded http://ftp.gnu.org/gnu/m4/m4-1.4.12.tar.gz, and built that.
For each of these I extracted the archive into its own directory and from that directory executed "./configure", followed by "make" and then "sudo make install". This didn't seem to do what I expected - which was to intall the binaries in /usr/bin/ so I renamed the original /usr/bin/m4 and /usr/bin/autoconf and moved the binaries to /usr/bin
Now I could continue and "jhbuild bootstrap" completes successfully

I tried to run "jhbuild build meta-gtk-osx-bootstrap", but it stops at
*** Checking out docbook-setup *** [2/13]
curl -L http://github.com/rhult/gtk-osx-docbook/tarball/DB_1 -o /Users/mje/gtk/source/pkgs/DB_1
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1889k 100 1889k 0 0 187k 0 0:00:10 0:00:10 --:--:-- 274k
jhbuild build: failed to unpack /Users/mje/gtk/source/pkgs/DB_1

I know that this error is due to jhbuild using the old version of python but I thought that it had already been fixed to use the freshly-built python 2.5 (I vaguely recall a message flashing past at the begining mentioning python 2.3.5). I added ":/Users/mje/gtk/inst/bin" to the path in my ~/.profile and tried again, which worked fine.

So far so good, but I was wondering if these problems could be resolved within the build script - I'm rather new to this so I've not got my head around how things work enough yet to suggest a patch myself.

Later on things broke again - seemingly complaining that autoconf 2.60 was needed again, but it was late so I'll look into that another day.

OK, so running "jhbuild

OK, so running "jhbuild build meta-gtk-osx-bootstrap"

gets as far as this:

*** Checking out gtk-doc *** [4/13]
svn update --accept postpone .
At revision 714.
*** Configuring gtk-doc *** [4/13]
./autogen.sh --prefix /Users/mje/gtk/inst --libdir '${exec_prefix}/lib' --disable-scrollkeepeer --with-xml-catalog=$JHBUILD_PREFIX/etc/xml/catalog --disable-static --enable-shared --disable-gtk-doc --disable-docs --disable-scrollkeeper --disable-xlib
* Running gnome-doc-prepare
* Running aclocal-1.10
configure.in:14: error: Autoconf version 2.60 or higher is required
/Users/mje/gtk/inst/share/aclocal-1.10/init.m4:103: AM_INIT_AUTOMAKE is expanded from...
configure.in:14: the top level
autom4te: /usr/bin/gm4 failed with exit status: 63
aclocal-1.10: autom4te failed with exit status: 63
*** error during stage configure of gtk-doc: ########## Error running ./autogen.sh --prefix /Users/mje/gtk/inst --libdir '${exec_prefix}/lib' --disable-scrollkeepeer --with-xml-catalog=$JHBUILD_PREFIX/etc/xml/catalog --disable-static --enable-shared --disable-gtk-doc --disable-docs --disable-scrollkeeper --disable-xlib *** [4/13]

[1] rerun stage configure
[2] ignore error and continue to build
[3] give up on module
[4] start shell
[5] go to stage force_checkout
[6] go to stage force_clean
[7] go to stage force_distclean
choice: 4
exit shell to continue with build
mike-evans-emac:~/gtk/source/gtk-doc mje$ autoconf --version
autoconf (GNU Autoconf) 2.63
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.
mike-evans-emac:~/gtk/source/gtk-doc mje$

I'm confused by this, as it looks to me like it's complaining that I don't have autoconf 2.60. Am I missing something subtle here? Can anyone suggest what I should do next?

I'm not sure why it

I'm not sure why it complains about autoconf. Jhbuild includes, since some time last year, new enough versions of both autoconf and m4. I've just tried building from a scratch (on 10.5 though) and it works for me. Maybe the instructions you followed are flawed, I do not support any other instructions or scripts or setups than the one described on live.gnome.org.

The only issue I encountered was that the gtk-doc doc build breaks, which there is a bug filed for (to make gtk-doc honor the "--disable-scrollkeeper" option). In the meantime I've added a workaround to the jhbuild moduleset that makes the build ignore errors for gtk-doc and just install anyway. So if you rerun the setup script, that part should work. (Or you could just drop into the jhbuild shell and run "make install -k" of course.)

Hi Richard, thanks for the

Hi Richard, thanks for the reply.

Having dug a little deeper, it seems that I made two mistakes when upgrading M4 and autoconf:-

1) the original 1.4.2 version of m4 exists in /usr/bin/m4 and also /usr/bin/gm4, and I'd only replaced m4, while the jhbuild scripts use gm4

2) I'd not realised that there were more executables to Autoconf than just the one named "autoconf", and had only copied that executable to /usr/bin. Once I copied the others (specifically "autom4te") to /usr/bin things worked much better

gtk-doc is building as I type - fingers crossed it'll all work from here!

OK, good to hear, but you

OK, good to hear, but you shouldn't need to upgrade autoconf and m4, because jhbuild comes with recent versions...

Except it doesn't, because

Except it doesn't, because line 146 in .jhbuildrc says
"skip.append("autoconf") # We build autoconf-2.61 instead"
The problem being that there is no such package in bootstrap.modules (or in any other moduleset) and no dependency to pull it in if there was.

Commenting out that line fixes the problem.

Ah, good catch! Thanks, I

Ah, good catch! Thanks, I had not pushed that fix yet, done now.