[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 
CMAKE_INSTALL_PREFIX=$PREFIX -D GTEST_ROOT=$SRCROOT/googletest 
$SRCROOT/gnucash-git

But the build fails with this error:

Ld 
/Users/jlaroche/gnucash-stable/build_xcode_master/lib/libgnc-core-utils.dylib 
normal x86_64
     cd /Users/jlaroche/gnucash-stable/src/gnucash-git
     export MACOSX_DEPLOYMENT_TARGET=10.13
 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ 
-arch x86_64 -dynamiclib -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk 
-L/Users/jlaroche/gnucash-stable/build_xcode_master/lib 
-F/Users/jlaroche/gnucash-stable/build_xcode_master/lib -filelist 
/Users/jlaroche/gnucash-stable/build_xcode_master/libgnucash/core-utils/gnucash.build/Debug/gnc-core-utils.build/Objects-normal/x86_64/gnc-core-utils.LinkFileList 
-install_name @rpath/libgnc-core-utils.dylib -mmacosx-version-min=10.13 
-Xlinker -object_path_lto -Xlinker 
/Users/jlaroche/gnucash-stable/build_xcode_master/libgnucash/core-utils/gnucash.build/Debug/gnc-core-utils.build/Objects-normal/x86_64/gnc-core-utils_lto.o 
-Xlinker -no_deduplicate -fobjc-link-runtime -dynamiclib 
-Wl,-headerpad_max_install_names 
/Users/jlaroche/gnucash-stable/lib/libboost_date_time.dylib 
/Users/jlaroche/gnucash-stable/lib/libboost_regex.dylib 
/Users/jlaroche/gnucash-stable/lib/libboost_locale.dylib 
/Users/jlaroche/gnucash-stable/lib/libboost_filesystem.dylib 
/Users/jlaroche/gnucash-stable/lib/libboost_system.dylib 
-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 
/Users/jlaroche/gnucash-stable/build_xcode_master/libgnucash/core-utils/gnucash.build/Debug/gnc-core-utils.build/Objects-normal/x86_64/gnc-core-utils_dependency_info.dat 
-o 
/Users/jlaroche/gnucash-stable/build_xcode_master/lib/libgnc-core-utils.dylib

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 
invocation)

Does this ring a bell for anyone?
Jean

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