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