Please note: We are aware of an issue affecting replies on the Arm Community forums, which may not be loading as expected.

We apologize for any inconvenience and appreciate your patience while we investigate and work to resolve the issue.

Thank you for your understanding.


This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

sys path headers are missing in IDE

I wasn't able to include the <sys/stat.h> in the IDE , i was able to override this error by adding the "/usr/include" and $PATH variables under the " project->properties-->path and symbols-> add " , but it lead to other miscellaneous errors as below ,  How to add system header files under this environment 

3:46:14 **** Build of configuration Default for project sve_array_sum ****
make all
Building file: ../iohelper.cpp
Invoking: Arm C Compiler 6
armclang --target=aarch64-arm-none-eabi -march=armv8-a+crypto+sve -fvectorize -I"/opt/arm/developmentstudio-2022.2/sw/../sw/ARMCompiler6.19/bin /opt/arm/developmentstudio-2022.2/sw/../bin /opt/arm/developmentstudio-2022.2/bin /opt/arm/developmentstudio-2022.2/sw/java/bin /sbin /bin /usr/bin /usr/local/bin /snap/bin /opt/mellanox/doca/tools/ /opt/mellanox/grpc/bin /opt/mellanox/doca/tools/ /opt/mellanox/grpc/bin" -I/usr/include/ -O1 -g -fno-inline-functions -msve-vector-bits=512 -MD -MP -c -o "iohelper.o" "../iohelper.cpp"
armclang: warning: Your license for feature ds_suite_eval will expire in 14 days [-Wlicense-management]
armclang: warning: Your license for feature ds_compiler_eval20222 will expire in 14 days [-Wlicense-management]
In file included from ../iohelper.cpp:1:
In file included from ../iohelper.h:9:
In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/algorithm:1709:
In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__debug:15:
/opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/cstddef:46:5: error: <cstddef> tried including <stddef.h> but didn't find libc++'s <stddef.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.
# error <cstddef> tried including <stddef.h> but didn't find libc++'s <stddef.h> header. \
^
/opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/cstddef:59:9: error: no member named 'nullptr_t' in the global namespace
using ::nullptr_t;

