Mercurial > hg > orthanc
annotate LinuxCompilation.txt @ 1060:303eb5e09a4b
pch
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 25 Jul 2014 14:29:55 +0200 |
parents | 00f9f36bcd94 |
children | 7db0632ebb56 |
rev | line source |
---|---|
634 | 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 | |
936
9c7f5fd8a7a2
build instructions for Mac OS X
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
875
diff
changeset
|
15 We make the assumption that Orthanc source code is placed in the |
9c7f5fd8a7a2
build instructions for Mac OS X
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
875
diff
changeset
|
16 folder "~/Orthanc" and that the binaries will be compiled to |
9c7f5fd8a7a2
build instructions for Mac OS X
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
875
diff
changeset
|
17 "~/OrthancBuild". |
9c7f5fd8a7a2
build instructions for Mac OS X
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
875
diff
changeset
|
18 |
634 | 19 |
20 To build binaries with debug information: | |
21 | |
22 # cd ~/OrthancBuild | |
23 # cmake -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Debug ~/Orthanc | |
24 # make | |
25 # make doc | |
26 | |
27 | |
28 To build a release version: | |
29 | |
30 # cd ~/OrthancBuild | |
31 # cmake -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Release ~/Orthanc | |
32 # make | |
33 # make doc | |
34 | |
35 | |
36 Note: When the "STATIC_BUILD" option is set to "ON", the build tool | |
37 will not ask you the permission to download packages from the | |
38 Internet. | |
39 | |
40 | |
41 Use system-wide libraries under Linux | |
42 ===================================== | |
43 | |
44 Under Linux, by default, Orthanc links against the shared libraries of | |
45 your system (the "STATIC_BUILD" option is set to "OFF"). This greatly | |
46 speeds up the compilation. This is also required when building | |
47 packages for Linux distributions. Because using system libraries is | |
48 the default behavior, you just have to use: | |
49 | |
50 # cd ~/OrthancBuild | |
51 # cmake -DCMAKE_BUILD_TYPE=Debug ~/Orthanc | |
52 # make | |
53 | |
54 | |
55 However, on some Linux distributions, it is still required to download | |
56 and static link against some third-party dependencies, e.g. when the | |
57 system-wide library is not shipped or is outdated. Because of | |
58 difference in the packaging of the various Linux distribution, it is | |
59 also sometimes required to fine-tune some options. | |
60 | |
61 You will find below build instructions for specific Linux | |
62 distributions. Distributions tagged by "SUPPORTED" are tested by | |
63 Sébastien Jodogne. Distributions tagged by "CONTRIBUTED" come from | |
64 Orthanc users. | |
65 | |
66 | |
677 | 67 SUPPORTED - Debian Squeeze (6.x) |
634 | 68 -------------------------------- |
69 | |
70 # sudo apt-get install build-essential unzip cmake mercurial \ | |
635 | 71 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ |
640 | 72 libgoogle-glog-dev libpng-dev libgtest-dev \ |
635 | 73 libsqlite3-dev libssl-dev zlib1g-dev |
634 | 74 |
75 # cmake -DALLOW_DOWNLOADS=ON \ | |
76 -DUSE_SYSTEM_BOOST=OFF \ | |
77 -DUSE_SYSTEM_DCMTK=OFF \ | |
78 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
79 -DUSE_SYSTEM_JSONCPP=OFF \ | |
1046
00f9f36bcd94
on-the-fly conversion of JSON to XML according to HTTP Accept
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
936
diff
changeset
|
80 -DUSE_SYSTEM_PUGIXML=OFF \ |
875 | 81 -DENABLE_JPEG=OFF \ |
82 -DENABLE_JPEG_LOSSLESS=OFF \ | |
634 | 83 ~/Orthanc |
84 | |
85 | |
677 | 86 SUPPORTED - Debian Wheezy (7.x) |
87 ------------------------------- | |
88 | |
89 # sudo apt-get install build-essential unzip cmake mercurial \ | |
90 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ | |
91 libgtest-dev libpng-dev libsqlite3-dev \ | |
92 libssl-dev zlib1g-dev libdcmtk2-dev \ | |
678 | 93 libboost-all-dev libwrap0-dev libjsoncpp-dev |
677 | 94 |
95 # cmake -DALLOW_DOWNLOADS=ON \ | |
96 -DUSE_SYSTEM_GOOGLE_LOG=OFF \ | |
97 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
98 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ | |
1046
00f9f36bcd94
on-the-fly conversion of JSON to XML according to HTTP Accept
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
936
diff
changeset
|
99 -DUSE_SYSTEM_PUGIXML=OFF \ |
875 | 100 -DENABLE_JPEG=OFF \ |
101 -DENABLE_JPEG_LOSSLESS=OFF \ | |
677 | 102 ~/Orthanc |
103 | |
104 | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
105 SUPPORTED - Debian Jessie/Sid |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
106 ----------------------------- |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
107 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
108 # sudo apt-get install build-essential unzip cmake mercurial \ |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
109 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
110 libgoogle-glog-dev libgtest-dev libpng-dev \ |
678 | 111 libsqlite3-dev libssl-dev zlib1g-dev libdcmtk2-dev \ |
112 libboost-all-dev libwrap0-dev libjsoncpp-dev | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
113 |
651 | 114 # cmake -DALLOW_DOWNLOADS=ON \ |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
115 -DUSE_SYSTEM_MONGOOSE=OFF \ |
638 | 116 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ |
1046
00f9f36bcd94
on-the-fly conversion of JSON to XML according to HTTP Accept
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
936
diff
changeset
|
117 -DUSE_SYSTEM_PUGIXML=OFF \ |
875 | 118 -DENABLE_JPEG=OFF \ |
119 -DENABLE_JPEG_LOSSLESS=OFF \ | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
120 ~/Orthanc |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
121 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
122 Note: Have also a look at the official package: |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
123 http://anonscm.debian.org/viewvc/debian-med/trunk/packages/orthanc/trunk/debian/ |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
124 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
125 |
645
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
126 SUPPORTED - Ubuntu 12.04 LTS |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
127 ---------------------------- |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
128 |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
129 # sudo apt-get install build-essential unzip cmake mercurial \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
130 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
131 libgtest-dev libpng-dev libsqlite3-dev libssl-dev \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
132 zlib1g-dev libdcmtk2-dev libboost-all-dev libwrap0-dev |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
133 |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
134 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
135 -DALLOW_DOWNLOADS=ON \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
136 -DUSE_SYSTEM_MONGOOSE=OFF \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
137 -DUSE_SYSTEM_JSONCPP=OFF \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
138 -DUSE_SYSTEM_GOOGLE_LOG=OFF \ |
1046
00f9f36bcd94
on-the-fly conversion of JSON to XML according to HTTP Accept
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
936
diff
changeset
|
139 -DUSE_SYSTEM_PUGIXML=OFF \ |
645
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
140 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ |
875 | 141 -DENABLE_JPEG=OFF \ |
142 -DENABLE_JPEG_LOSSLESS=OFF \ | |
645
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
143 ~/Orthanc |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
144 |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
145 |
635 | 146 SUPPORTED - Ubuntu 12.10 |
147 ------------------------ | |
148 | |
149 # sudo apt-get install build-essential unzip cmake mercurial \ | |
150 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ | |
151 libgoogle-glog-dev libgtest-dev libpng-dev \ | |
152 libsqlite3-dev libssl-dev zlib1g-dev \ | |
842 | 153 libdcmtk2-dev libboost-all-dev libwrap0-dev libcharls-dev |
154 | |
854
ff530685e46a
fast version of image copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
842
diff
changeset
|
155 With JPEG: |
635 | 156 |
842 | 157 # cmake "-DDCMTK_LIBRARIES=CharLS;dcmjpls;wrap;oflog" \ |
158 -DALLOW_DOWNLOADS=ON \ | |
159 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
160 -DUSE_SYSTEM_JSONCPP=OFF \ | |
161 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ | |
1046
00f9f36bcd94
on-the-fly conversion of JSON to XML according to HTTP Accept
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
936
diff
changeset
|
162 -DUSE_SYSTEM_PUGIXML=OFF \ |
842 | 163 ~/Orthanc |
164 | |
165 | |
854
ff530685e46a
fast version of image copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
842
diff
changeset
|
166 Without JPEG: |
842 | 167 |
168 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ | |
635 | 169 -DALLOW_DOWNLOADS=ON \ |
170 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
171 -DUSE_SYSTEM_JSONCPP=OFF \ | |
638 | 172 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ |
1046
00f9f36bcd94
on-the-fly conversion of JSON to XML according to HTTP Accept
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
936
diff
changeset
|
173 -DUSE_SYSTEM_PUGIXML=OFF \ |
854
ff530685e46a
fast version of image copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
842
diff
changeset
|
174 -DENABLE_JPEG=OFF \ |
ff530685e46a
fast version of image copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
842
diff
changeset
|
175 -DENABLE_JPEG_LOSSLESS=OFF \ |
635 | 176 ~/Orthanc |
177 | |
178 | |
700 | 179 SUPPORTED - Ubuntu 13.10 |
180 ------------------------ | |
181 | |
182 # sudo apt-get install build-essential unzip cmake mercurial \ | |
183 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ | |
184 libgoogle-glog-dev libgtest-dev libpng-dev \ | |
185 libsqlite3-dev libssl-dev zlib1g-dev \ | |
186 libdcmtk2-dev libboost-all-dev libwrap0-dev libjsoncpp-dev | |
187 | |
188 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ | |
189 -DALLOW_DOWNLOADS=ON \ | |
190 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
191 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ | |
1046
00f9f36bcd94
on-the-fly conversion of JSON to XML according to HTTP Accept
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
936
diff
changeset
|
192 -DUSE_SYSTEM_PUGIXML=OFF \ |
875 | 193 -DENABLE_JPEG=OFF \ |
194 -DENABLE_JPEG_LOSSLESS=OFF \ | |
700 | 195 ~/Orthanc |
196 | |
197 | |
634 | 198 |
736 | 199 SUPPORTED - Fedora 18/19/20 |
200 --------------------------- | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
201 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
202 # sudo yum install make automake gcc gcc-c++ python cmake \ |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
203 boost-devel curl-devel dcmtk-devel glog-devel \ |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
204 gtest-devel libpng-devel libsqlite3x-devel libuuid-devel \ |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
205 mongoose-devel openssl-devel jsoncpp-devel lua-devel |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
206 |
875 | 207 # cmake -DENABLE_JPEG=OFF \ |
208 -DENABLE_JPEG_LOSSLESS=OFF \ | |
209 ~/Orthanc | |
210 | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
211 Note: Have also a look at the official package: |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
212 http://pkgs.fedoraproject.org/cgit/orthanc.git/tree/?h=f18 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
213 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
214 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
215 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
216 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
217 |
634 | 218 Other Linux distributions? |
219 -------------------------- | |
220 | |
221 Please send us your build instructions (by a mail to | |
222 s.jodogne@gmail.com)! | |
223 | |
224 You can find build instructions for Orthanc up to 0.7.0 on the | |
225 following Wiki page: | |
226 https://code.google.com/p/orthanc/wiki/LinuxCompilationUpTo070 | |
227 | |
228 These instructions will not work as such beyond Orthanc 0.7.0, but | |
229 they might give indications. | |
230 | |
231 | |
232 | |
233 | |
234 Using ccache | |
235 ============ | |
236 | |
237 Under Linux, you also have the opportunity to use "ccache" to | |
238 dramatically decrease the compilation time when rebuilding | |
239 Orthanc. This is especially useful for developers. To this end, you | |
240 would use: | |
241 | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
242 # CC="ccache gcc" CXX="ccache g++" cmake ~/Orthanc [Other Options] |