Compiling on OSX 10.11

Hi there,

more for curiosity than need, I’m trying to compile RT on OSX 10.11.
I followed the guide at RawPedia, and encountered some errors.
Do you have any clue ?

In file included from /Users/matteo/repo-rt/rtengine/curves.cc:35:
/Users/matteo/repo-rt/rtengine/curves.h:252:17: error: value of type 'int
      __attribute__((ext_vector_type(4)))' (vector of 4 'int' values) is not
      contextually convertible to 'bool'
        return (x <= start * slope ? x / slope : xexpf(xlogf((x + add) ...
                ^~~~~~~~~~~~~~~~~~
In file included from /Users/matteo/repo-rt/rtengine/flatcurves.cc:19:
/Users/matteo/repo-rt/rtengine/curves.h:252:17: error: value of type 'int
      __attribute__((ext_vector_type(4)))' (vector of 4 'int' values) is not
      contextually convertible to 'bool'
        return (x <= start * slope ? x / slope : xexpf(xlogf((x + add) ...
                ^~~~~~~~~~~~~~~~~~
In file included from /Users/matteo/repo-rt/rtengine/diagonalcurves.cc:21:
/Users/matteo/repo-rt/rtengine/curves.h:252:17: error: value of type 'int
      __attribute__((ext_vector_type(4)))' (vector of 4 'int' values) is not
      contextually convertible to 'bool'
        return (x <= start * slope ? x / slope : xexpf(xlogf((x + add) ...
                ^~~~~~~~~~~~~~~~~~

It seems that the compiler you use (which one is it btw?) does not support some vector notations…

I passed this to cmake: -DCMAKE_CXX_COMPILER=“clang+±mp-3.7”

In the guide it is written: We recommend using the latest stable version of the Clang compiler with OpenMP support. Unstable versions are not recommended.
Actually i didn’t verify whether this version of Clang was actually the latest or not.
I just installed the version suggested.
Perhaps should I move to 3.8.1 ?

Thanks :slight_smile:

@sovereign I can’t answer your questions because I can’t build on OSX. But maybe you can find an answer here

I had exact the same problem with clang-tidy 3.8 and had to comment this line out.

From my experience: It won’t help. We must fix it in the code.

@floessie, good to know. We have to change this line to an intrinsic variant then (at least for clang). I’ll push a change this evening.

Ingo

Thanks, Ingo. I’m about to leave for holyday (3 weeks), so I can’t help you with this right now.

Flössie

@floessie, same here (leaving for 3 weeks holidays). But I think I can push a clang version very soon

I pushed a fix to master branch.
@sovereign Can you test it?
@Morgan_Hardwood Can you merge it into gtk3 branch after it’s tested?

Ingo

Hi Ingo. It worked :slight_smile:
The version I compiled from the master branch is 4.2.993 (gtk2).

1 Like

@sovereign Great, thanks for your test :slight_smile:

Hey guys

Which line?

I will merge, no problem, but do we need to update the docs in any way?

@Morgan_Hardwood We don’t need to update the docs. I just have to take care about not using this smart vectorized coding styles gcc supports…

Ok, will merge soon, after an unrelated push.

1 Like

Thank you! 12345or20 characters…

Done. Lorem ipsum blood donor sit amet, @patdavid.