full logs are attached 

  • 3:46:14 **** Build of configuration Default for project sve_array_sum ****
    make all
    Building file: ../iohelper.cpp
    Invoking: Arm C Compiler 6
    armclang --target=aarch64-arm-none-eabi -march=armv8-a+crypto+sve -fvectorize -I"/opt/arm/developmentstudio-2022.2/sw/../sw/ARMCompiler6.19/bin /opt/arm/developmentstudio-2022.2/sw/../bin /opt/arm/developmentstudio-2022.2/bin /opt/arm/developmentstudio-2022.2/sw/java/bin /sbin /bin /usr/bin /usr/local/bin /snap/bin /opt/mellanox/doca/tools/ /opt/mellanox/grpc/bin /opt/mellanox/doca/tools/ /opt/mellanox/grpc/bin" -I/usr/include/ -O1 -g -fno-inline-functions -msve-vector-bits=512 -MD -MP -c -o "iohelper.o" "../iohelper.cpp"
    armclang: warning: Your license for feature ds_suite_eval will expire in 14 days [-Wlicense-management]
    armclang: warning: Your license for feature ds_compiler_eval20222 will expire in 14 days [-Wlicense-management]
    In file included from ../iohelper.cpp:1:
    In file included from ../iohelper.h:9:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/algorithm:1709:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__debug:15:
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/cstddef:46:5: error: <cstddef> tried including <stddef.h> but didn't find libc++'s <stddef.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.
    # error <cstddef> tried including <stddef.h> but didn't find libc++'s <stddef.h> header. \
    ^
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/cstddef:59:9: error: no member named 'nullptr_t' in the global namespace
    using ::nullptr_t;
    ~~^
    In file included from ../iohelper.cpp:1:
    In file included from ../iohelper.h:9:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/algorithm:1709:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__debug:16:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/type_traits:456:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__type_traits/is_compound.h:14:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__type_traits/is_fundamental.h:14:
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__type_traits/is_null_pointer.h:24:49: error: use of undeclared identifier 'nullptr_t'; did you mean 'nullptr'?
    template <> struct __is_nullptr_t_impl<nullptr_t> : public true_type {};
    ^
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__type_traits/is_null_pointer.h:24:49: error: template argument for template type parameter must be a type
    template <> struct __is_nullptr_t_impl<nullptr_t> : public true_type {};
    ^~~~~~~~~
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__type_traits/is_null_pointer.h:23:17: note: template parameter is declared here
    template <class _Tp> struct __is_nullptr_t_impl : public false_type {};
    ^
    In file included from ../iohelper.cpp:1:
    In file included from ../iohelper.h:9:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/algorithm:1709:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__debug:16:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/type_traits:537:
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/cstdint:149:5: error: <cstdint> tried including <stdint.h> but didn't find libc++'s <stdint.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.
    # error <cstdint> tried including <stdint.h> but didn't find libc++'s <stdint.h> header. \
    ^
    In file included from ../iohelper.cpp:1:
    In file included from ../iohelper.h:9:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/algorithm:1711:
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/cstring:65:5: error: <cstring> tried including <string.h> but didn't find libc++'s <string.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.
    # error <cstring> tried including <string.h> but didn't find libc++'s <string.h> header. \
    ^
    In file included from ../iohelper.cpp:1:
    In file included from ../iohelper.h:9:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/algorithm:1715:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__algorithm/adjacent_find.h:14:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__algorithm/iterator_operations.h:15:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__iterator/advance.h:20:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__utility/unreachable.h:13:
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/cstdlib:90:5: error: <cstdlib> tried including <stdlib.h> but didn't find libc++'s <stdlib.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.
    # error <cstdlib> tried including <stdlib.h> but didn't find libc++'s <stdlib.h> header. \
    ^
    In file included from ../iohelper.cpp:1:
    In file included from ../iohelper.h:9:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/algorithm:1749:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__algorithm/inplace_merge.h:27:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__memory/temporary_buffer.h:17:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/new:95:
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/exception:193:45: error: field has incomplete type 'exception_ptr'
    _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
    ^
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/exception:188:24: note: definition of 'std::exception_ptr' is not complete until the closing '}'
    class _LIBCPP_TYPE_VIS exception_ptr
    ^
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/exception:193:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces
    _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
    ^
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__config:692:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'
    # define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
    ^
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__config:676:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
    __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_VERSIONED_IDENTIFIER))))
    ^
    In file included from ../iohelper.cpp:1:
    In file included from ../iohelper.h:9:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/algorithm:1749:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__algorithm/inplace_merge.h:27:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__memory/temporary_buffer.h:17:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/new:95:
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/exception:193:55: error: expected ';' at end of declaration list
    _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
    ^
    In file included from ../iohelper.cpp:1:
    In file included from ../iohelper.h:9:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/algorithm:1749:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__algorithm/inplace_merge.h:27:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__memory/temporary_buffer.h:17:
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/new:123:12: error: unknown type name '_ARMABI'
    extern "C" _ARMABI int posix_memalign(void**, size_t, size_t);
    ^
    In file included from ../iohelper.cpp:1:
    In file included from ../iohelper.h:9:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/algorithm:1749:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__algorithm/inplace_merge.h:28:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__memory/unique_ptr.h:21:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__memory/compressed_pair.h:17:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/tuple:224:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/compare:145:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__compare/compare_partial_order_fallback.h:13:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__compare/partial_order.h:14:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__compare/weak_order.h:14:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__compare/strong_order.h:18:
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/cmath:316:5: error: <cmath> tried including <math.h> but didn't find libc++'s <math.h> header. This usually means that your header search paths are not configured properly. The header search paths should contain the C++ Standard Library headers before any C Standard Library, and you are probably using compiler flags that make that not be the case.
    # error <cmath> tried including <math.h> but didn't find libc++'s <math.h> header. \
    ^
    In file included from ../iohelper.cpp:1:
    In file included from ../iohelper.h:9:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/algorithm:1749:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__algorithm/inplace_merge.h:28:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__memory/unique_ptr.h:21:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__memory/compressed_pair.h:17:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/tuple:1823:
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/typeinfo:249:14: error: cast from pointer to smaller type '__type_name_t' (aka 'unsigned int') loses information
    return reinterpret_cast<__type_name_t>(__v);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from ../iohelper.cpp:1:
    In file included from ../iohelper.h:9:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/algorithm:1749:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__algorithm/inplace_merge.h:28:
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__memory/unique_ptr.h:172:3: error: non-static data member cannot be constexpr; did you intend to make it const?
    _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
    ^
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__config:457:31: note: expanded from macro '_LIBCPP_CONSTEXPR'
    # define _LIBCPP_CONSTEXPR constexpr
    ^
    In file included from ../iohelper.cpp:1:
    In file included from ../iohelper.h:9:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/algorithm:1749:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__algorithm/inplace_merge.h:28:
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__memory/unique_ptr.h:172:32: error: member 'nullptr_t' declared as a template
    _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
    ^
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__memory/unique_ptr.h:172:42: error: expected ';' at end of declaration list
    _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
    ^
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__memory/unique_ptr.h:249:81: error: unknown type name 'nullptr_t'
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 unique_ptr& operator=(nullptr_t) _NOEXCEPT {
    ^
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__memory/unique_ptr.h:370:3: error: non-static data member cannot be constexpr; did you intend to make it const?
    _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
    ^
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__config:457:31: note: expanded from macro '_LIBCPP_CONSTEXPR'
    # define _LIBCPP_CONSTEXPR constexpr
    ^
    In file included from ../iohelper.cpp:1:
    In file included from ../iohelper.h:9:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/algorithm:1749:
    In file included from /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__algorithm/inplace_merge.h:28:
    /opt/arm/developmentstudio-2022.2/sw/ARMCompiler6.19/bin/../include/libcxx/__memory/unique_ptr.h:370:32: error: member 'nullptr_t' declared as a template
    _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
    ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    make: *** [subdir.mk:26: iohelper.o] Error 1
    "make all" terminated with exit code 2. Build might be incomplete.

    13:46:15 Build Failed. 21 errors, 2 warnings. (took 764ms)

  • Hi there, I have moved your question the Arm Development Studio forum. Many thanks.

  • Hi Thanujvashan

    My name is Stephen and I work at Arm.

    Arm Compiler 6.19 (as provided in Arm DS 2022.2) is a C/C++ compiler intended for bare-metal and embedded applications.

    By contrast, <sys/stat.h> is POSIX.  Arm Compiler 6.19 does not provide sys/stat.h, which explains why your build is failing.

    Are you trying to build a Linux application?  If so, you need to use GCC rather than Arm Compiler 6.

    You can download GCC for AArch64 GNU/Linux target (aarch64-none-linux-gnu) and other variants from https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads

    Hope this helps,

    Stephen

  • Thanks for the answer , currently am working on baremetal applications over Neoverse N2 model , Could you confirm me if  these headers will be working in linux application over N2 FVP models

  • Yes, GCC 12.2.Rel1 for AArch64 GNU/Linux target (aarch64-none-linux-gnu) contains <sys/stat.h>.

    You can download it from https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads

    Stephen