To compile on Linux?

Some years ago, someone had given me a very clear procedure for compiling RT under Linux.
I lost this procedure…
Can anyone give me the again ?
Thank you

(Obviously I have read the procedure on rawpedia , but the process I’m looking for was more clear for me)

The one I use is this one; clear or not - it works just fine :slight_smile:
http://rawpedia.rawtherapee.com/Linux#Compiling:_The_Manual_Way
Just see to it that the dependencies are OK first (described further up on the same page).

1 Like

Thanks Claes, but as I already told, I have already read this thread…

My conclusion was to simply find it in my repo. In my case it isn’t included in the official repo so I have to find it in the build service as some one always sorts the latest version out. Saves a lot of possible grief on finding all of the dependencies and also what can happen if those get messed up.

John

Hi @luxapy

Now I am getting inquisitive, curious and nosey: which of the instructions do not work for you?

As I see it, it is mostly a matter of being able to cut & paste from rawpedia onto your machine, step by step. Which Linux distro do you use?

@luxapy maybe my current short script?

#!/usr/bin/env bash
repo="$HOME/repo-rt"
if [[ ! -d "${repo}" ]]; then
    git clone git@github.com:Beep6581/RawTherapee.git "${repo}"
    exit 0
fi

if [[ $1 = d ]]; then
    buildType="debug"
elif [[ $1 = r ]]; then
    buildType="release"
else
    buildType="relwithdebinfo"
fi

cd "${repo}" || exit
mkdir build
cd build
cmake -DCMAKE_CXX_FLAGS="-std=c++11 -Wno-deprecated-declarations -Wno-unused-result" -DWITH_LTO="OFF" -DCMAKE_BUILD_TYPE="${buildType}" -DPROC_TARGET_NUMBER="2" -DBUILD_BUNDLE="ON" -DBINDIR="." -DDATADIR="." -DCACHE_NAME_SUFFIX=4 .. && make -j6 install

Save as ~/crunch, then chmod +x ~/crunch

To use:

  • Normal build (RelWithDebInfo - it’s fast but also has debug info in case of a crash): ~/crunch
  • Debug build: ~/crunch d
  • Release build: ~/crunch r

There is also the more sophisticated build script in tools/buildRT but I haven’t used it since we switched from Mercurial to Git so can’t vouch that it still works.

@Morgan_Hardwood Elegant!
Only friendly complaint I have about that script is the -j6 close to the end. For the proper value to insert there, see Linux - RawPedia under the subheading Threads :slight_smile:

Yup. I use -j6 on my CPU which has 8 virtual cores because it doesn’t make much difference to compilation speed, but avoids jerky behavior when I’m doing other stuff while compiling.

Hello all,

Thanks again for your answers,

I’m using the last Linux MINT 18.

I receive this message :

– The C compiler identification is GNU 5.4.0
– The CXX compiler identification is GNU 5.4.0
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /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: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– CMAKE_BUILD_TYPE: release
– Found PkgConfig: /usr/bin/pkg-config (found version “0.29.1”)
– Checking for module ‘gtk±3.0>=3.16’

CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:367 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal)
CMakeLists.txt:222 (pkg_check_modules)

– Configuring incomplete, errors occurred!
See also “/root/repo-rt/build/CMakeFiles/CMakeOutput.log”.

You need some development package for gtk3. No idea what it’s called on MINT.

Should be called the same as on Ubuntu.

As those in turn steal^Wborrow from Debian it should be libgtk-3-dev.

EXCELLENT !
I succeded with the ubuntu files .
Thanks a lot all

Ah! I have a last question: how to bring up the RT icon instead of the generic file icon?
(Linux MINT)

Tks

Wait, do you mean you used Ubuntu packages on your Mint installation? Or just the package name to install the native package?

HI houz,

I used that :

Ubuntu 16.04 LTS and 15.10

Use the gtk3 branch.

sudo apt-get update
sudo apt-get install build-essential cmake curl git libbz2-dev libcanberra-gtk3-dev libexiv2-dev libexpat-dev libfftw3-dev libglibmm-2.4-dev libgtk-3-dev libgtkmm-3.0-dev libiptcdata0-dev libjpeg8-dev liblcms2-dev libpng12-dev libsigc+±2.0-dev libtiff5-dev zlib1g-dev

I think you can add the “dhor/myway” PPA to Linux Mint and get regular updates.

Thanks, I’ve installed

Mixing distributions is almost never a good idea and prone to break things horribly in the long run. I would be surprised if Mint didn’t ship that package by default already.

1 Like

You are right but I think Mint is directly derived from ubuntu and I read somewhere that the packages were compatible.
But I’m starting with Linux; I tried it there a few years ago but had been put off by the complexity when I wanted to go out of a system of pakages.
Now Microsoft’s arrogance gives me strong motivation to migrate from Win to Linux…