MacOS: Difference between revisions

From RawPedia
Jump to navigation Jump to search
(https://github.com/Beep6581/RawTherapee/issues/3847#issuecomment-298220369)
(→‎MacPorts: dependency for Xcode 9.2 build added.)
(18 intermediate revisions by 3 users not shown)
Line 9: Line 9:


=== MacPorts ===
=== MacPorts ===
Tested on OS X 10.9 and newer
Tested on OS X 10.9 and newer.
* '''Prerequisites:'''
* '''Prerequisites:'''
** Apple's Xcode Developer Tools
** Apple's Xcode Developer Tools
** Apple's Command Line Tools
** Apple's Command Line Tools
** MacPorts
** MacPorts
:''Detailed instructions on setting up MacPorts and the developer tools are available on the MacPorts website''
*** Detailed instructions on setting up MacPorts and the developer tools are available on the MacPorts website.
*** The native system compiler provided by Apple is badly outdated and does not support OpenMP. Don't use it. Use the latest stable compiler from MacPorts - RawTherapee will run faster.
* '''Configure MacPorts:'''  
* '''Configure MacPorts:'''  
: Add the following line to /opt/local/etc/macports/variants.conf
: Add the following line to /opt/local/etc/macports/variants.conf
Line 21: Line 22:
* '''Dependencies:'''
* '''Dependencies:'''
: To install the dependencies, run from the terminal:
: To install the dependencies, run from the terminal:
:: <code>sudo port install git clang-3.9 gtk3 gtkmm3 gtk-osx-application-gtk3 adwaita-icon-theme libsigcxx2 lcms2 libiptcdata fftw-3-single</code>
:: <code>sudo port install git clang-3.9 gtk3 gtkmm3 gtk-osx-application-gtk3 adwaita-icon-theme libsigcxx2 lcms2 libiptcdata fftw-3-single lensfun</code>
: If compiling on Xcode 9.2 you will also need to do:
:: <code>sudo port instal ld64 +ld64_xcode</code>


=== libiconv patch ===
=== libiconv patch ===
Line 43: Line 46:
sudo cp "${buildDir}/opt/local/lib/libiconv.2.dylib" /opt/local/lib/libiconv.2.dylib
sudo cp "${buildDir}/opt/local/lib/libiconv.2.dylib" /opt/local/lib/libiconv.2.dylib
</pre>
</pre>
=== Distribution Bundle Framework Library Versions in 5.4-rc1 ===
{| class="wikitable"
|-
! package
! 5.4-rc1 version
! status
! 5.4-dev version
! status
|-
|gtk+
|3.22.26-168-g63f534f4b3
|on branch gtk-3-22
|
|-
|gtkmacintegration-gtk3
|2.0.8
|
|
|-
|gdk
|3.22.26
|
|
|-
|gdk-pixbuf
|2.36.11
|
|
|-
|cairo
| 1.14.8
|PATCHED[https://github.com/Beep6581/RawTherapee/issues/3882#issuecomment-311703141]
|
|-
|cairomm
| 1.12.2
|
|
|-
|cairo-gobject
| 1.14.10
|
|
|-
|pango
| 1.40.12
|
|
|-
|pangocairo
| 1.40.12
|
|
|-
|pangoft2
| 1.40.12
|
|
|-
|pangomm
| 2.40.1
|
|
|-
|gtkmm
| 3.22.2
|
|
|-
|gdkmm
| 3.22.2
|
|
|-
|atk
| 2.26.1
|
|
|-
|atkmm
| 2.24.2
|
|
|-
|glib/gio
| 2.54.2
|
|
|-
|glibmm/giomm
| 2.54.1-15-ge9330a8e
| On branch glibmm-2-54
|
|-
|gobject
| 2.53.4
|
|
|-
|gmodule
| 2.53.4
|
|
|-
|gthread
| 2.54.2
|
|
|-
|libsigc++-2.0
| 2.10.0
|
|
|-
|TIFF
| 4.0.9
|
|
|-
|pixman
| 0.34.0
|
|
|-
|PNG
| 1.6.33
|
|
|-
|expat
| 2.2.4
|
|
|-
|lcms2
| 2.8
|
|
|-
|JPEG
| 9b
|
|
|-
|harfbuzz
| 1.4.7
|
|
|-
|epoxy
| 1.4.3
|
|
|-
|pcre
| 8.4.1
|
|
|-
|lensfun
| 0.3.2.0
|
|
|-
|libiconv2
| 1.15
| [[#libiconv_patch|PATCHED]]
|
|-
|iptcdata
| 1.0.4
|
|
|-
|fontconfig
| 2.12.4
|
|
|-
|freetype2
| 20.0.14
|
|
|-
|libz
| 1.2.11
|
|
|-
|graphite2
| 3.0.1
|
|
|-
|fftw
| 3.3.7
|
|
|-
|libffi
| 3.2.1
|
|
|-
|libiomp5
| 20160808_oss[https://github.com/Beep6581/RawTherapee/issues/3971#issuecomment-315643878]
| REPLACES libomp from clang [https://github.com/Beep6581/RawTherapee/issues/3971]
|
|}


== Compiling ==
== Compiling ==
Line 68: Line 282:
       -DCMAKE_CXX_COMPILER="clang++-mp-3.9" \
       -DCMAKE_CXX_COMPILER="clang++-mp-3.9" \
       -DWITH_LTO="OFF" \
       -DWITH_LTO="OFF" \
      -DLENSFUNDBDIR="./share/lensfun" \
       ..
       ..
make -j4 install
make -j4 install
Line 78: Line 293:
To provide the RawTherapee project with your build, please zip the .dmg and AboutThisBuild.txt files together. Name the zip file according to this template:
To provide the RawTherapee project with your build, please zip the .dmg and AboutThisBuild.txt files together. Name the zip file according to this template:
: RawTherapee_OSX_'''<minimum supported macOS version>'''_64_'''<RawTherapee version>'''.zip
: RawTherapee_OSX_'''<minimum supported macOS version>'''_64_'''<RawTherapee version>'''.zip
for example if your build is made for macOS 10.12 and the version of RawTherapee is 5.1-dev-g1a2b3c4d, name it:
for example if your build is made for macOS 10.12 and the version of RawTherapee is 5.2-dev-g1a2b3c4d, name it:
: RawTherapee_OSX_10.12_64_5.1-dev-g1a2b3c4d.zip
: RawTherapee_OSX_10.12_64_5.2-dev-g1a2b3c4d.zip
Upload the zip archive to http://filebin.net/ and [https://github.com/Beep6581/RawTherapee/issues/new open a new issue on our GitHub page] with the link so that we can upload it to the website.
Upload the zip archive to http://filebin.net/ and [https://github.com/Beep6581/RawTherapee/issues/new open a new issue on our GitHub page] with the link so that we can upload it to the website.

Revision as of 17:24, 17 March 2018

This page details instructions for compiling RawTherapee on macOS systems. There are also separate pages with instructions for compiling on Linux and Windows. This guide details the what and how parts of compilation. For the why and explanations of these commands, for a list of dependencies, CMake options and other information, please refer to the detailed Linux article.

When in doubt, join us on IRC and ask a human!

For instructions on cloning the source, choosing branches, configuring CMake and doing the actual compilation, see these sections in the Linux guide. The information below is in addition to that.

Dependencies

See the list of dependencies in the Compiling in Linux article.

MacPorts

Tested on OS X 10.9 and newer.

  • Prerequisites:
    • Apple's Xcode Developer Tools
    • Apple's Command Line Tools
    • MacPorts
      • Detailed instructions on setting up MacPorts and the developer tools are available on the MacPorts website.
      • The native system compiler provided by Apple is badly outdated and does not support OpenMP. Don't use it. Use the latest stable compiler from MacPorts - RawTherapee will run faster.
  • Configure MacPorts:
Add the following line to /opt/local/etc/macports/variants.conf
+quartz -x11 -gnome
  • Dependencies:
To install the dependencies, run from the terminal:
sudo port install git clang-3.9 gtk3 gtkmm3 gtk-osx-application-gtk3 adwaita-icon-theme libsigcxx2 lcms2 libiptcdata fftw-3-single lensfun
If compiling on Xcode 9.2 you will also need to do:
sudo port instal ld64 +ld64_xcode

libiconv patch

libiconv.2.dylib must be patched, otherwise RawTherapee will crash on startup. The patch is available in `tools/osx/libiconv_1.15_rt.patch`

libiconv patching and compilation instructions:

wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz
tar xf libiconv-1.15.tar.gz
cd libiconv-1.15
wget https://raw.githubusercontent.com/Beep6581/RawTherapee/dev/tools/osx/libiconv_1.15_rt.patch
patch -p1 < libiconv_1.15_rt.patch
mkdir build
cd build
buildDir="$(pwd)"
../configure --prefix=/opt/local --disable-static 'CFLAGS=-arch x86_64 -mmacosx-version-min=10.9' 'LDFLAGS=-arch x86_64 -mmacosx-version-min=10.9' CXXFLAGS="-arch x86_64 -mmacosx-version-min=10.9"
make
make DESTDIR="$buildDir" install
cd /opt/local/lib
sudo cp ./libiconv.2.dylib ./libiconv.2.dylib.backup # backup MacPorts dylib
sudo cp "${buildDir}/opt/local/lib/libiconv.2.dylib" /opt/local/lib/libiconv.2.dylib

Distribution Bundle Framework Library Versions in 5.4-rc1

package 5.4-rc1 version status 5.4-dev version status
gtk+ 3.22.26-168-g63f534f4b3 on branch gtk-3-22
gtkmacintegration-gtk3 2.0.8
gdk 3.22.26
gdk-pixbuf 2.36.11
cairo 1.14.8 PATCHED[1]
cairomm 1.12.2
cairo-gobject 1.14.10
pango 1.40.12
pangocairo 1.40.12
pangoft2 1.40.12
pangomm 2.40.1
gtkmm 3.22.2
gdkmm 3.22.2
atk 2.26.1
atkmm 2.24.2
glib/gio 2.54.2
glibmm/giomm 2.54.1-15-ge9330a8e On branch glibmm-2-54
gobject 2.53.4
gmodule 2.53.4
gthread 2.54.2
libsigc++-2.0 2.10.0
TIFF 4.0.9
pixman 0.34.0
PNG 1.6.33
expat 2.2.4
lcms2 2.8
JPEG 9b
harfbuzz 1.4.7
epoxy 1.4.3
pcre 8.4.1
lensfun 0.3.2.0
libiconv2 1.15 PATCHED
iptcdata 1.0.4
fontconfig 2.12.4
freetype2 20.0.14
libz 1.2.11
graphite2 3.0.1
fftw 3.3.7
libffi 3.2.1
libiomp5 20160808_oss[2] REPLACES libomp from clang [3]

Compiling

See the Compiling in Linux article for instructions on how to clone the source code, choose a branch and how to configure CMake. Ignore the "Now you are ready to compile" code on that page and follow the code on this page.

If you want to upload a build or otherwise share it with others, you must use

-DPROC_TARGET_NUMBER="1"

and set the processor label manually by setting

-DPROC_LABEL="generic processor"

If you want to compile for yourself only, then use

-DPROC_TARGET_NUMBER="2"

and then the processor label would be irrelevant, you could skip it.

Compile RawTherapee

Now you are ready to compile:

cd ~/repo-rt
rm -rf build
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE="release" \
      -DPROC_TARGET_NUMBER="1" \
      -DPROC_LABEL="generic processor" \
      -DCACHE_NAME_SUFFIX="5-dev" \
      -DCMAKE_C_COMPILER="clang-mp-3.9" \
      -DCMAKE_CXX_COMPILER="clang++-mp-3.9" \
      -DWITH_LTO="OFF" \
      -DLENSFUNDBDIR="./share/lensfun" \
      ..
make -j4 install
make macosx_bundle

Run and Share RawTherapee

You will find a disk image in the build directory; this is the distribution release and can be run on any machine which meets the architecture requirements you specified in variants.conf earlier.

To provide the RawTherapee project with your build, please zip the .dmg and AboutThisBuild.txt files together. Name the zip file according to this template:

RawTherapee_OSX_<minimum supported macOS version>_64_<RawTherapee version>.zip

for example if your build is made for macOS 10.12 and the version of RawTherapee is 5.2-dev-g1a2b3c4d, name it:

RawTherapee_OSX_10.12_64_5.2-dev-g1a2b3c4d.zip

Upload the zip archive to http://filebin.net/ and open a new issue on our GitHub page with the link so that we can upload it to the website.