C Conan and googletest compilation

Hi, I'm trying to use conan in a C++ project which has
Code:
gtest/1.8.1@bincrafters/stable
as a dependency. I'm fetching the package with build=missing option to compile (because there is no prebuilt package for FreeBSD) but I get
Code:
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=clang
compiler.libcxx=libstdc++11
compiler.version=8
os=FreeBSD
os_build=FreeBSD
[options]
[build_requires]
[env]

gtest/1.8.1@bincrafters/stable: Not found in local cache, looking in remotes...
gtest/1.8.1@bincrafters/stable: Trying with 'conan-center'...
Downloading conanmanifest.txt completed [0.35k]                                      
Downloading conanfile.py completed [4.04k]                                            
Downloading conan_export.tgz completed [0.74k]                                        
Decompressing conan_export.tgz completed [0.00k]                                      
gtest/1.8.1@bincrafters/stable: Downloaded recipe revision 0
conanfile.py (myproject/None): Installing package
Requirements
    gtest/1.8.1@bincrafters/stable from 'conan-center' - Downloaded
Packages
    gtest/1.8.1@bincrafters/stable:6544f0f0f6291753e7374e254a551f227422ff9e - Build

Installing (downloading, building) binaries...
Downloading conan_sources.tgz completed [1.41k]                                      
Decompressing conan_sources.tgz completed [0.00k]                                    
gtest/1.8.1@bincrafters/stable: Configuring sources in /home/user/.conan/data/gtest/1.8.1/bincrafters/stable/source
Downloading release-1.8.1.tar.gz completed [969.04k]                                  

gtest/1.8.1@bincrafters/stable: Copying sources to build folder
gtest/1.8.1@bincrafters/stable: Building your package in /home/user/.conan/data/gtest/1.8.1/bincrafters/stable/build/6544f0f0f6291753e7374e254a551f227422ff9e
gtest/1.8.1@bincrafters/stable: Generator cmake created conanbuildinfo.cmake
gtest/1.8.1@bincrafters/stable: Calling build()
-- The C compiler identification is Clang 8.0.1
-- The CXX compiler identification is Clang 8.0.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: called by CMake conan helper
-- Conan: called inside local cache
-- Conan: Adjusting output directories
-- Conan: Using cmake global configuration
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Conan: Adjusting fPIC flag (ON)
-- Conan: Compiler Clang>=8, checking major version 8
-- Conan: Checking correct version: 8
-- Conan: C++ stdlib: libstdc++11
-- Found PythonInterp: /usr/local/bin/python3.7 (found version "3.7.8")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_EXPORT_NO_PACKAGE_REGISTRY


-- Build files have been written to: /home/user/.conan/data/gtest/1.8.1/bincrafters/stable/build/6544f0f0f6291753e7374e254a551f227422ff9e
Scanning dependencies of target gtest
[ 12%] Building CXX object source_subfolder/googlemock/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
In file included from /home/user/.conan/data/gtest/1.8.1/bincrafters/stable/build/6544f0f0f6291753e7374e254a551f227422ff9e/source_subfolder/googletest/src/gtest-all.cc:38:
/home/user/.conan/data/gtest/1.8.1/bincrafters/stable/build/6544f0f0f6291753e7374e254a551f227422ff9e/source_subfolder/googletest/include/gtest/gtest.h:55:10: fatal error: 'limits' file not found
#include <limits>
         ^~~~~~~~
1 error generated.
gmake[2]: *** [source_subfolder/googlemock/gtest/CMakeFiles/gtest.dir/build.make:83: source_subfolder/googlemock/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:238: source_subfolder/googlemock/gtest/CMakeFiles/gtest.dir/all] Error 2
gmake: *** [Makefile:150: all] Error 2
gtest/1.8.1@bincrafters/stable:
gtest/1.8.1@bincrafters/stable: ERROR: Package '6544f0f0f6291753e7374e254a551f227422ff9e' build failed
gtest/1.8.1@bincrafters/stable: WARN: Build folder /home/user/.conan/data/gtest/1.8.1/bincrafters/stable/build/6544f0f0f6291753e7374e254a551f227422ff9e
ERROR: gtest/1.8.1@bincrafters/stable: Error in build() method, line 63
    cmake.build()
    ConanException: Error 2 while executing cmake --build '/home/user/.conan/data/gtest/1.8.1/bincrafters/stable/build/6544f0f0f6291753e7374e254a551f227422ff9e' '--' '-j8'

What seems to be the problem? I also tried changing the compiler to libc++, and it compiles but then crashes when trying to run the tests.

Does it have something to do with the conan profile ?

Thanks in advance.
 
Back
Top