[GNC-dev] Building 3.5 package for Disco

Stephen M. Butler kg7je at arrl.net
Fri May 3 18:07:44 EDT 2019

On 5/3/19 2:57 PM, John Ralls wrote:
> On May 3, 2019, at 2:44 PM, Stephen M. Butler <kg7je at arrl.net> wrote:
>> On 5/3/19 12:24 PM, John Ralls wrote:
>>> On May 3, 2019, at 8:37 AM, Stephen M. Butler <kg7je at arrl.net> wrote:
>>>> On 5/2/19 10:14 PM, John Ralls wrote:
>>>>>> On May 2, 2019, at 6:38 PM, Stephen M. Butler <kg7je at arrl.net> wrote:
>>>>>> /usr/bin/ld:
>>>>>> /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libgtest_main.a(gtest_main.cc.o):
>>>>> It's linking a system file instead of the one that GnuCash should have built. Is it linking that libgtest_main.a when you do a regular build?
>>>>> Regards,
>>>>> John Ralls
>>>> Yes, it appears to have done that.  I see this line in the
>>>> CMakeCache.txt file in my local build directory from the test yesterday
>>>> (not the directory where dpkg_buildpackage worked)
>>>> //Path to a library.
>>>> GTEST_MAIN_LIB:FILEPATH=/usr/lib/x86_64-linux-gnu/libgtest_main.a
>>>> I have attached the CMakeCache.txt file if that helps.
>>> The CMakeCache.txt shows what looks like a typo: GTEST_ROOT:UNINITIALIZED=/usr/src/googletest/googletesti
>>> What does the GTEST section of the debian-build CMakeCache.txt look like?
>>> Regards
>>> John Ralls
>>                -DGTEST_ROOT=/usr/src/googletest/googletest \
>>                -DGMOCK_ROOT=/usr/src/googletest/googlemock \
>> Do I need a space after the -D? 
> That isn't from CMakeCache.txt. 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
//Found GTest

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?

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

More information about the gnucash-devel mailing list