OSX Compiling Issue from git pull

Latest git pull. I am trying to compile on my MBP with OSX 10.12.2. I have the latest Xcode installed. I am getting the following error:

[  7%] Building CXX object rtengine/CMakeFiles/rtengine.dir/iccstore.cc.o
/Users/partha/projects/src/graphics/RT/RawTherapee/rtengine/iccstore.cc:373:15: error: type 'GammaValues' (aka 'array<double, 7>') does not provide a subscript
      operator
            ga[0] = 2.22;    //BT709  2.2  4.5  - my preferred as D.Coffin
            ~~^~
/Users/partha/projects/src/graphics/RT/RawTherapee/rtengine/iccstore.cc:374:15: error: type 'GammaValues' (aka 'array<double, 7>') does not provide a subscript
      operator
            ga[1] = 0.909995;
            ~~^~
...

Any ideas?

Thanks,
Partha

What’s exactly your compiler and its version?

error: type 'GammaValues' (aka 'array<double, 7>') does not provide a subscript

That’s not true for a C++11 compiler and lib(std)c++.

– The C compiler identification is AppleClang 8.0.0.8000042
– The CXX compiler identification is AppleClang 8.0.0.8000042
– Check for working C compiler:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
– Check for working C compiler:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
– works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
– Check for working CXX compiler:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
– works

I don’t understand your last statement…

Thanks for your info.

I meant, this is legal C++11 and there is no reason, why a C++11 compliant compiler should throw an error here.

Did you pass -DCMAKE_CXX_FLAGS="-std=c++11?

Well, something is not right then. If it’s legal C++11, clang is not
recognizing it as such or a header is missing?

When compiling PhotoFlow under OSX, I add the following to CMAKE_CXX_FLAGS (as @Morgan_Hardwood already pointed out):

-mmacosx-version-min=10.8 -std=c++11

It might be that C++11 extensions are not enabled by default with clang…

I was already doing that. :slight_smile: You should know my cmake command line by
now. :slight_smile:

Anyway, I seemed to have solved the problem/gone past the error message
by adding
#include <array>
in color.h.

Also, I got another error:
/Users/partha/projects/src/graphics/RT/RawTherapee/rtengine/iccjpeg.cc:131:9: error: cannot initialize return object of type 'boolean' with an rvalue of type 'bool' marker->marker == ICC_MARKER && ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I went past this error by changing “boolean” to “bool” on Line 127 in
file iccjpeg.cc

Thanks,
Partha

Wonderful, we all love the DIY kind of users like you. :thumbsup:

I’ve created a branch with your fixes (I solved the boolean problem a bit different) and some other fixes for warnings I got from my Clang 3.8 build.

Could you please try it and report back here? If you have a GitHub account, you can also comment on PR 3501.

Best
Flössie

Hey that’s cool! I am glad that you created a new branch with my fixes.
I’ll be sure to check it out and continue to see if there are any issues.

One of the reasons I embarked on compiling RT for both Windows and Mac
is that I received comments that my GIMP build on Windows was crashing
when accessed through RT. After compiling on the Mac, I didn’t have
issues launching McGimp and so we’re good on the Mac side.

On the Windows side, I was unable to get my build to work. I am
suggesting using a different approach to launch external programs on
Windows. Should I provide a patch on PR 3501 or start a new issue on
main branch?

Thanks again,
Partha

I’d say, better start a new issue on GitHub as this is mostly unrelated to the original problem.

Best
Flössie

If your time permits, it would be cool if you could test the branch as soon as possible, as we’d like to merge it to master soon for a broader testing before RT5 is released.

Thanks
Flössie

I checked out the fix-clang-build branch. I rebuilt rawtherapee and it
went without errors. Some warnings about using std::abs I can live with.
More importantly,you also fixed the annoying gtkmm warning on launch.
That was an important fix!

I opened rawtherapee and was able to export an image to McGimp. This is
good.

Thanks,
Partha

Hi Partha,

I answered you on GitHub.

Thanks
Flössie

Hey @partha please take a look, we need a new macOS build:
https://github.com/Beep6581/RawTherapee/issues/3339

Hi Morgan,

No problems. I will try to get a build out by the weekend. Will that work?

Thanks,
Partha

Absolutely!

OK, GTK3 build is now ready from the latest git pull. Please test and
let me know if you have any issues.

http://www.partha.com/temp/RawTherapee-gtk3.app.zip

To install, use Finder to unzip. Then drag the app to your Application
Folder or personal Application Folder. Double click to run.

Thanks,
Partha

1 Like

@partha thank you for making a new build. I have some questions:

  1. Why is this not a DMG as all other OS X builds were before?
  2. Is DMG more user-friendly, or does it not matter? Can a DMG be installed in some way which offers an OS X-friendly uninstall procedure?
  3. Could you zip it together with AboutThisBuild.txt in the root of the archive? That is a requirement of the current website and is how all builds for all operating systems are packaged.

[Morgan_Hardwood] Morgan_Hardwood
http://discuss.pixls.us/users/morgan_hardwood
December 3

@partha http://discuss.pixls.us/users/partha thank you for making a
new build. I have some questions:

  1. Why is this not a DMG as all other OS X builds were before?

Well, I have not produced DMGs before simply because I didn’t need them.
I suppose one could build an elaborate mechanism for providing multiple
apps or something, but mostly I see DMGs telling you to drag the App to
the Application folder. If DMG is requirement for you, I will look into it.

  1. Is DMG more user-friendly, or does it not matter? Can a DMG be
    installed in some way which offers an OS X-friendly uninstall procedure?

I don’t think we need DMG since the Finder is quite capable of unzipping
the App where you downloaded it. This also allows you to test the app
before moving it to your Application Folder.

  1. Could you zip it together with AboutThisBuild.txt in the root of
    the archive? That is a requirement of the current website and is how
    all builds for all operating systems are packaged.

Yes, I can. This is the same information in the about > Version menu
item, right? Note that once you unzip, this text file won’t be part of
the App at all.