Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] CONFIG_LIBCXX doesn't work with cmake and GCC 14 #14403

Open
1 task done
raiden00pl opened this issue Oct 18, 2024 · 4 comments
Open
1 task done

[BUG] CONFIG_LIBCXX doesn't work with cmake and GCC 14 #14403

raiden00pl opened this issue Oct 18, 2024 · 4 comments
Labels
Arch: all Issues that apply to all architectures Area: Build system

Comments

@raiden00pl
Copy link
Contributor

raiden00pl commented Oct 18, 2024

Description / Steps to reproduce the issue

It's been broken for a long time but I don't see any issue about it.

cmake -B build -DBOARD_CONFIG=sim/libcxxtest -GNinja
cmake --build build
[872/1512] Building CXX object libs/libxx/CMakeFiles/libcxx.dir/libcxx/src/ios.instantiations.cpp.o
FAILED: libs/libxx/CMakeFiles/libcxx.dir/libcxx/src/ios.instantiations.cpp.o 
/usr/bin/g++ -DLIBCXX_BUILDING_LIBCXXABI -D_LIBCPP_BUILDING_LIBRARY -D__NuttX__ -I/home/raiden00/git/railab/dawn/external/nuttx/libs/libxx/libcxx/src -I/home/raiden00/git/railab/dawn/external/nuttx/build/include/libcxx -I/home/raiden00/git/railab/dawn/external/nuttx/libs/libxx/libcxxabi/include -isystem /home/raiden00/git/railab/dawn/external/nuttx/include -isystem /home/raiden00/git/railab/dawn/external/nuttx/build/include -std=gnu++20 -U_AIX -U_WIN32 -U__APPLE__ -U__FreeBSD__ -U__NetBSD__ -U__linux__ -U__sun__ -U__unix__ -U__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ -g -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-common -fvisibility=hidden -Wall -Wshadow -Wundef -Wno-attributes -Wno-unknown-pragmas -std=gnu++20 -nostdinc++ -D__GLIBCXX__ -D_LIBCPP_DISABLE_AVAILABILITY -fmacro-prefix-map=/home/raiden00/git/railab/dawn/external/nuttx= -fmacro-prefix-map=/home/raiden00/git/railab/dawn/external/apps= -fmacro-prefix-map=/home/raiden00/git/railab/dawn/external/nuttx/boards/sim/sim/sim= -fmacro-prefix-map=/home/raiden00/git/railab/dawn/external/nuttx/arch/sim/src/sim= -Wno-deprecated-declarations -Wno-shadow -Wno-sign-compare -MD -MT libs/libxx/CMakeFiles/libcxx.dir/libcxx/src/ios.instantiations.cpp.o -MF libs/libxx/CMakeFiles/libcxx.dir/libcxx/src/ios.instantiations.cpp.o.d -o libs/libxx/CMakeFiles/libcxx.dir/libcxx/src/ios.instantiations.cpp.o -c /home/raiden00/git/railab/dawn/external/nuttx/libs/libxx/libcxx/src/ios.instantiations.cpp
In file included from /home/raiden00/git/railab/dawn/external/nuttx/build/include/libcxx/__filesystem/filesystem_error.h:15,
                 from /home/raiden00/git/railab/dawn/external/nuttx/build/include/libcxx/__filesystem/directory_entry.h:20,
                 from /home/raiden00/git/railab/dawn/external/nuttx/build/include/libcxx/filesystem:539,
                 from /home/raiden00/git/railab/dawn/external/nuttx/build/include/libcxx/fstream:192,
                 from /home/raiden00/git/railab/dawn/external/nuttx/libs/libxx/libcxx/src/ios.instantiations.cpp:10:
/home/raiden00/git/railab/dawn/external/nuttx/build/include/libcxx/__filesystem/path.h: In instantiation of ‘std::__1::__fs::filesystem::path::_EnableIfPathable<_Source> std::__1::__fs::filesystem::path::append(const _Source&) [with _Source = std::__1::basic_string<char>]’:
/home/raiden00/git/railab/dawn/external/nuttx/build/include/libcxx/__filesystem/path.h:623:30: error: use of built-in trait ‘__remove_pointer(typename std::__1::decay<_Tp>::type)’ in function signature; use library traits instead
  623 |   _EnableIfPathable<_Source> append(const _Source& __src) {
      |                              ^~~~~~
[885/1512] Building CXX object libs/libxx/CMakeFiles/libcxx.dir/libcxx/src/locale.cpp.o
ninja: build stopped: subcommand failed.

This issue is specific to GCC 14.

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

Arch Linux

NuttX Version

master

Issue Architecture

[Arch: all]

Issue Area

[Area: Build System]

Verification

  • I have verified before submitting the report.
@github-actions github-actions bot added Arch: all Issues that apply to all architectures Area: Build system labels Oct 18, 2024
@xiaoxiang781216
Copy link
Contributor

@xuxin930 @cuiziwei1 please look at this issue.

@xuxin930
Copy link
Contributor

hi @raiden00pl what version of toolchain are you using?

@raiden00pl raiden00pl changed the title [BUG] CONFIG_LIBCXX doesn't work with cmake [BUG] CONFIG_LIBCXX doesn't work with cmake and GCC 14 Oct 20, 2024
@raiden00pl
Copy link
Contributor Author

I see now that I pasted the wrong error. The error above is for gcc 14, but there is something wrong also for arm gcc 13 (warnings, but no error). Please look at #14412
I modified this issue to make it clear that it is for gcc 14

@xuxin930
Copy link
Contributor

xuxin930 commented Oct 20, 2024

@raiden00pl thanks, I'll reproduce the issue and fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: all Issues that apply to all architectures Area: Build system
Projects
None yet
Development

No branches or pull requests

3 participants