https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: sci-libs/caffe2-1.12.0 fails to compile (CLANG-STRICTER-SYSTEM). Discovered on: amd64 (internal ref: clang-stricter_tinderbox) NOTE: (CLANG-STRICTER-SYSTEM) in the summary means that the bug was found on a machine that runs clang with stricter mode This machine uses clang with CFLAGS/CXXFLAGS=-Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-function-pointer-types See also: https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240 https://wiki.gentoo.org/wiki/Modern_C_porting
Created attachment 842977 [details] build.log.xz build log and emerge --info (compressed because it exceeds attachment limit, use 'xzless' to read it)
Error(s) that match a know pattern in addition to what has been reported in the summary: -- Could NOT find Numa (missing: Numa_INCLUDE_DIR Numa_LIBRARIES) -- Could not find CUDA with FP16 support, compiling without torch.CudaHalfTensor -- Could not find hardware support for NEON on this machine. FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/mkldnn/Pooling.cpp.o fatal: not a git repository (or any parent up to mount point /var/tmp) /var/tmp/portage/sci-libs/caffe2-1.12.0/work/pytorch-1.12.0/c10/util/Optional.h:522:13: error: builtin __has_trivial_copy is deprecated; use __is_trivially_copyable instead [-Werror,-Wdeprecated-builtins]
The code in c10/macros/Macros.h: #if defined(__GNUG__) && __GNUC__ < 5 #define C10_IS_TRIVIALLY_COPYABLE(T) __has_trivial_copy(T) #else #define C10_IS_TRIVIALLY_COPYABLE(T) std::is_trivially_copyable<T>::value #endif seems ok, it seems you are using a g++ compiler and that version is < 5. But from the log gcc is 12 and clang is 15 Dunno what to say
I believe Clang will define itself as GCC 4.something.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05b4eaf3a0b650d61c1ae0adbcc52a1717aa36d4 commit 05b4eaf3a0b650d61c1ae0adbcc52a1717aa36d4 Author: Alfredo Tupone <tupone@gentoo.org> AuthorDate: 2023-01-12 12:05:46 +0000 Commit: Alfredo Tupone <tupone@gentoo.org> CommitDate: 2023-01-12 12:08:10 +0000 sci-libs/caffe2: fix build with clang Closes: https://bugs.gentoo.org/886273 Signed-off-by: Alfredo Tupone <tupone@gentoo.org> sci-libs/caffe2/caffe2-1.12.0-r1.ebuild | 2 ++ sci-libs/caffe2/files/caffe2-1.12.0-clang.patch | 42 +++++++++++++++++++++++++ 2 files changed, 44 insertions(+)