Libelektra: avoid downloading gtest

Created on 18 Aug 2019  路  7Comments  路  Source: ElektraInitiative/libelektra

  • [ ] for configure scripts
  • [ ] for Debian Docker files
low priority

All 7 comments

Seems like also in the Docker files of Debian gtest is downloaded manually.

@sanssecours do you know why we do not use what is included in Debian? Weirdly, libgtest-dev is installed.

Did you try if GTEST_ROOT=/usr works?

@sanssecours do you know why we do not use what is included in Debian?

As far as I know, it is the usual reason, being that packages in Debian鈥檚 official software repositories are quite old/outdated. I think using the Google Test sources from Debian buster and Debian sid should work though.

Did you try if GTEST_ROOT=/usr works?

Nope.

apt install googletest and passing -DGTEST_ROOT="/usr/src/googletest/googletest" to cmake seems to do the trick (for buster).

On the build server there are problems with using the gtest of Debian:
https://build.libelektra.org/jenkins/blue/organizations/jenkins/libelektra/detail/PR-2889/18/pipeline/313

In file included from /usr/src/googletest/googletest/include/gtest/internal/gtest-internal.h:40:0,

                 from /usr/src/googletest/googletest/include/gtest/gtest.h:58,

                 from /usr/src/googletest/googletest/src/gtest_main.cc:32:

/usr/src/googletest/googletest/include/gtest/internal/gtest-port.h:309:5: error: "_MSC_VER" is not defined [-Werror=undef]

 #if _MSC_VER >= 1500

     ^~~~~~~~

/usr/src/googletest/googletest/include/gtest/internal/gtest-port.h:393:5: error: "GTEST_OS_WINDOWS" is not defined [-Werror=undef]

 #if GTEST_OS_WINDOWS

     ^~~~~~~~~~~~~~~~

In file included from /usr/src/googletest/googletest/include/gtest/internal/gtest-internal.h:40:0,

                 from /usr/src/googletest/googletest/include/gtest/gtest.h:58,

                 from /usr/src/googletest/googletest/src/gtest_main.cc:32:

/usr/src/googletest/googletest/include/gtest/internal/gtest-port.h:411:5: error: "GTEST_OS_LINUX_ANDROID" is not defined [-Werror=undef]

 #if GTEST_OS_LINUX_ANDROID

     ^~~~~~~~~~~~~~~~~~~~~~

/usr/src/googletest/googletest/include/gtest/internal/gtest-port.h:418:6: error: "GTEST_OS_LINUX_ANDROID" is not defined [-Werror=undef]

So better we leave this issue for now.

On the build server there are problems with using the gtest of Debian:
https://build.libelektra.org/jenkins/blue/organizations/jenkins/libelektra/detail/PR-2889/18/pipeline/313

That the build job debian-stretch-full fails, is expected behavior. The Google Tests version in Debian oldstable is just too old to work correctly.

Thank you, so we could fix it for the other Debian images?

Thank you, so we could fix it for the other Debian images?

Yes. As far as I know, Debian stable and Debian unstable should offer the correct version of Google Test (v1.8.1 or newer).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markus2330 picture markus2330  路  585Comments

markus2330 picture markus2330  路  28Comments

sanssecours picture sanssecours  路  28Comments

ghost picture ghost  路  29Comments

markus2330 picture markus2330  路  28Comments