[BUILD] AOCC 4.2 build failure
1div0 opened this issue · comments
https://www.amd.com/en/developer/aocc.html is unable to build the latest code from master with the following failure.
[ 59%] Building CXX object src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/__/gif.imageio/gifinput.cpp.o
In file included from /usr/src/github.com/1div0/OpenImageIO/src/gif.imageio/gifinput.cpp:11:
In file included from /usr/src/github.com/1div0/OpenImageIO/src/include/OpenImageIO/filesystem.h:24:
In file included from /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/fstream:38:
In file included from /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/istream:38:
In file included from /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/ios:42:
In file included from /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/ios_base.h:41:
In file included from /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/locale_classes.h:40:
In file included from /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/string:53:
In file included from /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/basic_string.h:3960:
In file included from /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/ext/string_conversions.h:41:
In file included from /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/cstdlib:75:
/usr/include/stdlib.h:558:14: error: exception specification in declaration does not match previous declaration
extern void *reallocarray (void *__ptr, size_t nmemb, size_t size)
^
/usr/include/gif_lib.h:248:1: note: previous declaration is here
reallocarray(void *optr, size_t nmemb, size_t size);
^
[ 60%] Building CXX object src/libOpenImageIO/CMakeFiles/OpenImageIO.dir//gif.imageio/gifoutput.cpp.o
1 error generated.
make[2]: *** [src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/build.make:972: src/libOpenImageIO/CMakeFiles/OpenImageIO.dir//gif.imageio/gifinput.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:2306: src/libOpenImageIO/CMakeFiles/OpenImageIO.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
/usr/include/gif_lib.h
extern void *
reallocarray(void *optr, size_t nmemb, size_t size);
/usr/include/stdlib.h
#ifdef __USE_GNU
/* Re-allocate the previously allocated block in PTR, making the new
block large enough for NMEMB elements of SIZE bytes each. /
/ attribute_malloc is not used, because if reallocarray returns
the same pointer that was passed to it, aliasing needs to be allowed
between objects pointed by the old and new pointers. */
extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
__THROW attribute_warn_unused_result;
#endif
CC=/opt/AMD/aocc-compiler-4.2.0/bin/clang CXX=/opt/AMD/aocc-compiler-4.2.0/bin/clang++ ccmake ../../../..
Rocky Linux 8.9 (Green Obsidian)
GNU C/C++ compiler builds the same w/o complaining.
Compiled the GIF library from the https://sourceforge.net/p/giflib/code/ci/master/tree/ and build finished as there is no mention of the extern void *reallocarray(void *optr, size_t nmemb, size_t size) anymore. So no conflict.
Clearly the problem in the old giflib-devel-5.1.4-3.el8.x86_64.
As usual. Closing.