Hi, trying to compile under macOS Mojave from the current dev tip and getting this error:
RawTherapee/rtengine/rcd_demosaic.cc:192:44: error: value of type '__attribute__((__vector_size__(4 * sizeof(int)))) int' (vector of 4 'int' values) is not contextually convertible to 'bool'
const vfloat VH_Disc = (vabsf(0.5f - VH_Central_Value) < vabsf(0.5f - VH_Neighbourhood_Value)) ? VH_Neighbourhood_Value : VH_Central_Value;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The build command I’m using is the one listed in RawPedia - MacOS. Initially I was trying to build with a newer version of llvm and clang. To rule out the compiler incompatibility I’ve installed llvm@8 (8.0.1) but the issue was still there.
The line in question was introduced by a fairly recent commit 33c5d6a (Sep, 3 2020). I’ve switched to the immediately preceding commit and was able to build fine, both with llvm@8 and the system clang 11.0.0.
Xcode does not report the correct clang (llvm) version. See here for details.
I had the same discussion with @lock042 a few days ago.
Xcode 11.0 uses llvm 8.0.0, which indeed does not support the ternary operator for sse float vectors.
I’ve tried with llvm 10 and everything built fine. Last time I did that my command was off and it couldn’t find some dependencies. I have since updated that command and this time it worked.
Maybe the guide here MacOS - RawPedia should be updated to reflect the current llvm version.
Thanks for pointing me in the right direction!
For anyone interested, the command that worked for me is here.
The macOS system clang is not traditional clang, it is Apple clang and has its own versioning. Homebrew llvm has been on llvm@10 since August, so I’m not sure what on Rawpedia needs updating.
Well, the core team developers are using llvm@10 as the standard, and the support for (the referenced) llvm@8 is coming second. The macOS has its own versioning idiosyncrasies of the components critical to the build. It seems to make sense to update the guide. If not to mention the llvm@10 yet (although why not?), then to make it more explicit about the pitfalls. These are the things that become obstacles for the newcomers, and distract the team members who have to answer such questions.
@HIRAM, @XavAL, by the link below is a proposed wording for the updates to the MacOS - RawPedia section. Not sure if this is the best way to present the changes but these docs seem not to be in the repo.
@HIRAM, @XavAL Wondering what’s holding up the update. Let me know if there is something that needs to be changed in the wording, or if you don’t find the change meaningful enough to be applied.
Thanks! Although the markdown formatting does not seem to work. The `` and the []() links are displayed raw. Probably needs to be converted from markdown to something the docs use.
Also the code example under Using llvm 10 from homebrew: is completely broken.