llvm / llvm/llvm-project

[clang] a bug found when using libstdc++ make_shared with modules

Open
#197,925 0 comments 0 reactions 0 assignees View on GitHub
clang
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

I don't know what causes it or why it happens, but clang apparently thinks that same mangled names are defined multiple times.
```
/__w/kernel/kernel/dependencies/libstdcxx-headers/libstdcxx-headers/include/bits/shared_ptr.h:1064:5: error: definition with same mangled name '_ZSt11make_sharedIN2fs6procfs12_GLOBAL__N_18file_opsEJEESt10shared_ptrIT_EDpOT0_' as another definition
1064 | make_shared(_Args&&... __args)
| ^
/__w/kernel/kernel/dependencies/libstdcxx-headers/libstdcxx-headers/include/bits/shared_ptr.h:1064:5: note: previous definition is here
/__w/kernel/kernel/dependencies/libstdcxx-headers/libstdcxx-headers/include/bits/shared_ptr.h:1064:5: error: definition with same mangled name '_ZSt11make_sharedIN5nostd12basic_stringIcSt11char_traitsIcESaIcEEEJS5_EESt10shared_ptrIT_EDpOT0_' as another definition
1064 | make_shared(_Args&&... __args)
| ^
/__w/kernel/kernel/dependencies/libstdcxx-headers/libstdcxx-headers/include/bits/shared_ptr.h:1064:5: note: previous definition is here
```
std::make_shared works just fine in other places.
failed workflow: https://github.com/ilobilix/kernel/actions/runs/25918331456/job/76180519032
this was the code: https://github.com/ilobilix/kernel/commit/4742146e6dd13e81101023057196e1e46d9a822e

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.