Mercurial > hg > orthanc
annotate LinuxCompilation.txt @ 957:63973b76a51f
detection of encoding
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 25 Jun 2014 21:21:18 +0200 |
parents | 9c7f5fd8a7a2 |
children | 00f9f36bcd94 |
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 \ | |
875 | 80 -DENABLE_JPEG=OFF \ |
81 -DENABLE_JPEG_LOSSLESS=OFF \ | |
634 | 82 ~/Orthanc |
83 | |
84 | |
677 | 85 SUPPORTED - Debian Wheezy (7.x) |
86 ------------------------------- | |
87 | |
88 # sudo apt-get install build-essential unzip cmake mercurial \ | |
89 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ | |
90 libgtest-dev libpng-dev libsqlite3-dev \ | |
91 libssl-dev zlib1g-dev libdcmtk2-dev \ | |
678 | 92 libboost-all-dev libwrap0-dev libjsoncpp-dev |
677 | 93 |
94 # cmake -DALLOW_DOWNLOADS=ON \ | |
95 -DUSE_SYSTEM_GOOGLE_LOG=OFF \ | |
96 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
97 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ | |
875 | 98 -DENABLE_JPEG=OFF \ |
99 -DENABLE_JPEG_LOSSLESS=OFF \ | |
677 | 100 ~/Orthanc |
101 | |
102 | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
103 SUPPORTED - Debian Jessie/Sid |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
104 ----------------------------- |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
105 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
106 # 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
|
107 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
|
108 libgoogle-glog-dev libgtest-dev libpng-dev \ |
678 | 109 libsqlite3-dev libssl-dev zlib1g-dev libdcmtk2-dev \ |
110 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
|
111 |
651 | 112 # cmake -DALLOW_DOWNLOADS=ON \ |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
113 -DUSE_SYSTEM_MONGOOSE=OFF \ |
638 | 114 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ |
875 | 115 -DENABLE_JPEG=OFF \ |
116 -DENABLE_JPEG_LOSSLESS=OFF \ | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
117 ~/Orthanc |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
118 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
119 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
|
120 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
|
121 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
122 |
645
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
123 SUPPORTED - Ubuntu 12.04 LTS |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
124 ---------------------------- |
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 # 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
|
127 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
|
128 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
|
129 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
|
130 |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
131 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
132 -DALLOW_DOWNLOADS=ON \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
133 -DUSE_SYSTEM_MONGOOSE=OFF \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
134 -DUSE_SYSTEM_JSONCPP=OFF \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
135 -DUSE_SYSTEM_GOOGLE_LOG=OFF \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
136 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ |
875 | 137 -DENABLE_JPEG=OFF \ |
138 -DENABLE_JPEG_LOSSLESS=OFF \ | |
645
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 \ | |
158 ~/Orthanc | |
159 | |
160 | |
854
ff530685e46a
fast version of image copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
842
diff
changeset
|
161 Without JPEG: |
842 | 162 |
163 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ | |
635 | 164 -DALLOW_DOWNLOADS=ON \ |
165 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
166 -DUSE_SYSTEM_JSONCPP=OFF \ | |
638 | 167 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ |
854
ff530685e46a
fast version of image copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
842
diff
changeset
|
168 -DENABLE_JPEG=OFF \ |
ff530685e46a
fast version of image copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
842
diff
changeset
|
169 -DENABLE_JPEG_LOSSLESS=OFF \ |
635 | 170 ~/Orthanc |
171 | |
172 | |
700 | 173 SUPPORTED - Ubuntu 13.10 |
174 ------------------------ | |
175 | |
176 # sudo apt-get install build-essential unzip cmake mercurial \ | |
177 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ | |
178 libgoogle-glog-dev libgtest-dev libpng-dev \ | |
179 libsqlite3-dev libssl-dev zlib1g-dev \ | |
180 libdcmtk2-dev libboost-all-dev libwrap0-dev libjsoncpp-dev | |
181 | |
182 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ | |
183 -DALLOW_DOWNLOADS=ON \ | |
184 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
185 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ | |
875 | 186 -DENABLE_JPEG=OFF \ |
187 -DENABLE_JPEG_LOSSLESS=OFF \ | |
700 | 188 ~/Orthanc |
189 | |
190 | |
634 | 191 |
736 | 192 SUPPORTED - Fedora 18/19/20 |
193 --------------------------- | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
194 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
195 # 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
|
196 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
|
197 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
|
198 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
|
199 |
875 | 200 # cmake -DENABLE_JPEG=OFF \ |
201 -DENABLE_JPEG_LOSSLESS=OFF \ | |
202 ~/Orthanc | |
203 | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
204 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
|
205 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
|
206 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
207 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
208 |
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 |
634 | 211 Other Linux distributions? |
212 -------------------------- | |
213 | |
214 Please send us your build instructions (by a mail to | |
215 s.jodogne@gmail.com)! | |
216 | |
217 You can find build instructions for Orthanc up to 0.7.0 on the | |
218 following Wiki page: | |
219 https://code.google.com/p/orthanc/wiki/LinuxCompilationUpTo070 | |
220 | |
221 These instructions will not work as such beyond Orthanc 0.7.0, but | |
222 they might give indications. | |
223 | |
224 | |
225 | |
226 | |
227 Using ccache | |
228 ============ | |
229 | |
230 Under Linux, you also have the opportunity to use "ccache" to | |
231 dramatically decrease the compilation time when rebuilding | |
232 Orthanc. This is especially useful for developers. To this end, you | |
233 would use: | |
234 | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
235 # CC="ccache gcc" CXX="ccache g++" cmake ~/Orthanc [Other Options] |