Describe the bug


In file included from /usr/include/wchar.h:30:0,
                 from /usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.5.0/cwchar:44,
                 from /usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.5.0/bits/postypes.h:40,
                 from /usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.5.0/iosfwd:40,
                 from /usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.5.0/memory:72,
                 from /pytorch/pytorch/c10/core/Allocator.h:4,
                 from /pytorch/pytorch/c10/core/Allocator.cpp:1:
/usr/include/bits/floatn.h:87:9: error: ‘__float128’ does not name a type; did you mean ‘__cfloat128’?
 typedef __float128 _Float128;
         ^~~~~~~~~~
         __cfloat128
In file included from /usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.5.0/cwchar:44:0,
                 from /usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.5.0/bits/postypes.h:40,
                 from /usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.5.0/iosfwd:40,
                 from /usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/include/c++/7.5.0/memory:72,
                 from /pytorch/pytorch/c10/core/Allocator.h:4,
                 from /pytorch/pytorch/c10/core/Allocator.cpp:1:
/usr/include/wchar.h:406:8: error: ‘_Float128’ does not name a type; did you mean ‘_Float32x’?
 extern _Float128 wcstof128 (const wchar_t *__restrict __nptr,
        ^~~~~~~~~
        _Float32x
/usr/include/wchar.h:523:8: error: ‘_Float128’ does not name a type; did you mean ‘_Float32x’?
 extern _Float128 wcstof128_l (const wchar_t *__restrict __nptr,
        ^~~~~~~~~
        _Float32x

。。。。
/usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/stdlib.h:57:1: error: ‘__BEGIN_NAMESPACE_STD’ does not name a type; did you mean ‘__BEGIN_DECLS’?
 __BEGIN_NAMESPACE_STD
 ^~~~~~~~~~~~~~~~~~~~~
 __BEGIN_DECLS
/usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/stdlib.h:63:5: error: ‘div_t’ does not name a type; did you mean ‘pid_t’?
   } div_t;
     ^~~~~
     pid_t
/usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/stdlib.h:74:1: error: ‘__END_NAMESPACE_STD’ does not name a type; did you mean ‘ONNX_NAMESPACE’?
 __END_NAMESPACE_STD
 ^~~~~~~~~~~~~~~~~~~
 ONNX_NAMESPACE
/usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/stdlib.h:83:5: error: ‘lldiv_t’ does not name a type; did you mean ‘ldiv_t’?
   } lldiv_t;
     ^~~~~~~
     ldiv_t
/usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/stdlib.h:85:1: error: ‘__END_NAMESPACE_C99’ does not name a type; did you mean ‘ONNX_NAMESPACE’?
 __END_NAMESPACE_C99
 ^~~~~~~~~~~~~~~~~~~
 ONNX_NAMESPACE
/usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/stdlib.h:104:1: error: ‘__BEGIN_NAMESPACE_STD’ does not name a type; did you mean ‘__BEGIN_DECLS’?
 __BEGIN_NAMESPACE_STD
 ^~~~~~~~~~~~~~~~~~~~~
 __BEGIN_DECLS
/usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/stdlib.h:114:1: error: ‘__END_NAMESPACE_STD’ does not name a type; did you mean ‘ONNX_NAMESPACE’?
 __END_NAMESPACE_STD
 ^~~~~~~~~~~~~~~~~~~
 ONNX_NAMESPACE
/usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/stdlib.h:121:1: error: ‘__END_NAMESPACE_C99’ does not name a type; did you mean ‘ONNX_NAMESPACE’?
 __END_NAMESPACE_C99

Steps to reproduce

  1. cmake version is 3.16.3
  2. CMakeLists.txt is given by pytorch
  3. arm_linux_setup.cmake is wirted by myself
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)

set(tools /usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu)
set(CMAKE_C_COMPILER ${tools}/bin/aarch64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER ${tools}/bin/aarch64-linux-gnu-g++)

set(CMAKE_C_COMPILER_FORCED TRUE)
set(CMAKE_CXX_COMPILER_FORCED TRUE)

#set( CMAKE_FIND_ROOT_PATH "/sysrootlib/usr")

#set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )

#set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )

#set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
  1. cmake -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_TOOLCHAIN_FILE=/pytorch/pytorch/arm_linux_setup.cmake -DCMAKE_OSX_ARCHITECTURES=arm64 DCMAKE_OSX_DEPLOYMENT_TARGET=12.10 -DUSE_MKLDNN=OFF -DUSE_QNNPACK=OFF -DUSE_PYTORCH_QNNPACK=OFF -DBUILD_TEST=OFF -DUSE_NNPACK=OFF -DCMAKE_BUILD_TYPE:STRING=Release -DPYTHON_EXECUTABLE:PATH=which python3-DCMAKE_INSTALL_PREFIX:PATH=../pytorch-install-aarch64 ../pytorch

Expected behavior

it should be correct

Reproduction link

Not applicable

Screenshots

Not applicable

Operating System

No response

Browser version

No response

0

I'm not sure this is the correct location for this. Are you using compiler-explorer at some point ? If you want to report a bug in your linaro compiler or with any of the lib/framework involved above, you should open an issue in their respective tracker instead.

0

I'll close this, but feel free to reopen if I've misunderstood your report :)

0
© 2022 pullanswer.com - All rights reserved.