Re: [gtk-osx-users] [Gtk-osx-users] Building gnucash on OS X 10.10 - Finally Success

On Apr 14, 2015, at 12:29 PM, Thinus Pollard <thinus pollard co za> wrote:

On 14 Apr 2015, at 13:34, Thinus Pollard <thinus pollard co za> wrote:

I finally got a successful build, and here is how I did it.

Start at

Look at the preliminaries:
1. download .jhbuildrc-custom into your homefolder
2. edit .jhbuildrc-custom, add 'skip.append("openssl")' somewhere in the file
3. download from
4. run "sh"
5. run "jhbuild bootstrap"

That takes care of the setup. At this point in time I backed up the
gnucash-stable dir

6. run "LC_ALL=C jhbuild build". OS X does not define LC_ALL and
webkit likes to have it
7. The build will fail at gwenhywfar with a error about implicit
function declaration
8. Hit 4 to drop to a shell, edit src/os/posix/directory.c and add "#
include <mach-o/dyld.h>" just after "#  include
9. type "exit"
10. Hit 1, Rerun phase Build

11. libsoup with a bang, it crashes python hard
12. hit 4 to drop to a shell
13. type "cd ../glib-networking-2.42.1/"
14. type "make uninstall && make install"
15. type "exit"
16. Hit 1 to Rerun phase Build

17. webkit will fail with: Source/WebCore/xml/XPathParser.cpp:480:22:
error: no matching function for call to 'xpathyyparse'
18. Hit 4 to drop to a shell.
19. go one level up "cd .."
20. type "cd pkgs" to go to the downloaded source archives
21. Backup the original webkit archive "cp webkit-1.6.1.tar.gz
22. extract webkit "tar xpvf webkit-1.6.1.tar.gz"
23. enter the directory "cd webkit-1.6.1"
24. apply the attached patch webkit.patch. "patch -Np1 < webkit.patch"

This patch is a collection of the following:
Fixes some Bison incompatibilities:
Fixes the "cannot inline" warnings:
My own, remove Tools/DumpRenderTree from the build process by removing
the references to it from various files
DumpRenderTree fails to build due to some pointer incompatibilities
between itself and nullptr.

25. From the webkit root do a "aclocal"
26. From the webkit root do a "automake"
27. Go one directory level up - to the source archives "cd .."
28. Re-create the tar.gz archive for webkit "rm webkit-1.6.1.tar.gz &&
tar cpvf webkit-1.6.1.tar webkit-1.6.1 && gzip webkit-1.6.1.tar"
29. exit
30. [6] Go to phase "wipe directory and start over"
31. Type "yes"
32. Webkit should build now and it should go all the way to the end of
building gnucash

Thanks to John for helping with known issues. I hope this can help
someone else out there, maybe even make it into the official build

Kind regards

>> You can set LC_ALL in your .jhbuild-custom with 
>>  os.environ["LC_ALL"] = "C"
>> if that's what you need to get webkit to build, though I think that it's weird that you'd need to. What's OS 
>> X setting $LANG to on your system? If you think that that's the solution to your earlier reported error
>> Tools/DumpRenderTree/gtk/DumpRenderTree.cpp:470:15: error: use of undeclared identifier 'LC_ALL'; did you 
>> mean 'P_ALL'?   setlocale(LC_ALL, ""); ^~~~~~ P_ALL 
>> Then you don't understand C.
>> Something else is wrong here: The current moduleset builds WebKitGtk 1.10, not 1.6, which explains why you 
>> need those old patches.
>> Regards,
>> John Ralls

Hi John

Thanks for the tip on setting the env variable in .jhbuildrc-custom

The LC_ALL error was one that I picked up. clang on 10.10 definitely threw that error. Not LANG or LC_ALL is set by default on OS X 10.10 in the terminal. The other had to do with DumpRenderTree, a utility that is not even installed (since it is listed in the noinst key of the makefile. That one caused build errors and after removing it from the build, it completed successfully. )

LANG *is* set by default in Terminal on my system, to en_US.UTF-8; LC_ALL isn’t. But their being set or not shouldn’t affect compilation. The error about it not being defined is due to the compiler not being able to find locale.h on the include path when compiling the compilation unit in question. That probably means that -isysroot is getting lost somehow. That’s not a problem on pre-Xcode 5 systems because there was /usr/include to fall back on, but includes are provided in the SDK for Xcode 5 and 6, there is no /usr/include.

The moduleset link in the jhbuildrc-custom downloadable from downloads and builds webkit-1.6.1. I cannot see a webkitGTK package being downloaded and built for gnucash-stable. The moduleset may then contain the incorrect link to the moduleset for gnucash-stable. Can you confirm that this is the case?

Ah, you’re right. I set it that way for building on 10.5 because webkit 1.10 wouldn’t build on that SDK. I’m a little surprised that it doesn’t work on 10.10 now; it did last fall. Perhaps some of the other updates break it when combined with the current compiler.

So I’ve made webkit and webkit1.6 soft dependencies for gnucash and gnucash-git. That means that they have to be included specifically in the modules list, but to make that simple I’ve defined a bunch of metamodules that depend on one or the other. Use meta-gnucash-stable for 10.7 and later and meta-gnucash-stable-Leopard for 10.5 and 10.6.
The commit includes changing the .jhbuildrc-custom in the repo, but you could just make the change in your local copy if you like.

John Ralls

BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises event?utm_
Gtk-osx-users mailing list
Gtk-osx-users lists sourceforge net

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]