To compile on Linux?

@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…

… and after a while back to Win, because you screwed up everthing by happily mixing package versions!

Nothing new and seen very often :worried:

I think I’ve seen this as well, but the warning from everyone are quite valid. Though it may seem to work for the moment, it maybe worth checking somewhere (MINT support forums?) to make sure that what you’re doing is sane. At least checking the docs real quick couldn’t hurt.

Keep cool Christian !
In any case, It is not your advice which will allow me to improve my knowledge of Linux…

This is true: I am running Mint 17 and happily installing packages from dhor/myway without issues. The base system is the same of a standard Ubuntu distribution.

Indeed Mint over-rides some packages from Ubuntu. They also pin some packages from Debian in there when necessary. As a long time Debian user, I would not recommend grabbing deb files from out side the distro and installing them, that will eventually lead to sadness.

PPAs indeed work well on Mint, this is much better than grabbing packages.