Minimum requirements for gcc in order to compile c-ares?

Mun Johl Mun.Johl at wdc.com
Wed Jan 11 01:10:14 CET 2023


Hi Brad,

On 1/10/23 4:46 PM, Mun Johl via c-ares wrote:

Hello,

I’m trying to compile c-ares on a RHEL7 server with gcc/g++ v4.8.5 .  My compilation is failing with many errors, the first of which is as follows:

In file included from ares-test.h:12:0,
                 from ares-test-main.cc:4:
./gmock-1.11.0/gtest/gtest.h: In static member function 'static constexpr bool testing::internal::MatcherBase<T>::IsInlined()':
./gmock-1.11.0/gtest/gtest.h:6495:12: error: 'is_trivially_copy_constructible' is not a member of 'std'

Based on a Google search, I infer that my gcc version is too old.  What are the minimum requirements to compile c-ares?


You just need to disable the test cases.  The test cases require a C++11 or higher compiler.  c-ares itself will build fine with any c89 compiler.

If you're using the autotools configure script, just pass --disable-tests  if you're using CMake, you would pass -DCARES_BUILD_TESTS=OFF

-Brad

[Mun] Thank you very much for your quick and informative response!  The use of --disable-tests did the trick.

Best regards,

--
Mun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.haxx.se/pipermail/c-ares/attachments/20230111/cb5e58ed/attachment.htm>


More information about the c-ares mailing list