Mercurial > hg > orthanc
diff LinuxCompilation.txt @ 762:45b16f67259c lua-scripting
integration mainline -> lua-scripting
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 22 Apr 2014 16:47:21 +0200 |
parents | 7019922daf3d |
children | 256e1530eb0f |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LinuxCompilation.txt Tue Apr 22 16:47:21 2014 +0200 @@ -0,0 +1,205 @@ +This file is a complement to "INSTALL", which contains instructions +that are specific to Linux. + + +Static linking for Linux +======================== + +The most simple way of building Orthanc under Linux consists in +statically linking against all the third-party dependencies. In this +case, the system-wide libraries will not be used. The build tool +(CMake) will download the sources of all the required packages and +automatically compile them. This process should work on all the Linux +distributions. + + +To build binaries with debug information: + +# cd ~/OrthancBuild +# cmake -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Debug ~/Orthanc +# make +# make doc + + +To build a release version: + +# cd ~/OrthancBuild +# cmake -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Release ~/Orthanc +# make +# make doc + + +Note: When the "STATIC_BUILD" option is set to "ON", the build tool +will not ask you the permission to download packages from the +Internet. + + +Use system-wide libraries under Linux +===================================== + +Under Linux, by default, Orthanc links against the shared libraries of +your system (the "STATIC_BUILD" option is set to "OFF"). This greatly +speeds up the compilation. This is also required when building +packages for Linux distributions. Because using system libraries is +the default behavior, you just have to use: + +# cd ~/OrthancBuild +# cmake -DCMAKE_BUILD_TYPE=Debug ~/Orthanc +# make + + +However, on some Linux distributions, it is still required to download +and static link against some third-party dependencies, e.g. when the +system-wide library is not shipped or is outdated. Because of +difference in the packaging of the various Linux distribution, it is +also sometimes required to fine-tune some options. + +You will find below build instructions for specific Linux +distributions. Distributions tagged by "SUPPORTED" are tested by +Sébastien Jodogne. Distributions tagged by "CONTRIBUTED" come from +Orthanc users. + + +SUPPORTED - Debian Squeeze (6.x) +-------------------------------- + +# sudo apt-get install build-essential unzip cmake mercurial \ + uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ + libgoogle-glog-dev libpng-dev libgtest-dev \ + libsqlite3-dev libssl-dev zlib1g-dev + +# cmake -DALLOW_DOWNLOADS=ON \ + -DUSE_SYSTEM_BOOST=OFF \ + -DUSE_SYSTEM_DCMTK=OFF \ + -DUSE_SYSTEM_MONGOOSE=OFF \ + -DUSE_SYSTEM_JSONCPP=OFF \ + ~/Orthanc + + +SUPPORTED - Debian Wheezy (7.x) +------------------------------- + +# 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 zlib1g-dev libdcmtk2-dev \ + libboost-all-dev libwrap0-dev libjsoncpp-dev + +# cmake -DALLOW_DOWNLOADS=ON \ + -DUSE_SYSTEM_GOOGLE_LOG=OFF \ + -DUSE_SYSTEM_MONGOOSE=OFF \ + -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ + ~/Orthanc + + +SUPPORTED - Debian Jessie/Sid +----------------------------- + +# sudo apt-get install build-essential unzip cmake mercurial \ + uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ + libgoogle-glog-dev libgtest-dev libpng-dev \ + libsqlite3-dev libssl-dev zlib1g-dev libdcmtk2-dev \ + libboost-all-dev libwrap0-dev libjsoncpp-dev + +# cmake -DALLOW_DOWNLOADS=ON \ + -DUSE_SYSTEM_MONGOOSE=OFF \ + -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ + ~/Orthanc + +Note: Have also a look at the official package: +http://anonscm.debian.org/viewvc/debian-med/trunk/packages/orthanc/trunk/debian/ + + +SUPPORTED - Ubuntu 12.04 LTS +---------------------------- + +# 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 \ + zlib1g-dev libdcmtk2-dev libboost-all-dev libwrap0-dev + +# cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ + -DALLOW_DOWNLOADS=ON \ + -DUSE_SYSTEM_MONGOOSE=OFF \ + -DUSE_SYSTEM_JSONCPP=OFF \ + -DUSE_SYSTEM_GOOGLE_LOG=OFF \ + -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ + ~/Orthanc + + +SUPPORTED - Ubuntu 12.10 +------------------------ + +# sudo apt-get install build-essential unzip cmake mercurial \ + uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ + libgoogle-glog-dev libgtest-dev libpng-dev \ + libsqlite3-dev libssl-dev zlib1g-dev \ + libdcmtk2-dev libboost-all-dev libwrap0-dev + +# cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ + -DALLOW_DOWNLOADS=ON \ + -DUSE_SYSTEM_MONGOOSE=OFF \ + -DUSE_SYSTEM_JSONCPP=OFF \ + -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ + ~/Orthanc + + +SUPPORTED - Ubuntu 13.10 +------------------------ + +# sudo apt-get install build-essential unzip cmake mercurial \ + uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ + libgoogle-glog-dev libgtest-dev libpng-dev \ + libsqlite3-dev libssl-dev zlib1g-dev \ + libdcmtk2-dev libboost-all-dev libwrap0-dev libjsoncpp-dev + +# cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ + -DALLOW_DOWNLOADS=ON \ + -DUSE_SYSTEM_MONGOOSE=OFF \ + -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ + ~/Orthanc + + + +SUPPORTED - Fedora 18/19/20 +--------------------------- + +# sudo yum install make automake gcc gcc-c++ python cmake \ + boost-devel curl-devel dcmtk-devel glog-devel \ + gtest-devel libpng-devel libsqlite3x-devel libuuid-devel \ + mongoose-devel openssl-devel jsoncpp-devel lua-devel + +# cmake ~/Orthanc + +Note: Have also a look at the official package: +http://pkgs.fedoraproject.org/cgit/orthanc.git/tree/?h=f18 + + + + + +Other Linux distributions? +-------------------------- + +Please send us your build instructions (by a mail to +s.jodogne@gmail.com)! + +You can find build instructions for Orthanc up to 0.7.0 on the +following Wiki page: +https://code.google.com/p/orthanc/wiki/LinuxCompilationUpTo070 + +These instructions will not work as such beyond Orthanc 0.7.0, but +they might give indications. + + + + +Using ccache +============ + +Under Linux, you also have the opportunity to use "ccache" to +dramatically decrease the compilation time when rebuilding +Orthanc. This is especially useful for developers. To this end, you +would use: + +# CC="ccache gcc" CXX="ccache g++" cmake ~/Orthanc [Other Options]