[GNC-dev] Building 3.5 package for Disco

John Ralls jralls at ceridwen.us
Fri May 3 19:32:35 EDT 2019



> On May 3, 2019, at 3:55 PM, Stephen M. Butler <kg7je at arrl.net> wrote:
> 
> On 5/3/19 3:07 PM, Stephen M. Butler wrote:
>> On 5/3/19 2:57 PM, John Ralls wrote:
>>> <<snip>>
>>> Please copy All of the lines beginning with GTEST from the
>>> CMakeCache.txt in your debian-build controlled build directory. You
>>> can get that easily with
>>>  grep ^GTEST path/to/CMakeCache.txt
>>> 
>>> CMake doesn't care if there's whitespace between the -D and the variable name.
>>> 
>>> Regars,
>>> John Ralls
>>  grep -i gtest CM*.txt
>> GMOCK_INCLUDE_DIR:PATH=/home/steve/Projects/GnuCash/gnucash/.build/__gtest/googlemock/include
>> GMOCK_SRC_DIR:PATH=/home/steve/Projects/GnuCash/gnucash/.build/__gtest/googlemock
>> GTEST_INCLUDE_DIR:PATH=/home/steve/Projects/GnuCash/gnucash/.build/__gtest/googletest/include
>> GTEST_MAIN_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libgtest_main.a
>> GTEST_ROOT:UNINITIALIZED=/usr/src/googletest/googletest
>> GTEST_SHARED_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libgtest.a<snip
>> //Found GTest
>> GTEST_FOUND:INTERNAL=YES
>> 
>> 
>> Part of the build rules copies /usr/src/googletest down to the build folder:
>> 
>>         mkdir -p .build/__gtest
>>         cp -Rv /usr/src/googletest/* .build/__gtest/
>> 
>> Perhaps I should point cmake to that location instead?
>> 
> I made the change to point to the copy as noted above and hit same
> snag.  Then tried to bypass the auto test and ran into this much further
> down the road:
> 
>    debian/rules override_dh_install
> make[1]: Entering directory '/home/steve/Projects/GnuCash/gnucash'
> rm -f -fv debian/tmp/usr/share/glib-2.0/schemas/gschemas.compiled  #
> L:package-contains-compiled-glib-schema
> removed 'debian/tmp/usr/share/glib-2.0/schemas/gschemas.compiled'
> pod2man -s1 --stderr --utf8 debian/tmp/usr/bin/gnc-fq-check
> debian/tmp/gnc-fq-check.1
> find debian/tmp/usr/lib -name \*.la -exec rm -v \{\} \;
> dh_install
> make[1]: Leaving directory '/home/steve/Projects/GnuCash/gnucash'
>    dh_installdocs -O--buildsystem=cmake -O--builddirectory=.build
>    dh_installchangelogs -O--buildsystem=cmake -O--builddirectory=.build
>    dh_installexamples -O--buildsystem=cmake -O--builddirectory=.build
>    dh_installman -O--buildsystem=cmake -O--builddirectory=.build
>    dh_installinfo -O--buildsystem=cmake -O--builddirectory=.build
> dh_installinfo: Cannot find (any matches for)
> "libgnucash/doc/design/gnucash-design.info" (tried in .)
> 
> make: *** [debian/rules:24: binary] Error 2
> dpkg-buildpackage: error: fakeroot debian/rules binary subprocess
> returned exit status 2
> 
> ----------------------
> 
> override_dh_install has these lines:
> 
> override_dh_install:
>         $(RM) -fv
> debian/tmp/usr/share/glib-2.0/schemas/gschemas.compiled  #
> L:package-contains-compiled-glib-schema
>         pod2man -s1 --stderr --utf8 debian/tmp/usr/bin/gnc-fq-check
> debian/tmp/gnc-fq-check.1
>         find debian/tmp/usr/lib -name \*.la -exec rm -v \{\} \;
>         dh_install
> 
> --------------------------
> 
> gnucash.install has these lines:
> 
> ## https://bugzilla.gnome.org/show_bug.cgi?id=790840
> usr/lib/*/gnucash/
> 
> usr/bin/gnucash
> usr/bin/gnc-fq-check
> usr/bin/gnc-fq-dump
> usr/bin/gnc-fq-helper
> usr/bin/gnc-fq-update
> usr/share/applications/gnucash.desktop
> etc
> 
> ---------------------------
> 
> gnucash-common.install  has this:
> 
> usr/share/glib-2.0/schemas
> usr/share/gnucash
> usr/share/icons
> usr/share/locale
> usr/include
> --------------------------------
> 
> python3-gnucash.install has these:
> 
> ## https://bugzilla.gnome.org/show_bug.cgi?id=790550
> usr/lib/python*/dist-packages/gnucash/*.so
> =================================
> 
> not sure which one was being processed.

gnucash-design.info is built only if you have make info installed. I wouldn't bother, the document is severely obsolete. Just find it in your build description and remove it.

Let's get back to gtest. I looked at gnc_gtest_configure() in common/cmake_modules/GncAddTest.cmake and was reminded that if cmake finds libgtest.a that it will ignore the source directory and use the system libgtest.a.

The missing symbols are from libgtest.a, so maybe the linker is getting them in the wrong order. Open GncAddTest.cmake in an editor and at line 137 change
   set(GTEST_LIB "${GTEST_SHARED_LIB};${GTEST_MAIN_LIB}" PARENT_SCOPE)
to
   set(GTEST_LIB "${GTEST_MAIN_LIB};${GTEST_SHARED_LIB}" PARENT_SCOPE)

and see if that fixes the error.

It's been that way for a long time so why it would suddenly matter is strange...

Regards,
John Ralls



More information about the gnucash-devel mailing list