Open AoGao-Kedoka opened 8 months ago
Hi @AoGao-Kedoka
Thanks for your report. This might be a recipe issue (in that case we need to transfer it to conan-center-index
repo instead), but I am having a look first.
So far I have been able to build it locally with:
conan install --requires=jasper/4.0.0 --build=missing -s build_type=Debug
That means, with the default "Visual Studio" generator instead of the Ninja
one. Could you please try the above also in your machine? Just to rule out other possible issues.
Seems to also work with Ninja:
conan install --requires=jasper/4.0.0 --build=missing -s build_type=Debug -c tools.cmake.cmaketoolchain:generator=Ninja
If you can try that one too, that would help.
Please remove all previous packages from your cache, just to make sure too.
Hi, i actually already tried both with or without the Ninja. The command fails with the same error. Also tried completely remove ~/.conan2 (this should remove all previous packages I guess?)
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\include\vcruntime_c11_stdatomic.h(36): error C2061: syntax error: identifier 'atomic_bool'
Since it looks like a visual studio include problem, I also tried reinstalling the vs2022.
Also tried completely remove ~/.conan2 (this should remove all previous packages I guess?)
Yes, that will remove all packages
I have been checking and comparing the output and the differences in my logs are:
-- Performing Test JAS_TRY_COMPILE_C11_THREADS - Failed
...
Threads_FOUND: TRUE
Pthread library:
Prefer POSIX threading support: ON
Threading support found: TRUE
C11 threading support detected: TRUE
POSIX threading support detected: FALSE
WIN32 threading support detected: TRUE
C11 threading support selected: TRUE
POSIX threading support selected: FALSE
Win32 threading support selected: FALSE
Which look related, as the error comes from vcruntime_c11_stdatomic
Thanks. It actually works for me 1-2 months ago so I thought the package was updated. This looks like a configuration issue from my environment then 🤔. I will take a deeper look into it.
I have managed to reproduce. I have updated my VS 2022 to the very latest update and now it failed!
I was running just the previous update, so it seems the latest one changed something that broke this recipe.
Seems related: https://developercommunity.visualstudio.com/t/C11-atomic-types-are-broken-in-CL/10560673?sort=newest
Seems like /experimental:c11atomics
need to be added to the build recipe🤔
Well, it did work in the previous update of VS... I am concerned that this might break other recipes as well
Same issue here while trying to build freeimage. Jasper is coming from libraw and with the same configuration I’ve the same build issue.
Confirmed this is a recipe issue:
$ conan install --requires=jasper/4.0.0 --build=jasper*
Fails since last update While
$ conan install --requires=jasper/4.0.0 --build=jasper* -c tools.build:cflags="['/experimental:c11atomics']"
Works.
This was also not a recipe issue some time ago, the last VS update broke builds that were working in the past.
As this is not a Conan issue, I am moving this to conan-center-index
I have just realized that 4.0.0
is an older version from 2022.
I have just tried:
conan install --requires=jasper/4.2.0 --build=jasper*
And this builds correctly. This is kind of expected, older jasper version do not support latest versions of the compiler and will fail to build.
The recipe could introduce a validate()
to raise an error if an older jasper/4.0.0 version is being used with the latest VS 2022, that could help with the UX with a better and more explicit error message, but the solution would be in any case to update to jasper/4.0.2
What is your question?
I get syntax error when install opencv (Jasper) and I can't really figure out why this is happening. With conan build_type Release it works. Here is the shortened log: