Mercurial > hg > orthanc
comparison 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 |
comparison
equal
deleted
inserted
replaced
409:63f707278fc8 | 762:45b16f67259c |
---|---|
1 This file is a complement to "INSTALL", which contains instructions | |
2 that are specific to Linux. | |
3 | |
4 | |
5 Static linking for Linux | |
6 ======================== | |
7 | |
8 The most simple way of building Orthanc under Linux consists in | |
9 statically linking against all the third-party dependencies. In this | |
10 case, the system-wide libraries will not be used. The build tool | |
11 (CMake) will download the sources of all the required packages and | |
12 automatically compile them. This process should work on all the Linux | |
13 distributions. | |
14 | |
15 | |
16 To build binaries with debug information: | |
17 | |
18 # cd ~/OrthancBuild | |
19 # cmake -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Debug ~/Orthanc | |
20 # make | |
21 # make doc | |
22 | |
23 | |
24 To build a release version: | |
25 | |
26 # cd ~/OrthancBuild | |
27 # cmake -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Release ~/Orthanc | |
28 # make | |
29 # make doc | |
30 | |
31 | |
32 Note: When the "STATIC_BUILD" option is set to "ON", the build tool | |
33 will not ask you the permission to download packages from the | |
34 Internet. | |
35 | |
36 | |
37 Use system-wide libraries under Linux | |
38 ===================================== | |
39 | |
40 Under Linux, by default, Orthanc links against the shared libraries of | |
41 your system (the "STATIC_BUILD" option is set to "OFF"). This greatly | |
42 speeds up the compilation. This is also required when building | |
43 packages for Linux distributions. Because using system libraries is | |
44 the default behavior, you just have to use: | |
45 | |
46 # cd ~/OrthancBuild | |
47 # cmake -DCMAKE_BUILD_TYPE=Debug ~/Orthanc | |
48 # make | |
49 | |
50 | |
51 However, on some Linux distributions, it is still required to download | |
52 and static link against some third-party dependencies, e.g. when the | |
53 system-wide library is not shipped or is outdated. Because of | |
54 difference in the packaging of the various Linux distribution, it is | |
55 also sometimes required to fine-tune some options. | |
56 | |
57 You will find below build instructions for specific Linux | |
58 distributions. Distributions tagged by "SUPPORTED" are tested by | |
59 Sébastien Jodogne. Distributions tagged by "CONTRIBUTED" come from | |
60 Orthanc users. | |
61 | |
62 | |
63 SUPPORTED - Debian Squeeze (6.x) | |
64 -------------------------------- | |
65 | |
66 # sudo apt-get install build-essential unzip cmake mercurial \ | |
67 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ | |
68 libgoogle-glog-dev libpng-dev libgtest-dev \ | |
69 libsqlite3-dev libssl-dev zlib1g-dev | |
70 | |
71 # cmake -DALLOW_DOWNLOADS=ON \ | |
72 -DUSE_SYSTEM_BOOST=OFF \ | |
73 -DUSE_SYSTEM_DCMTK=OFF \ | |
74 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
75 -DUSE_SYSTEM_JSONCPP=OFF \ | |
76 ~/Orthanc | |
77 | |
78 | |
79 SUPPORTED - Debian Wheezy (7.x) | |
80 ------------------------------- | |
81 | |
82 # sudo apt-get install build-essential unzip cmake mercurial \ | |
83 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ | |
84 libgtest-dev libpng-dev libsqlite3-dev \ | |
85 libssl-dev zlib1g-dev libdcmtk2-dev \ | |
86 libboost-all-dev libwrap0-dev libjsoncpp-dev | |
87 | |
88 # cmake -DALLOW_DOWNLOADS=ON \ | |
89 -DUSE_SYSTEM_GOOGLE_LOG=OFF \ | |
90 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
91 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ | |
92 ~/Orthanc | |
93 | |
94 | |
95 SUPPORTED - Debian Jessie/Sid | |
96 ----------------------------- | |
97 | |
98 # sudo apt-get install build-essential unzip cmake mercurial \ | |
99 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ | |
100 libgoogle-glog-dev libgtest-dev libpng-dev \ | |
101 libsqlite3-dev libssl-dev zlib1g-dev libdcmtk2-dev \ | |
102 libboost-all-dev libwrap0-dev libjsoncpp-dev | |
103 | |
104 # cmake -DALLOW_DOWNLOADS=ON \ | |
105 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
106 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ | |
107 ~/Orthanc | |
108 | |
109 Note: Have also a look at the official package: | |
110 http://anonscm.debian.org/viewvc/debian-med/trunk/packages/orthanc/trunk/debian/ | |
111 | |
112 | |
113 SUPPORTED - Ubuntu 12.04 LTS | |
114 ---------------------------- | |
115 | |
116 # sudo apt-get install build-essential unzip cmake mercurial \ | |
117 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ | |
118 libgtest-dev libpng-dev libsqlite3-dev libssl-dev \ | |
119 zlib1g-dev libdcmtk2-dev libboost-all-dev libwrap0-dev | |
120 | |
121 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ | |
122 -DALLOW_DOWNLOADS=ON \ | |
123 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
124 -DUSE_SYSTEM_JSONCPP=OFF \ | |
125 -DUSE_SYSTEM_GOOGLE_LOG=OFF \ | |
126 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ | |
127 ~/Orthanc | |
128 | |
129 | |
130 SUPPORTED - Ubuntu 12.10 | |
131 ------------------------ | |
132 | |
133 # sudo apt-get install build-essential unzip cmake mercurial \ | |
134 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ | |
135 libgoogle-glog-dev libgtest-dev libpng-dev \ | |
136 libsqlite3-dev libssl-dev zlib1g-dev \ | |
137 libdcmtk2-dev libboost-all-dev libwrap0-dev | |
138 | |
139 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ | |
140 -DALLOW_DOWNLOADS=ON \ | |
141 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
142 -DUSE_SYSTEM_JSONCPP=OFF \ | |
143 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ | |
144 ~/Orthanc | |
145 | |
146 | |
147 SUPPORTED - Ubuntu 13.10 | |
148 ------------------------ | |
149 | |
150 # sudo apt-get install build-essential unzip cmake mercurial \ | |
151 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ | |
152 libgoogle-glog-dev libgtest-dev libpng-dev \ | |
153 libsqlite3-dev libssl-dev zlib1g-dev \ | |
154 libdcmtk2-dev libboost-all-dev libwrap0-dev libjsoncpp-dev | |
155 | |
156 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ | |
157 -DALLOW_DOWNLOADS=ON \ | |
158 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
159 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ | |
160 ~/Orthanc | |
161 | |
162 | |
163 | |
164 SUPPORTED - Fedora 18/19/20 | |
165 --------------------------- | |
166 | |
167 # sudo yum install make automake gcc gcc-c++ python cmake \ | |
168 boost-devel curl-devel dcmtk-devel glog-devel \ | |
169 gtest-devel libpng-devel libsqlite3x-devel libuuid-devel \ | |
170 mongoose-devel openssl-devel jsoncpp-devel lua-devel | |
171 | |
172 # cmake ~/Orthanc | |
173 | |
174 Note: Have also a look at the official package: | |
175 http://pkgs.fedoraproject.org/cgit/orthanc.git/tree/?h=f18 | |
176 | |
177 | |
178 | |
179 | |
180 | |
181 Other Linux distributions? | |
182 -------------------------- | |
183 | |
184 Please send us your build instructions (by a mail to | |
185 s.jodogne@gmail.com)! | |
186 | |
187 You can find build instructions for Orthanc up to 0.7.0 on the | |
188 following Wiki page: | |
189 https://code.google.com/p/orthanc/wiki/LinuxCompilationUpTo070 | |
190 | |
191 These instructions will not work as such beyond Orthanc 0.7.0, but | |
192 they might give indications. | |
193 | |
194 | |
195 | |
196 | |
197 Using ccache | |
198 ============ | |
199 | |
200 Under Linux, you also have the opportunity to use "ccache" to | |
201 dramatically decrease the compilation time when rebuilding | |
202 Orthanc. This is especially useful for developers. To this end, you | |
203 would use: | |
204 | |
205 # CC="ccache gcc" CXX="ccache g++" cmake ~/Orthanc [Other Options] |