-
-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation error - clang - Ubuntu 20.04 #1509
Comments
I have done a fresh checkout from master |
Can you please double check? I ask you that because the beginning of the error message /home/sumit/srcs/DGtal/src/DGtal/io/colormaps/GradientColorMap.ih:227:32: error: no viable conversion from
'__wrap_iter<std::__1::vector<DGtal::Color, std::__1::allocator<DGtal::Color>>::const_pointer>' to
'__wrap_iter<std::__1::vector<DGtal::Color, std::__1::allocator<DGtal::Color>>::pointer>'
std::vector<Color>::iterator it = myColors.begin(); doesn't match the current state of this file: std::vector<Color>::const_iterator it = myColors.begin(); About your specifications, did you mean Clang-10 or do you used the still-in-development version 11 of Clang? I will take a look at your another error later! |
@rolanddenis I am building everything with -std=c++17 -stdlib=libc++. And |
I have a feeling that DGtal (tests) are not configured for c++17 (stdlib=libc++) ? |
👍
Yes, you're right: https://en.cppreference.com/w/cpp/algorithm/random_shuffle
It works for me with ITK 4.12. I will try with 5.2 later but I think this check can be safely removed now (added in 2012...)
Yes, this issue has already been submited in #1437 and fixed in #1475 . The faulty line listed in your error message (last line) doesn't match the current master state that is: const DTL2::Value maxv2 = * (boost::first_max_element(dtL2.constRange().begin(), dtL2.constRange().end())); Did you check that you really are on master branch and up to date?
Yes, you're right, I think it works great in C++14 but it has not been yet tested in newer version of the standard... |
The error with Catch is also fixed in master since #1419, so you shouldn't get this error with the master of DGtal. |
BTW, beside some issues (with ITK, with detection of components of CGAL -- see #1136# --, and a small fix in |
/home/sumit/srcs/DGtal/src/DGtal/io/colormaps/GradientColorMap.ih:227:32: error: no viable conversion from '__wrap_iter<std::__1::vector<DGtal::Color, std::__1::allocator<DGtal::Color>>::const_pointer>' to '__wrap_iter<std::__1::vector<DGtal::Color, std::__1::allocator<DGtal::Color>>::pointer>' std::vector<Color>::iterator it = myColors.begin(); ^ ~~~~~~~~~~~~~~~~ /usr/lib/llvm-11/bin/../include/c++/v1/iterator:1404:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::__1::vector<DGtal::Color, std::__1::allocator<DGtal::Color>>::const_iterator' (aka '__wrap_iter<const DGtal::Color *>') to 'const std::__1::__wrap_iter<DGtal::Color *> &' for 1st argument class __wrap_iter ^ /usr/lib/llvm-11/bin/../include/c++/v1/iterator:1404:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::__1::vector<DGtal::Color, std::__1::allocator<DGtal::Color>>::const_iterator' (aka '__wrap_iter<const DGtal::Color *>') to 'std::__1::__wrap_iter<DGtal::Color *> &&' for 1st argument /usr/lib/llvm-11/bin/../include/c++/v1/iterator:1529:60: note: candidate constructor not viable: no known conversion from 'std::__1::vector<DGtal::Color, std::__1::allocator<DGtal::Color>>::const_iterator' (aka '__wrap_iter<const DGtal::Color *>') to 'std::__1::__wrap_iter<DGtal::Color *>::iterator_type' (aka 'DGtal::Color *') for 1st argument _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_IF_NODEBUG __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {} ^ /usr/lib/llvm-11/bin/../include/c++/v1/iterator:1426:9: note: candidate template ignored: requirement 'is_convertible<const DGtal::Color *, DGtal::Color *>::value' was not satisfied [with _Up = const DGtal::Color *] __wrap_iter(const __wrap_iter<_Up>& __u,
OS: UBuntu 20.04
Compiler Clang-11
STDLIB=libc++
/usr/bin/ld: examples/geometry/curves/CMakeFiles/freemanChainDisplay.dir/freemanChainDisplay.cpp.o: in function
DGtal::MagickReader<DGtal::ImageContainerBySTLVector<DGtal::HyperRectDomain<DGtal::SpaceND<2u, int> >, unsigned char>, DGtal::functors::MagickCast >::importImage(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, DGtal::functors::MagickCast const&, bool)':freemanChainDisplay.cpp:(.text._ZN5DGtal12MagickReaderINS_25ImageContainerBySTLVectorINS_15HyperRectDomainINS_7SpaceNDILj2EiEEEEhEENS_8functors10MagickCastIhEEE11importImageERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKS9_b[_ZN5DGtal12MagickReaderINS_25ImageContainerBySTLVectorINS_15HyperRectDomainINS_7SpaceNDILj2EiEEEEhEENS_8functors10MagickCastIhEEE11importImageERKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEERKS9_b]+0x42): undefined reference to
Magick::Image::read(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)' clang: error: linker command failed with exit code 1 (use -v to see invocation)
The text was updated successfully, but these errors were encountered: