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

Conflicts between system and libc++ headers #731

Closed
alandefreitas opened this issue Nov 18, 2024 · 0 comments · Fixed by #768
Closed

Conflicts between system and libc++ headers #731

alandefreitas opened this issue Nov 18, 2024 · 0 comments · Fixed by #768
Assignees

Comments

@alandefreitas
Copy link
Collaborator

This error happened in https://github.com/cppalliance/ws_proto/actions/runs/11892602095/job/33135815935?pr=3#step:10:434

In file included from D:\a\ws_proto\ws_proto\boost-root\libs\url\extra\test_main.cpp:25:
In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\crtdbg.h:13:
In file included from C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\include\vcruntime_new_debug.h:10:
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\include\vcruntime_new.h:27:33: error: redefinition of 'align_val_t'
   27 |     _VCRT_EXPORT_STD enum class align_val_t : size_t {};
      |                                 ^
C:\Users\runneradmin\AppData\Roaming\antora\Caches\reference-collector\mrdocs\win32\develop\share\mrdocs\libcxx\new:181:12: note: previous definition is here
  181 | enum class align_val_t : size_t {};
      |            ^
In file included from D:\a\ws_proto\ws_proto\boost-root\libs\url\extra\test_main.cpp:25:
In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt\crtdbg.h:13:
In file included from C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34[433](https://github.com/cppalliance/ws_proto/actions/runs/11892602095/job/33135815935?pr=3#step:10:434)\include\vcruntime_new_debug.h:10:
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.42.34433\include\vcruntime_new.h:35:33: error: redefinition of 'nothrow_t'
   35 |         _VCRT_EXPORT_STD struct nothrow_t {
      |                                 ^

It seems like the bundled Libc++ headers are included because system-includes is false, but the system headers are also included because they're in the compile_commands.json file and are not being removed. This leads to redefinition errors.

Although I'm not completely sure this is what's causing the issue because these different headers would still need to be included in the code and the error doesn't show a stacktrace of includes.

@alandefreitas alandefreitas moved this to Accepted in MrDocs Nov 18, 2024
@alandefreitas alandefreitas moved this from Accepted to In progress in MrDocs Nov 18, 2024
alandefreitas added a commit to alandefreitas/mrdocs that referenced this issue Dec 14, 2024
alandefreitas added a commit to alandefreitas/mrdocs that referenced this issue Dec 15, 2024
alandefreitas added a commit to alandefreitas/mrdocs that referenced this issue Dec 15, 2024
alandefreitas added a commit to alandefreitas/mrdocs that referenced this issue Dec 15, 2024
alandefreitas added a commit to alandefreitas/mrdocs that referenced this issue Dec 15, 2024
alandefreitas added a commit that referenced this issue Dec 16, 2024
@github-project-automation github-project-automation bot moved this from In progress to Done in MrDocs Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants