Mercurial > hg > orthanc
annotate LinuxCompilation.txt @ 1159:8f9d49192815 db-changes
speeding up db schema
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 17 Sep 2014 10:25:41 +0200 |
parents | fe0ab24f4db1 |
children | 6502517fd4af |
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 \ |
1077 | 112 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
|
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 \ |
1078 | 117 -DDCMTK_LIBRARIES=dcmjpls \ |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
118 ~/Orthanc |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
119 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
120 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
|
121 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
|
122 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
123 |
645
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
124 SUPPORTED - Ubuntu 12.04 LTS |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
125 ---------------------------- |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
126 |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
127 # 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
|
128 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
|
129 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
|
130 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
|
131 |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
132 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
133 -DALLOW_DOWNLOADS=ON \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
134 -DUSE_SYSTEM_MONGOOSE=OFF \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
135 -DUSE_SYSTEM_JSONCPP=OFF \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
136 -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
|
137 -DUSE_SYSTEM_PUGIXML=OFF \ |
645
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
138 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
139 ~/Orthanc |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
140 |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
141 |
635 | 142 SUPPORTED - Ubuntu 12.10 |
143 ------------------------ | |
144 | |
145 # sudo apt-get install build-essential unzip cmake mercurial \ | |
146 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ | |
147 libgoogle-glog-dev libgtest-dev libpng-dev \ | |
148 libsqlite3-dev libssl-dev zlib1g-dev \ | |
842 | 149 libdcmtk2-dev libboost-all-dev libwrap0-dev libcharls-dev |
150 | |
854
ff530685e46a
fast version of image copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
842
diff
changeset
|
151 With JPEG: |
635 | 152 |
842 | 153 # cmake "-DDCMTK_LIBRARIES=CharLS;dcmjpls;wrap;oflog" \ |
154 -DALLOW_DOWNLOADS=ON \ | |
155 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
156 -DUSE_SYSTEM_JSONCPP=OFF \ | |
157 -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
|
158 -DUSE_SYSTEM_PUGIXML=OFF \ |
842 | 159 ~/Orthanc |
160 | |
161 | |
854
ff530685e46a
fast version of image copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
842
diff
changeset
|
162 Without JPEG: |
842 | 163 |
164 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ | |
635 | 165 -DALLOW_DOWNLOADS=ON \ |
166 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
167 -DUSE_SYSTEM_JSONCPP=OFF \ | |
638 | 168 -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
|
169 -DUSE_SYSTEM_PUGIXML=OFF \ |
854
ff530685e46a
fast version of image copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
842
diff
changeset
|
170 -DENABLE_JPEG=OFF \ |
ff530685e46a
fast version of image copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
842
diff
changeset
|
171 -DENABLE_JPEG_LOSSLESS=OFF \ |
635 | 172 ~/Orthanc |
173 | |
174 | |
700 | 175 SUPPORTED - Ubuntu 13.10 |
176 ------------------------ | |
177 | |
178 # sudo apt-get install build-essential unzip cmake mercurial \ | |
179 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ | |
180 libgoogle-glog-dev libgtest-dev libpng-dev \ | |
181 libsqlite3-dev libssl-dev zlib1g-dev \ | |
182 libdcmtk2-dev libboost-all-dev libwrap0-dev libjsoncpp-dev | |
183 | |
184 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ | |
185 -DALLOW_DOWNLOADS=ON \ | |
186 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
187 -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
|
188 -DUSE_SYSTEM_PUGIXML=OFF \ |
875 | 189 -DENABLE_JPEG=OFF \ |
190 -DENABLE_JPEG_LOSSLESS=OFF \ | |
700 | 191 ~/Orthanc |
192 | |
193 | |
634 | 194 |
1078 | 195 SUPPORTED - Fedora 19/20 |
196 ------------------------ | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
197 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
198 # 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
|
199 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
|
200 gtest-devel libpng-devel libsqlite3x-devel libuuid-devel \ |
1078 | 201 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
|
202 |
1150
fe0ab24f4db1
preparing for release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1078
diff
changeset
|
203 # cmake "-DDCMTK_LIBRARIES=CharLS" \ |
fe0ab24f4db1
preparing for release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1078
diff
changeset
|
204 -DSYSTEM_MONGOOSE_USE_CALLBACKS=OFF \ |
fe0ab24f4db1
preparing for release
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1078
diff
changeset
|
205 ~/Orthanc |
875 | 206 |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
207 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
|
208 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
|
209 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
210 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
211 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
212 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
213 |
634 | 214 Other Linux distributions? |
215 -------------------------- | |
216 | |
217 Please send us your build instructions (by a mail to | |
218 s.jodogne@gmail.com)! | |
219 | |
220 You can find build instructions for Orthanc up to 0.7.0 on the | |
221 following Wiki page: | |
222 https://code.google.com/p/orthanc/wiki/LinuxCompilationUpTo070 | |
223 | |
224 These instructions will not work as such beyond Orthanc 0.7.0, but | |
225 they might give indications. | |
226 | |
227 | |
228 | |
229 | |
230 Using ccache | |
231 ============ | |
232 | |
233 Under Linux, you also have the opportunity to use "ccache" to | |
234 dramatically decrease the compilation time when rebuilding | |
235 Orthanc. This is especially useful for developers. To this end, you | |
236 would use: | |
237 | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
238 # CC="ccache gcc" CXX="ccache g++" cmake ~/Orthanc [Other Options] |