[GNC-dev] Building 3.5 package for Disco

Stephen M. Butler kg7je at arrl.net
Thu May 2 21:38:33 EDT 2019


On 4/30/19 7:29 AM, John Ralls wrote:
> The arguments I gave you are for the cmake command line. I don't know the packaging tool you're using, but it's obviously constructing a cmake command line out of compressed arguments: The snippet --with python3,aqbanking would be passed to cmake as -D WITH_PYTHON=ON -D WITH_AQBANKING=ON.
>
> You'll need to read the docs on the packaging tool to find out how to set other kinds of cmake options.
>
> Regards,
> John Ralls

Found reference to this snippet of the rules file and added the two
underlined lines:

override_dh_auto_configure:
        ## copy gtest sources
        mkdir -p .build/__gtest
        cp -Rv /usr/src/googletest/* .build/__gtest/
        env    ## debug
        mkdir -v -p \
            "$${HOME}"/.local/share/GnuCash/books \
            "$${HOME}"/.local/share/GnuCash/checks \
            "$${HOME}"/.local/share/GnuCash/translog
        dh_auto_configure -- -Wdev \
               -DCMAKE_VERBOSE_MAKEFILE=ON  \
               -DCMAKE_BUILD_TYPE=Release   \
               -DCMAKE_CXX_FLAGS="$(CXXFLAGS) $(CPPFLAGS)" \
               -DWITH_PYTHON=ON             \
              
-DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/gnucash \
_               -DGTEST_ROOT=/usr/src/googletest/googletest \__
__               -DGMOCK_ROOT=/usr/src/googletest/googlemock \__
_                $(CMAKE_WORDS_BIGENDIAN) \
        ;

But ran into this condition near the end of the build:

[ 87%] Linking CXX executable ../../../../bin/test-tx_import

cd
/home/steve/Projects/GnuCash/gnucash/.build/gnucash/import-export/csv-imp/test
&& /usr/bin/cmake -E cmake_link_script
CMakeFiles/test-tx_import.dir/link.txt --verbose=1
/usr/bin/c++  -Wno-error=deprecated-declarations  -Werror -Wall
-Wmissing-declarations -Wno-unused -Wno-error=parentheses -std=gnu++11
-g -O2 -fdebug-prefix-map=/home/steve/Projects/GnuCash/gnucash=.
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
-D_FORTIFY_SOURCE=2 -O3 -DNDEBUG  -Wl,-Bsymbolic-functions -Wl,-z,relro
-Wl,-z,now -rdynamic CMakeFiles/test-tx_import.dir/test-tx-import.cpp.o 
-o ../../../../bin/test-tx_import
-Wl,-rpath,/home/steve/Projects/GnuCash/gnucash/.build/lib/x86_64-linux-gnu/gnucash/gnucash:/home/steve/Projects/GnuCash/gnucash/.build/lib/x86_64-linux-gnu/gnucash
../../../../lib/x86_64-linux-gnu/gnucash/gnucash/libgncmod-csv-import.so
-lglib-2.0 -Wl,-Bstatic -lgtest -lgtest_main -Wl,-Bdynamic -licui18n
-licuuc -licudata
../../../../lib/x86_64-linux-gnu/gnucash/gnucash/libgncmod-generic-import.so
../../../../lib/x86_64-linux-gnu/gnucash/gnucash/libgncmod-gnome-utils.so
../../../../lib/x86_64-linux-gnu/gnucash/libgnc-backend-xml-utils.so -lz
-ldl -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0
-lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lsecret-1
../../../../lib/x86_64-linux-gnu/gnucash/gnucash/libgncmod-app-utils.so
-lgio-2.0 -lxslt -lxml2
../../../../lib/x86_64-linux-gnu/gnucash/gnucash/libgncmod-engine.so
../../../../lib/x86_64-linux-gnu/gnucash/libgnc-core-utils.so
-lboost_date_time -lboost_regex -lboost_locale -lboost_filesystem
-lboost_system -lgobject-2.0
../../../../lib/x86_64-linux-gnu/gnucash/libgnc-module.so
-Wl,--export-dynamic -lgmodule-2.0 -lglib-2.0 -pthread -lguile-2.0 -lgc
/usr/bin/ld:
/usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libgtest_main.a(gtest_main.cc.o):
in function `main':


(.text.startup+0x2f): undefined reference to
`testing::InitGoogleTest(int*, char**)'

/usr/bin/ld: (.text.startup+0x34): undefined reference to
`testing::UnitTest::GetInstance()'
/usr/bin/ld: (.text.startup+0x3c): undefined reference to
`testing::UnitTest::Run()'
collect2: error: ld returned 1 exit status


make[5]: ***
[gnucash/import-export/csv-imp/test/CMakeFiles/test-tx_import.dir/build.make:103:
bin/test-tx_import] Error 1

make[5]: Leaving directory '/home/steve/Projects/GnuCash/gnucash/.build'
make[4]: *** [CMakeFiles/Makefile2:9843:
gnucash/import-export/csv-imp/test/CMakeFiles/test-tx_import.dir/all]
Error 2
make[4]: Leaving directory '/home/steve/Projects/GnuCash/gnucash/.build'
make[3]: *** [CMakeFiles/Makefile2:261: CMakeFiles/check.dir/rule] Error 2
make[3]: Leaving directory '/home/steve/Projects/GnuCash/gnucash/.build'
make[2]: *** [Makefile:226: check] Error 2
make[2]: Leaving directory '/home/steve/Projects/GnuCash/gnucash/.build'
+ RV=2
+ [ 2 -eq 0 ]
+ cat .build/Testing/Temporary/LastTest.log
cat: .build/Testing/Temporary/LastTest.log: No such file or directory
+ exit 2
make[1]: *** [debian/rules:69: override_dh_auto_test] Error 2
make[1]: Leaving directory '/home/steve/Projects/GnuCash/gnucash'
make: *** [debian/rules:26: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit
status 2


Not sure why it fails inside dpkg_buildpackage but works OK directly.

-- 
Stephen M Butler, PMP, PSM
Stephen.M.Butler51 at gmail.com
kg7je at arrl.net
253-350-0166
-------------------------------------------
GnuPG Fingerprint:  8A25 9726 D439 758D D846 E5D4 282A 5477 0385 81D8




More information about the gnucash-devel mailing list