-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[question] How to build onetbb with clang++ on Windows? #21320
Comments
Not really. onetbb may need pkgconf as a build requirement, and to build pkgconf you need meson and meson uses ninja by default. |
Thank you Spacelm! I might have made some progress thanks to your input, but I'm not 100% sure. After changing my profiles, I encountered another unexpected error while building onetbb:
To be clear, I'm not using WSL or clang-cl. I just want to build my project using clang++, on Windows. This should allow me to use the same compiler regardless of whether I'm using Windows or Linux. A search on the interenet reveals that -fPIC might not be a valid flag on Windows, but then why would onetbb try to build itself with that flag? I thought such a small project would be easy to build thanks to Conan, but it appears I'm going down some obscure rabbithole. I really appreciate your help on this. I'll also update the title in case others have similar difficulties in the future. Thank you. |
No idea why, but they inject fPIC irrespective of OS if clang, which is bad: https://github.com/oneapi-src/oneTBB/blob/v2021.10.0/cmake/compilers/Clang.cmake#L53-L54 |
Thanks for the quick response! It appears that there's an ongoing pull request to fix this: uxlfoundation/oneTBB#1269 I will await its resolution and hopefully everything will work afterwards. Thanks again! |
What is your question?
I'm just getting started with Conan so I created a small project with Conan and CMake and it worked fine at first, but then I added "onetbb/2021.10.0" in the conanfile.txt and
conan install
started failing.It appears that onetbb requires ninja/1.11.1, and ninja fails to build. Here's my conanfile.txt:
Here's my conan incantation:
conan install . --output-folder=build --build=missing --profile conan_clang.txt --settings=build_type=Debug
And here's the output:
One thing I find odd is that there's a directory called "None" inside ninja's build directory:
C:\Users\pedro\.conan2\p\b\ninjafb8deac9af948\b\build\None
. I wonder if that directory should be called Debug.Thanks for the help!
The text was updated successfully, but these errors were encountered: