jhbuild error on Mac OSX Lion
John Ralls
jralls at ceridwen.us
Tue Jan 10 10:57:23 EST 2012
On Jan 10, 2012, at 12:09 AM, Reuben Cummings wrote:
> 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"
>
> to
>
> os.environ["ARCHFLAGS"] = "-arch i386"
Oh, sorry, no, that was a brain-fart. ARCHFLAGS is for perl Makemaker, you should leave it the way it is.
>
> 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
> http://github.com/jralls/gnucash-on-osx/raw/master/.jhbuildrc-custom
>
> 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"?>
> <moduleset>
> <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"/>
> </moduleset>
That will work, but the gnucash moduleset already includes gtk-osx.modules so it's not necessary.
>
> 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.
>
> #_gc_module=modules[-1]
> #modules[-1]="mysql"
> #modules.append(_gc_module)
> #module_extra_env["mysql"] = { "CMAKE_INSTALL_PREFIX": prefix }
> #append_autogenargs("libdbi-drivers", "--with-mysql
> --with-mysql-incdir=" + prefix + "/include --with-mysql-libdir=" +
> prefix + "/lib")
>
> skip.remove("gmp")
> skip.remove("guile")
> 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
> +"/lib/dbd")
> 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
>
As I said above, leave this at "-arch i386 -arch x86_64"; I was thinking of the wrong thing when I told you otherwise:
> os.environ["ARCHFLAGS"] = "-arch i386"
This is now fixed in jhbuildrc, so you don't need it in jhbuildrc-custom (after you re-run gtk-osx-build-setup.sh to get the latest jhbuildrc, anyway):
> 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
>
> correct??
Other than as noted above, yes.
>
> 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?
>
Unfortunately, no. You have to uninstall libiconv, with
jhbuild --moduleset=~/Source/jhbuild/modulesets/bootstrap.modules uninstall libiconv
It should be enough, but if you get link errors at runtime you'll have to rebuild everything to get the rpaths right.
My "clean Lion" (on a Dev Preview VM with no older stuff from earlier versions hanging around) build yesterday got to guile, which segfaulted during its install phase. I was focussing on getting the release done and didn't dig into it. Did your build get through that?
Regards,
John Ralls
More information about the gnucash-devel
mailing list