Open
Description
I am seeing the following trying to build on Fedora 38 ppc64;e and s390x. I do not have this problem on x86_64 or aarch64.
I believe it is coming from the change in behavior to Wimplicit-function-declaration
.
https://www.redhat.com/en/blog/new-warnings-and-errors-clang-16
[ 11%] Building C object confu-deps/cpuinfo/CMakeFiles/cpuinfo.dir/src/api.c.o
cd /builddir/build/BUILD/pytorch-v2.0.1.gitf81f9093/redhat-linux-build/confu-deps/cpuinfo && /usr/bin/clang -DCPUINFO_LOG_LEVEL=2 -I/builddir/build/BUILD/pytorch-v2.0.1.gitf81f9093/third_party/cpuinfo/src -I/builddir/build/BUILD/pytorch-v2.0.1.gitf81f9093/third_party/cpuinfo/include -I/builddir/build/BUILD/pytorch-v2.0.1.gitf81f9093/third_party/cpuinfo/deps/clog/include -O2 -flto=thin -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS --config /usr/lib/rpm/redhat/redhat-hardened-clang.cfg -fstack-protector-strong -m64 -march=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection -DNDEBUG -std=c99 -fPIC -MD -MT confu-deps/cpuinfo/CMakeFiles/cpuinfo.dir/src/api.c.o -MF CMakeFiles/cpuinfo.dir/src/api.c.o.d -o CMakeFiles/cpuinfo.dir/src/api.c.o -c /builddir/build/BUILD/pytorch-v2.0.1.gitf81f9093/third_party/cpuinfo/src/api.c
/builddir/build/BUILD/pytorch-v2.0.1.gitf81f9093/third_party/cpuinfo/src/api.c:319:23: error: call to undeclared function 'syscall'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
if CPUINFO_UNLIKELY(syscall(__NR_getcpu, &cpu, NULL, NULL) != 0) {
^
/builddir/build/BUILD/pytorch-v2.0.1.gitf81f9093/third_party/cpuinfo/src/api.c:338:23: error: call to undeclared function 'syscall'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
if CPUINFO_UNLIKELY(syscall(__NR_getcpu, &cpu, NULL, NULL) != 0) {
^
2 errors generated.
A full build log can be found here:
https://download.copr.fedorainfracloud.org/results/jmontleon/pytorch/fedora-38-s390x/06239794-pytorch/builder-live.log.gz