Re: [GNC-dev] Noob: setup and build master
Thanks John, that did it. I had to interrupt and wipe the directory but after that, the build completed successfully! Thanks a bunch! Jean On 3/13/20 3:58 PM, John Ralls wrote: Jean, Indeed, I mixed up perl and python syntax. The line should be module_cmakeargs['boost'] = '-DCMAKE_CXX_FLAGS="' + os.environ['CXXFLAGS'] + ' -std=c++17"' Note the single quotes around the python arguments and the double quotes setting off the string value passed to -DCMAKE_CXX_FLAGS. Regards, John Ralls On Mar 13, 2020, at 12:13 PM, Jean Laroche wrote: John Something must be wrong with the syntax you suggested. Since I don't know my jhbuild at all, I don't know how to fix this. Traceback (most recent call last): File "/Users/jlaroche/Source/jhbuild/jhbuild/config.py", line 194, in load execfile(filename, config) File "/Users/jlaroche/.config/jhbuildrc", line 462, in execfile(_user_rc) File "/Users/jlaroche/.config/jhbuildrc-custom", line 54 module_cmakeargs["boost"] = "-DCMAKE_CXX_FLAGS=" . os.environ["CXXFLAGS"] . " -std=c++17" ^ SyntaxError: invalid syntax jhbuild: could not load config file On 3/13/20 11:49 AM, John Ralls wrote: On Mar 13, 2020, at 11:20 AM, Jean Laroche wrote: 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. John, is this going to work with xcode? Also, will that affect my maint branch (I have two separate build dirs for maint and master)? Jean Jean, If you mean can you do that in Xcode, no you can't. Boost needs to be built to the highest standard you want to use, so it will still link with maint, which is built to C++11. Regards, John Ralls ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [GNC-dev] Noob: setup and build master
John Something must be wrong with the syntax you suggested. Since I don't know my jhbuild at all, I don't know how to fix this. Traceback (most recent call last): File "/Users/jlaroche/Source/jhbuild/jhbuild/config.py", line 194, in load execfile(filename, config) File "/Users/jlaroche/.config/jhbuildrc", line 462, in execfile(_user_rc) File "/Users/jlaroche/.config/jhbuildrc-custom", line 54 module_cmakeargs["boost"] = "-DCMAKE_CXX_FLAGS=" . os.environ["CXXFLAGS"] . " -std=c++17" ^ SyntaxError: invalid syntax jhbuild: could not load config file On 3/13/20 11:49 AM, John Ralls wrote: On Mar 13, 2020, at 11:20 AM, Jean Laroche wrote: 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. John, is this going to work with xcode? Also, will that affect my maint branch (I have two separate build dirs for maint and master)? Jean Jean, If you mean can you do that in Xcode, no you can't. Boost needs to be built to the highest standard you want to use, so it will still link with maint, which is built to C++11. Regards, John Ralls ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [GNC-dev] Noob: setup and build master
> On Mar 13, 2020, at 11:20 AM, Jean Laroche wrote: > >> 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. > > John, is this going to work with xcode? > Also, will that affect my maint branch (I have two separate build dirs for > maint and master)? > Jean Jean, If you mean can you do that in Xcode, no you can't. Boost needs to be built to the highest standard you want to use, so it will still link with maint, which is built to C++11. Regards, John Ralls ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [GNC-dev] Noob: setup and build master
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. John, is this going to work with xcode? Also, will that affect my maint branch (I have two separate build dirs for maint and master)? Jean ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [GNC-dev] Noob: setup and build master
> On Mar 12, 2020, at 12:11 PM, Jean Laroche 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/jlaro che/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-s table/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 ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [GNC-dev] Noob: setup and build master
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 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 ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [GNC-dev] Noob: setup and build master
Thanks John, What about building the xcode project, are there differences between the cmake command to do that between the two branches? Jean On 3/11/2020 8:13 PM, John Ralls wrote: On Mar 11, 2020, at 2:35 PM, jeanl 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 ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Re: [GNC-dev] Noob: setup and build master
> On Mar 11, 2020, at 2:35 PM, jeanl 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 ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
[GNC-dev] Noob: setup and build master
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). Thanks for any help. Jean -- Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-Dev-f1435356.html ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel