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)
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.
#!/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
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.
– 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”.
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.
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…