You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to compile this library using clang-11. The runtime version builds without any issues however the debug build fails with the following error:
[ 36%] Building CXX object libuavcan/CMakeFiles/libuavcan_test.dir/test/marshal/integer_spec.cpp.o
[ 37%] Building CXX object libuavcan/CMakeFiles/libuavcan_test_optim.dir/test/dsdl_test/dsdl_const_2.cpp.o
1 warning generated.
[ 38%] Building CXX object libuavcan/CMakeFiles/libuavcan_test.dir/test/marshal/scalar_codec.cpp.o
[ 38%] Building CXX object libuavcan/CMakeFiles/libuavcan_test.dir/test/marshal/type_util.cpp.o
/home/raj/dasa_cheri/libuavcan/libuavcan/test/marshal/array.cpp:353:20: error: use of overloaded operator '==' is ambiguous (with operand types 'A' (aka 'Array<IntegerSpec<1, SignednessUnsigned, CastModeSaturate>, ArrayModeDynamic, 5>') and 'B' (aka 'Array<IntegerSpec<8, SignednessSigned, CastModeSaturate>, ArrayModeDynamic, 255>'))
ASSERT_FALSE(a == b);
~ ^ ~
/home/raj/dasa_cheri/libuavcan/build/googletest-src/googletest/include/gtest/gtest.h:1905:25: note: expanded from macro 'ASSERT_FALSE'
GTEST_TEST_BOOLEAN_(!(condition), #condition, true, false, \
^~~~~~~~~
/home/raj/dasa_cheri/libuavcan/build/googletest-src/googletest/include/gtest/internal/gtest-internal.h:1229:34: note: expanded from macro 'GTEST_TEST_BOOLEAN_'
::testing::AssertionResult(expression)) \
^~~~~~~~~~
/home/raj/dasa_cheri/libuavcan/./libuavcan/include/uavcan/marshal/array.hpp:766:5: note: candidate function [with R = uavcan::Array<uavcan::IntegerSpec<8, uavcan::SignednessSigned, uavcan::CastModeSaturate>, uavcan::ArrayModeDynamic, 255>]
operator==(const R& rhs) const
^
/home/raj/dasa_cheri/libuavcan/./libuavcan/include/uavcan/marshal/array.hpp:1101:1: note: candidate function [with R = uavcan::Array<uavcan::IntegerSpec<1, uavcan::SignednessUnsigned, uavcan::CastModeSaturate>, uavcan::ArrayModeDynamic, 5>, T = uavcan::IntegerSpec<8, uavcan::SignednessSigned, uavcan::CastModeSaturate>, ArrayMode = uavcan::ArrayModeDynamic, MaxSize = 255]
operator==(const R& rhs, const Array<T, ArrayMode, MaxSize>& lhs)
The commands used to build the library:
git clone https://github.com/DroneCAN/libuavcan
cd libuavcan
git submodule update --init
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER="clang-11" -DCMAKE_CXX_COMPILER="clang++-11"
make -j8
Output of cmake:
-- The C compiler identification is Clang 11.1.0
-- The CXX compiler identification is Clang 11.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang-11 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++-11 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/raj/dasa_cheri/libuavcan/build/googletest-download
[ 11%] Creating directories for 'googletest'
[ 22%] Performing download step (git clone) for 'googletest'
Cloning into 'googletest-src'...
HEAD is now at ba96d0b1 Merge pull request #1622 from rohanjoyce/bazel_test_filter
[ 33%] Performing update step for 'googletest'
[ 44%] No patch step for 'googletest'
[ 55%] No configure step for 'googletest'
[ 66%] No build step for 'googletest'
[ 77%] No install step for 'googletest'
[ 88%] No test step for 'googletest'
[100%] Completed 'googletest'
[100%] Built target googletest
CMake Deprecation Warning at build/googletest-src/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
-- Found PythonInterp: /usr/bin/python (found version "2.7.17")
-- 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
-- Debug build
-- Using Compiler ID: Clang
-- Using C++11
-- Debug build (note: requires gtest)
-- GTest found, tests will be built and run.
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/raj/dasa_cheri/libuavcan/build
Hi,
We are trying to compile this library using clang-11. The runtime version builds without any issues however the debug build fails with the following error:
The commands used to build the library:
Output of cmake:
Compiler info:
Operating system info:
The text was updated successfully, but these errors were encountered: