[GNC-dev] Noob: setup and build master

John Ralls jralls at ceridwen.us
Thu Mar 12 18:16:58 EDT 2020



> On Mar 12, 2020, at 12:11 PM, Jean Laroche <ripngo at gmail.com> wrote:
> 
> 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

It's $PREFIX/lib/gnucash/, not $PREFIX/lib/libgnucash*, but that's not your problem.

It's because C++17 is set in GnuCash's CMakeLists.txt and boost defaults to building for C++14. I'd forgotten that I'd pushed that to the public master branch. I think the simplest way to rebuild it for you would be to add
   module_cmakeargs['boost'] = '-DCMAKE_CXX_FLAGS=' . os.environ['CXXFLAGS'] . ' -std=c++17'
to jhbuildrc-custom then run
   jhbuild buildone --force --clean boost

If that doesn't work on its own try doing the buildone again but stop it and tell it to wipe the directory and start over.

Regards,
John Ralls






More information about the gnucash-devel mailing list