jhbuild error on Mac OSX Lion

Reuben Cummings reubano at gmail.com
Tue Jan 10 03:09:02 EST 2012

On Mon, Jan 9, 2012 at 6:11 PM, John Ralls <jralls at ceridwen.us> wrote:
> First of all, please remember to copy the list on your replies.

Ok, sorry about that.

> Second, don't try to build universal -- do only one architecture. Nothing in Gnucash benefits from 64-bit anything, so
> there's no point.

So are you saying change

os.environ["ARCHFLAGS"] = "-arch x86_64 -arch i386"


os.environ["ARCHFLAGS"] = "-arch i386"

The former is from http://live.gnome.org/GTK%2B/OSX/Building#XCode4

> Third, you're still not doing very well in the instructions-reading department. You have to use a different moduleset to
> get the gnucash modules.

Ok, what I didn't realize was that the line you had me add

moduleset = "http://git.gnome.org/browse/gtk-osx/plain/modulesets-stable/gtk-osx.modules"

over-rode the moduleset already defined in

moduleset = "http://github.com/jralls/gnucash-on-osx/raw/master/modulesets/gnucash.modules"

So I commented them out and added

moduleset=os.environ['HOME'] + '/mymodules.modules'

as per http://live.gnome.org/GTK%2B/OSX/Building#Building_Other_Programs

then I did

tokpro:~ admin$ nano ~/mymodules.modules

and added

<?xml version="1.0"?>
<!DOCTYPE moduleset SYSTEM "moduleset.dtd">
<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
    <include href="http://git.gnome.org/browse/gtk-osx/plain/modulesets-stable/gtk-osx.modules"/>
    <include href="http://github.com/jralls/gnucash-on-osx/raw/master/modulesets/gnucash.modules"/>

It's still building but assuming all goes well, .jhbuildrc-custom
should look like this:

# -*- mode: python -*-

#Uncomment this if you have a completed build and only want to rebuild
#updated modules instead of everything:
#build_policy = "updated-deps"

#Select one of these, or use a different one: Do keep the directories
#separate for stable and unstable as they have different
#dependencies. You can use 2.3.x for svn builds.
prefix = os.path.join(os.environ["HOME"], "gnucash-stable")
#prefix = os.path.join(os.environ["HOME"], "gnucash-unstable")

#Select which modules to build. The only difference is which gnucash
#module (and all of the dependencies, see above) get built:
modules = ["meta-gtk-osx-bootstrap", "meta-gtk-osx-core", "gnucash"]
#modules = ["meta-gtk-osx-bootstrap", "meta-gtk-osx-core", "gnucash-unstable"]
#modules = ["meta-gtk-osx-bootstrap", "meta-gtk-osx-core", "gnucash-svn"]

#Setup the build. PPC users will need to replace "i386" with
#"ppc". Don't try to do a universal build, it doesn't work. x86_64 is
#untested, as is building against the 10.6 or 10.7 SDKs.
setup_sdk(target="10.6", sdk_version="10.6", architectures=["i386"])

moduleset=os.environ['HOME'] + '/mymodules.modules'
#moduleset = "http://github.com/jralls/gnucash-on-osx/raw/master/modulesets/gnucash.modules"
#moduleset = "http://git.gnome.org/browse/gtk-osx/plain/modulesets-stable/gtk-osx.modules"

#If you wish to enable the mysql backend, uncomment the lines below.
#MySQL requires CMake 2.6.0 or later to build, so the libmysql module
#has a dependency on cmake which will be built by default. If you
#already have CMake installed on the path, add "skip.append("cmake")
#somewhere in this file.

#module_extra_env["mysql"] = { "CMAKE_INSTALL_PREFIX":  prefix }
#append_autogenargs("libdbi-drivers", "--with-mysql
--with-mysql-incdir=" + prefix + "/include --with-mysql-libdir=" +
prefix + "/lib")

append_autogenargs("libofx", "--with-opensp-includes=" + prefix +
"/include/OpenSP --with-opensp-libs=" + prefix + "/lib")
append_autogenargs("libgnomeui", "--disable-static --enable-shared
--disable-scrollkeeper --disable-xlib --without-x")
append_autogenargs("scrollkeeper", "--with-xml-catalog=" +
os.path.join(prefix, "etc/xml/catalog"))

append_autogenargs("OpenSP", "--enable-shared") #To override the
global --disable-shared
append_autogenargs("libdbi-drivers","--with-dbi-incdir=" + prefix +
"/include --with-dbi-libdir=" + prefix + "/lib")
append_autogenargs("gnucash-unstable", "--with-dbi-dbd-dir=" + prefix
append_autogenargs("gnucash-svn", "--with-dbi-dbd-dir=" + prefix +"/lib/dbd")
append_autogenargs("gnucash", "--with-dbi-dbd-dir=" + prefix +"/lib/dbd")

append_autogenargs("libiconv", "--with-libintl-prefix=" + prefix)

module_makecheck["gmp"] = True

os.environ["ARCHFLAGS"] = "-arch i386"
os.environ["CC"] = "/usr/bin/llvm-gcc-4.2"
os.environ["CXX"] = "/usr/bin/llvm-g++-4.2"

# end

So the complete steps for lion are

sh gtk-osx-build-setup.sh
nano ~/.jhbuildrc-custom (to look like above)
nano ~/mymodules.modules (to look like above)
echo "export PATH=$PATH:~/.local/bin" >> ~.profile
jhbuild bootstrap --skip=libiconv
jhbuild build


One question though, the first time I ran

jhbuild bootstrap

and then I realized it should be

jhbuild bootstrap --skip=libiconv

Is it sufficient to just rerun it with the extra argument?

- Reuben

More information about the gnucash-devel mailing list