Barto22 opened a new issue, #16775: URL: https://github.com/apache/nuttx/issues/16775
### Description / Steps to reproduce the issue I created a simple C++ application using C++20 features and wanted to use the C++ library from the ARM toolchain. I’m using the latest ARM toolchain version 14.3.1. The target platform is STM32F4Discovery, with the build configuration set to testlibcxx. In menuconfig, I changed the C++ Library option to "Toolchain C++ support" because the LLVM C++ library produced some errors (which I’ll address as a separate issue). When compiling, I encounter the following errors: In file included from ../Documents/arm-gnu-toolchain/arm-none-eabi/include/c++/14.3.1/cstdlib:79, from ../Documents/arm-gnu-toolchain/arm-none-eabi/include/c++/14.3.1/ext/string_conversions.h:43, from ../Documents/arm-gnu-toolchain/arm-none-eabi/include/c++/14.3.1/bits/basic_string.h:4154, from ../Documents/arm-gnu-toolchain/arm-none-eabi/include/c++/14.3.1/string:54, from ../Documents/arm-gnu-toolchain/arm-none-eabi/include/c++/14.3.1/bits/locale_classes.h:40, from ../Documents/arm-gnu-toolchain/arm-none-eabi/include/c++/14.3.1/locale:41, from ../Documents/arm-gnu-toolchain/arm-none-eabi/include/c++/14.3.1/format:47, from ../Documents/nuttx/nuttx-apps/external/main.cpp:3: ../Documents/arm-gnu-toolchain/arm-none-eabi/include/stdlib.h:39:3: error: conflicting declaration 'typedef struct div_t div_t' 39 | } div_t; | ^~~~~ In file included from ../Documents/nuttx/nuttx/include/nuttx/kmalloc.h:34, from ../Documents/nuttx/nuttx/include/nuttx/lib/lib.h:32, from ../Documents/nuttx/nuttx/include/stdio.h:37, from ../Documents/nuttx/nuttx/include/wchar.h:37, from ../Documents/arm-gnu-toolchain/arm-none-eabi/include/c++/14.3.1/cwchar:44, from ../Documents/arm-gnu-toolchain/arm-none-eabi/include/c++/14.3.1/bits/postypes.h:40, from ../Documents/arm-gnu-toolchain/arm-none-eabi/include/c++/14.3.1/iosfwd:42, from ../Documents/arm-gnu-toolchain/arm-none-eabi/include/c++/14.3.1/bits/localefwd.h:41, from ../Documents/arm-gnu-toolchain/arm-none-eabi/include/c++/14.3.1/locale:40: ../Documents/nuttx/nuttx/include/stdlib.h:98:22: note: previous declaration as 'typedef struct div_s div_t' 98 | typedef struct div_s div_t; | ^~~~~ ../Documents/arm-gnu-toolchain/arm-none-eabi/include/stdlib.h:45:3: error: conflicting declaration 'typedef struct ldiv_t ldiv_t' 45 | } ldiv_t; | ^~~~~~ ../Documents/nuttx/nuttx/include/stdlib.h:108:23: note: previous declaration as 'typedef struct ldiv_s ldiv_t' 108 | typedef struct ldiv_s ldiv_t; | ^~~~~~ ../Documents/arm-gnu-toolchain/arm-none-eabi/include/stdlib.h:52:3: error: conflicting declaration 'typedef struct lldiv_t lldiv_t' 52 | } lldiv_t; | ^~~~~~~ ../Documents/nuttx/nuttx/include/stdlib.h:118:24: note: previous declaration as 'typedef struct lldiv_s lldiv_t' 118 | typedef struct lldiv_s lldiv_t; | ^~~~~~~ ../Documents/arm-gnu-toolchain/arm-none-eabi/include/stdlib.h:205:9: error: conflicting declaration of C function 'int putenv(char*)' 205 | int putenv (char *__string); | ^~~~~~ ../Documents/nuttx/nuttx/include/stdlib.h:162:11: note: previous declaration 'int putenv(const char*)' 162 | int putenv(FAR const char *string); | ^~~~~~ ninja: build stopped: subcommand failed. I am building the project with CMake. ### On which OS does this issue occur? [OS: Linux] ### What is the version of your OS? Ubuntu 24.04.2 LTS ### NuttX Version master ### Issue Architecture [Arch: all] ### Issue Area [Area: Build System] ### Host information _No response_ ### Verification - [x] I have verified before submitting the report. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org