[GNC-dev] Noob: setup and build master

Jean Laroche ripngo at gmail.com
Thu Mar 12 15:11:39 EDT 2020

Not having luck building master.
I followed John's instructions.
- I have no libgnc or libgnucash in $PREFIX/lib
- I created the xcode project using cmake -G Xcode -D 

But the build fails with this error:

normal x86_64
     cd /Users/jlaroche/gnucash-stable/src/gnucash-git
-arch x86_64 -dynamiclib -isysroot 
-F/Users/jlaroche/gnucash-stable/build_xcode_master/lib -filelist 
-install_name @rpath/libgnc-core-utils.dylib -mmacosx-version-min=10.13 
-Xlinker -object_path_lto -Xlinker 
-Xlinker -no_deduplicate -fobjc-link-runtime -dynamiclib 
-L/Users/jlaroche/gnucash-stable/lib -lintl -lglib-2.0 
-L/Users/jlaroche/gnucash-stable/lib -lgobject-2.0 -lintl -lglib-2.0 
-L/Users/jlaroche/gnucash-stable/lib -lgtkmacintegration-gtk3 -lgtk-3 
-lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 
-lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lintl 
-lglib-2.0 -lobjc -framework Cocoa -framework Security -framework Carbon 
-lgtkmacintegration-gtk3 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 
-lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 
-lobjc -framework Cocoa -framework Security -framework Carbon -Xlinker 
-dependency_info -Xlinker 

Undefined symbols for architecture x86_64:
   "boost::system::detail::system_category_instance", referenced from:
       boost::system::system_category() in gnc-filepath-utils.o
   "boost::system::detail::generic_category_instance", referenced from:
       boost::system::generic_category() in gnc-filepath-utils.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see 

Does this ring a bell for anyone?

On 3/11/20 8:13 PM, John Ralls wrote:
>> On Mar 11, 2020, at 2:35 PM, jeanl <ripngo at gmail.com> wrote:
>> Hi People,
>> Thanks to John I was able to setup and build maint on my mac. I'm now trying
>> to setup and build master which I've pulled into src/gnucash-git
>> Can someone clarify these points:
>> - I imagine I need to edit jhbuildrc-cusom and change the branch to master.
>> Do I do that before any of the following?
>> - Do I need to re-run jhbuild bootstrap?
>> - Do I need to re-run jhbuild bootstrap-gtk-osx?
>> - Do I need to re-run jhbuild build? (assuming yes).
> Jean,
> You only need to reconfigure and rebuild gnucash. At this point all dependencies are the same between master and maint. I do that in a jhbuild shell because as I said elsewhere I build from the terminal prompt, so I want to make an edit and then run ninja && ninja check (or more often ninja test-target && bin/test-program, TDD and all that).
> There's one cmake change between the two branches. In maint you set -DGTEST_ROOT=path/to/googletest/googletest -DGMOCK_ROOT=path/to/googletest/googlemock and in master you set only -DGTEST_ROOT=path/to/googletest. It works best to have a separate build directory and rm -rf * && cmake ... to switch branches.
> One other thing, make sure you uninstall GnuCash beforehand, the maint and master libraries are incompatible and Guile will dlopen the installed libraries in preference to the ones in the build directory. ninja uninstall doesn't always work, so if it fails try xargs rm < install_manifest.txt. If *that* fails the `rm -r $PREFIX/lib/libgnc* $PREFIX/lib/gnucash` should be sufficient.
> Regards,
> John Ralls

More information about the gnucash-devel mailing list