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

Error building clang #11

Open
tetsuhaut opened this issue Jul 14, 2024 · 3 comments
Open

Error building clang #11

tetsuhaut opened this issue Jul 14, 2024 · 3 comments

Comments

@tetsuhaut
Copy link

Hi stripe2933,
I tried the step "Build Standard Library Module from LLVM repository." but I get the following error:
"llvm-project/build/include/c++/v1/cstdlib:149:9: error: 'aligned_alloc' has not been declared in '::'
149 | using ::aligned_alloc _LIBCPP_USING_IF_EXISTS;"

Do you have any idea of what could go wrong?

Thanks for your help :)

@stripe2933
Copy link
Owner

Hello, seems like Clang CI does not produce any error. Could you provide me your operating system and the compiler that used to build the libc++ library?

Note: unless you're using C++20, I highly recommend you to use CMake's built-in import std support (https://www.kitware.com/import-std-in-cmake-3-30/). I'll deprecate this library usage when CMake officially support standard library module with C++20.

@tetsuhaut
Copy link
Author

tetsuhaut commented Jul 15, 2024

Hi,
I am using Windows 11, cmake 3.29.3, and gcc 14.1.0 / clang 18.1.5 from winlibs. The same error occured using cmake 3.30.0.

@stripe2933
Copy link
Owner

stripe2933 commented Jul 15, 2024

I don't have a Windows machine with Clang, so this is just a guess: According to cppreference, aligned_alloc is not supported in the Windows C runtime library. This might mean that the libc++ implementation hides the definition. You could check the <cstdlib> header to see if the definition is hidden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants