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

libc/libcxx: fix failures with GCC 14 #15865

Merged
merged 1 commit into from
Feb 20, 2025
Merged

Conversation

anchao
Copy link
Contributor

@anchao anchao commented Feb 19, 2025

Summary

libc/libcxx: fix failures with GCC 14

CXX:  libcxx/libcxx/src/random.cpp In file included from nuttx/include/libcxx/__filesystem/filesystem_error.h:15,
                 from nuttx/include/libcxx/__filesystem/directory_entry.h:20,
                 from nuttx/include/libcxx/filesystem:539,
                 from nuttx/include/libcxx/fstream:192,
                 from libcxx/libcxx/src/ios.instantiations.cpp:10:
nuttx/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>]':
nuttx/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) {
      |                              ^~~~~~

Pick the change from llvm-project:

llvm/llvm-project#92663

Signed-off-by: chao an anchao.archer@bytedance.com

Impact

N/A

Testing

libcxx with GCC-14

@github-actions github-actions bot added Area: OS Components OS Components issues Size: S The size of the change in this PR is small labels Feb 19, 2025
CXX:  libcxx/libcxx/src/random.cpp In file included from nuttx/include/libcxx/__filesystem/filesystem_error.h:15,
                 from nuttx/include/libcxx/__filesystem/directory_entry.h:20,
                 from nuttx/include/libcxx/filesystem:539,
                 from nuttx/include/libcxx/fstream:192,
                 from libcxx/libcxx/src/ios.instantiations.cpp:10:
nuttx/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>]':
nuttx/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) {
      |                              ^~~~~~

Pick the change from llvm-project:

llvm/llvm-project#92663

Signed-off-by: chao an <anchao.archer@bytedance.com>
@nuttxpr
Copy link

nuttxpr commented Feb 19, 2025

[Experimental Bot, please feedback here]

Yes, this PR appears to meet the NuttX requirements, although it could be slightly improved.

Strengths:

  • Clear Summary: The summary explains the "why" (GCC 14 compatibility), the "what" (fixing libcxx), and the "how" (picking a change from llvm-project). The error message provides further context.
  • Upstream Reference: Linking to the llvm-project PR is crucial for reviewers and demonstrates the source of the fix.
  • Testing Information: The testing section indicates the relevant compiler and library, which is helpful.

Areas for Improvement:

  • Expand on Impact: While "N/A" is used for Impact, it's generally better to explicitly state "NO" for each impact category if there truly is no impact. This removes ambiguity. For example:
    • Impact on user: NO
    • Impact on build: NO (except that it will now build with GCC 14) - This slight clarification is helpful.
    • ...etc...
  • More Detailed Testing Logs: While the PR mentions testing with GCC-14 and libcxx, actual log output showing the before/after behavior is missing. Ideally, the logs would demonstrate the build failure before the patch and the successful build after the patch. Even a simple "build succeeded" message is better than nothing. This provides concrete evidence that the fix works as intended.

Overall:

Despite the minor suggestions for improvement, this PR generally meets the requirements. The clarity of the summary and the inclusion of the upstream reference are particularly positive. Providing more explicit "NO" answers for the impact assessment and including actual test logs would strengthen the PR further.

@raiden00pl raiden00pl merged commit ff1dc95 into apache:master Feb 20, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: OS Components OS Components issues Size: S The size of the change in this PR is small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants