Hey guys, I built ROOT from source code about a half year ago, I’m trying to build root from source code in my new computer, but unfortunately some errors occur when doing “make”, and following are the errors:
In file included from /home/noctukkkrne/Downloads/root_src/net/rpdutils/src/rpdutils.cxx:29:
/usr/include/string.h:506:15: error: declaration of ‘size_t strlcpy(char*, const char*, size_t) noexcept’ has a different exception specifier
506 | extern size_t strlcpy (char *__restrict __dest,
| ^~~~~~~
In file included from /home/noctukkkrne/Downloads/root_src/net/rpdutils/src/rpdutils.cxx:23:
/home/noctukkkrne/Downloads/root_src/core/clib/inc/strlcpy.h:26:8: note: from previous declaration ‘size_t strlcpy(char*, const char*, size_t)’
26 | size_t strlcpy(char *dst, const char *src, size_t siz);
| ^~~~~~~
/usr/include/string.h:512:15: error: declaration of ‘size_t strlcat(char*, const char*, size_t) noexcept’ has a different exception specifier
512 | extern size_t strlcat (char *__restrict __dest,
| ^~~~~~~
/home/noctukkkrne/Downloads/root_src/core/clib/inc/strlcpy.h:27:8: note: from previous declaration ‘size_t strlcat(char*, const char*, size_t)’
27 | size_t strlcat(char *dst, const char *src, size_t siz);
| ^~~~~~~
make[2]: *** [net/rpdutils/CMakeFiles/rpdutil.dir/build.make:132: net/rpdutils/CMakeFiles/rpdutil.dir/src/rpdutils.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:37333: net/rpdutils/CMakeFiles/rpdutil.dir/all] Error 2
It seems like the declaration of some functions in ROOT have different exception specifiers. I thought that could be caused by the unsuitable version of C++, and I tried some different version of ROOT and C++, but it didn’t work either. I wonder how to fix it.
ROOT Version: 6.28.04
Platform: Arch linux
Compiler: gcc (GCC) 13.2.1 20230801; g++ (GCC) 13.2.1 20230801