most up-to-date Wiki on installing Orthanc on linux

I have been trying to get the Windows version of Orthanc but decided to try to install it on linux. I have been using linux for a while but still a novice. I generally use CentOS but willing to set up a dedicated server on any flavor of linux as long as I can stumble through it and end up with a working system.

I tried several times but now asking for the best solution.

1. I tried Debian first, since there seemed to be an easy path to get Orthanc up and running. I ended up abandoning it since it looked like I was getting into dependency hell to get it installed.

2. I tried CentOS 7 since I am most familiar with it. I see that the compile process is different and you have to use cmake so I installed cmake, python and mercurial and thought I would be OK. I get to the point where I enter the cmake command:

cmake -DCMAKE_TOOLCHAIN_FILE=~/Orthanc/Resources/MinGWToolchain.cmake -DSTATIC_BUILD=ON -DSTANDALONE_BUILD=ON -DCMAKE_BUILD_TYPE=Debug ~/Orthanc

CMake Error: The source directory "/root/Orthanc" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
[root@localhost Orthanc-1.3.0]# cmake -DCMAKE_TOOLCHAIN_FILE=/home/mdz/Desktop/Orthanc-1.3.0/Resources/MinGWToolchain.cmake -DSTATIC_BUILD=ON -DSTANDALONE_BUILD=ON -DCMAKE_BUILD_TYPE=Debug /home/mdz/Desktop/Orthanc-1.3.0
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: i586-mingw32msvc-gcc
CMake Error: your C compiler: "i586-mingw32msvc-gcc" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check for working C compiler: i586-mingw32msvc-gcc -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "i586-mingw32msvc-gcc" is not able to compile a simple test
  program.

  It fails with the following output:

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)

CMake Error: your C compiler: "i586-mingw32msvc-gcc" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: your CXX compiler: "i586-mingw32msvc-g++" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
-- Configuring incomplete, errors occurred!
See also "/home/mdz/Desktop/Orthanc-1.3.0/CMakeFiles/CMakeOutput.log".
See also "/home/mdz/Desktop/Orthanc-1.3.0/CMakeFiles/CMakeError.log".

I did try to resolve as follows:

cmake -D CMAKE_CXX_COMPILER="/usr/bin/gcc/" /home/mdz/Desktop/Orthanc-1.3.0
cmake -D CMAKE_C_COMPILER="/usr/bin/gcc/" /home/mdz/Desktop/Orthanc-1.3.0

Also Gcc is up to date

Package gcc-4.8.5-16.el7.x86_64 already installed and latest version

Hello,

The command-line you use is to cross-compile Orthanc for Windows from a Linux host using MinGW.

Use this set of commands instead:

mkdir ~/Orthanc-1.3.0-Build

cd ~/Orthanc-1.3.0-Build

cmake -DSTATIC_BUILD=ON -DSTANDALONE_BUILD=ON -DCMAKE_BUILD_TYPE=Debug ~/Orthanc-1.3.0

make

./Orthanc

You could also use Docker, which avoids you to compile Orthanc by yourself:
http://book.orthanc-server.com/users/docker.html

HTH,
Sébastien-

Hi !

I have been trying to get the Windows version of Orthanc but decided to try to install it on linux. I have been using linux for a while but still a novice. I generally use CentOS but willing to set up a dedicated server on any flavor of linux as long as I can stumble through it and end up with a working system.

I tried several times but now asking for the best solution.

1. I tried Debian first, since there seemed to be an easy path to get Orthanc up and running. I ended up abandoning it since it looked like I was getting into dependency hell to get it installed.

??? :sunglasses: !

I'm really suprised by your experience !
For me (debian 9), just one command line and it's done ! : apt-get install orthanc !

Under Debian 9, add testing repository to install the last version (1.3) :

nano /etc/apt/sources.list

and add something like :

deb Index of /debian/ testing main
deb-src Index of /debian/ testing main

deb Index of /debian-security testing/updates main

then nano /etc/apt/apt.conf.d/80default-distrib
and add :

APT::Default-Release "stable";

and finally :

apt-get -t testing install orthanc;

to select the version only availabled in testing.

B.

I've tried the same on Ubuntu 16.04 and get the same error. I think this is an issue due to the 64-bit system, I can't even install any of the suggested packages: https://packages.ubuntu.com/search?searchon=contents&keywords=i586-mingw32msvc&mode=filename&suite=precise&arch=any Installing the available mingw-64 doesn't help.

It would be nice to be able to compile the server in a 64-bit environment, is there some way of dealing with this? I haven't found any relevant cmake-flag that would solve this.

64-bit compilation is evidently supported by Orthanc. You most probably haven’t installed gcc/g++ for your native architecture. Type:

sudo apt-get install build-essential unzip cmake mercurial \

uuid-dev libcurl4-openssl-dev liblua5.1-0-dev
libgtest-dev libpng-dev libsqlite3-dev libssl-dev libjpeg-dev
zlib1g-dev libdcmtk2-dev libboost-all-dev libwrap0-dev
libcharls-dev libjsoncpp-dev libpugixml-dev

This is explained in the official documentation for Linux compilation:
https://goo.gl/nJpPWf

Sébastien-

Thank you for your swift response. This was my fault, amazingly you do have to follow the manual - this error was not due to the missing packages but to the fact that I wanted to install not using ~/OrthancBuild and ~/Orthanc. I never would have guessed that not finding the compiler is due to using a subfolder in my home directory.

Also, since this seems to work on Ubuntu 16.04 you may want to add that to the instructions. It is good to know that the project is not only in maintenance mode, supporting old distributions.