- edited description
Red color cast on all raw files when compiled with gcc-10.1.0
I have a strange issue with the Windows builds I create myself following the instructions from Rawpedia: https://rawpedia.rawtherapee.com/Windows#Clone_and_build_RawTherapee
Basically, after I open a RAW file (does not matter from wich camera) it is shown having a red color cast that does not go away no matter what I do. Even using the ‘neutral’ processing profile on an image is causing this.
I’ve attached the AboutThisBuild.txt and a screenshot.
This does not happen with the builds from: https://keybase.pub/gaaned92/ART-W64NightlyBuilds/ (I tried with ART_master_1.3-22-g971578cc1_W64_Skylake_200510).
The one major difference between the build that works fine and the one that does not seems to be the gcc version:
- with Compiler: gcc 9.3.0 all is good
- with Compiler: gcc 10.1.0 the behavior described above can be observed.
I will try to see if I can also use gcc-9 now that I updated MSYS to check if this is really the problem.
Comments (24)
-
reporter -
reporter It is definitely something caused by the MSYS2 update as I am experiencing the same with rawtherapee:
- build done on Sat, 09 May 2020 10:11:35 with gcc-9.3.0 is fine
- build done today with gcc-10.1.0 is not OK, as soon as a picture is opened and a profile applied (no matter if it is the default or neutral) the picture gets a red cast that does not go away.
@agriggio @Gaaned92 did you already updated MSYS2 to gcc-10 and get similar problems?
-
I just did the GCC upgrade to 10.1 and surely it is broken. So I quickly went back to 9.3.
I don’t know what to do to track the bug.
Due to problems, I also keep cmake 3.15.6-1 and libjpeg-turbo 1.5.3-1
-
reporter Thank you for the feedback. I will have a look at the release notes for gcc to see if I can spot something that changed there and could influence this.
In the meanwhile, maybe a hint on art wiki/rawpedia will be good to not update to gcc-10.1 until we figure out what the problem is…
-
there is also a Github/rawtherapee issue on same subject: https://github.com/Beep6581/RawTherapee/issues/5749
If I am brave enough, I will build photoflow and filmulator to see if it is the same.
-
reporter From the link @Gaaned92 posted above:
Bisecting showed that it's caused by
-ftree-loop-vectorize
. Imho it's a bug in gcc 10. I reverted to gcc 9.3...
-
reporter - changed title to Red color cast on all raw files when compiled with gcc-10.1.0
-
reporter Issue title changed as the Heisenbug is now confirmed also on Linux…
-
reporter Just a summary of the investigations done in rawtherapee thread:
- it is now confirmed that
-fno-tree-loop-vectorize
is the culprit - not yet sure if this is a bug in rawtherapee code, or a place where the code does not conform the specs somehow, or a gcc-10.1.0 bug
I’ve also compiled darktable with gcc-10.1.0 and it does not have this problem. I did not checked until now if it uses the offending optimization option yet…
- it is now confirmed that
-
repo owner Issue
#100was marked as a duplicate of this issue. -
How can one disable the
-fno-tree-loop-vectorize
flag? Would it impair performance significantly?I downgraded GCC to the previous (9.6 I think) to be able to build and use ART, but then I encountered problems some troubles on my system for some kernel modules that can’t build with anymore with the older GCC.
-
repo owner just add
-fno-tree-loop-vectorize
toCMAKE_CXX_FLAGS
inCMakeCache.txt
I doubt you will notice any performance problem in normal use, most critical loops are already hand-vectorized with explicit SSE instructions (thanks mostly to ingo
-
repo owner CMake: set -fno-tree-loop-vectorize for gcc >= 10.1 (see
#82)→ <<cset d65d285968a0>>
-
repo owner I’ve just added some detection code to the build system, so that
-fno-tree-loop-vectorize
is automatically used for gcc >= 10.1. Can you please test whether it works? Thanks! -
@agriggio I tried your last cmake change, and it works: the GCC version is correctly detected, and the correct flag added.
-
repo owner thanks!
-
reporter @agriggio jusf FYI, it looks like heckflosse found a fix in the rawtherapee code for the issue and now the optimization can be activated.
More details here: https://github.com/Beep6581/RawTherapee/issues/5749#issuecomment-639467551
-
repo owner doesn’t look like a fix to me, but just some confirmation that this is likely a compiler bug. Better play safe and keep the optimization off
-
reporter You are of course right. I was just to fast and hopeful that the problem is now fixed
-
repo owner Update: confirmed as a GCC bug. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96133
-
reporter Looks like it is already fixed yesterday. However msys is not yet updated so I cannot test the fix.
-
reporter @agriggio Finally MSYS updated the gcc version and I confirm that with gcc-10.2.0 the problem is fixed. I guess we can change the check in cmake to only account and disable the optimization for gcc-10.1.x
-
repo owner - changed status to resolved
-
repo owner done, thanks!
- Log in to comment