Mercurial > hg > orthanc
annotate LinuxCompilation.txt @ 882:c9034d80775d jpeg
close jpeg branch
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 14 Jun 2014 15:44:28 +0200 |
parents | ff530685e46a |
children | d21031a7a6e4 |
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 | |
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 | |
677 | 63 SUPPORTED - Debian Squeeze (6.x) |
634 | 64 -------------------------------- |
65 | |
66 # sudo apt-get install build-essential unzip cmake mercurial \ | |
635 | 67 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ |
640 | 68 libgoogle-glog-dev libpng-dev libgtest-dev \ |
635 | 69 libsqlite3-dev libssl-dev zlib1g-dev |
634 | 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 | |
677 | 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 \ | |
678 | 86 libboost-all-dev libwrap0-dev libjsoncpp-dev |
677 | 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 | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
95 SUPPORTED - Debian Jessie/Sid |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
96 ----------------------------- |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
97 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
98 # 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
|
99 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
|
100 libgoogle-glog-dev libgtest-dev libpng-dev \ |
678 | 101 libsqlite3-dev libssl-dev zlib1g-dev libdcmtk2-dev \ |
102 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
|
103 |
651 | 104 # cmake -DALLOW_DOWNLOADS=ON \ |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
105 -DUSE_SYSTEM_MONGOOSE=OFF \ |
638 | 106 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
107 ~/Orthanc |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
108 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
109 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
|
110 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
|
111 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
112 |
645
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
113 SUPPORTED - Ubuntu 12.04 LTS |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
114 ---------------------------- |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
115 |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
116 # 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
|
117 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
|
118 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
|
119 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
|
120 |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
121 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
122 -DALLOW_DOWNLOADS=ON \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
123 -DUSE_SYSTEM_MONGOOSE=OFF \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
124 -DUSE_SYSTEM_JSONCPP=OFF \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
125 -DUSE_SYSTEM_GOOGLE_LOG=OFF \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
126 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
127 ~/Orthanc |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
128 |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
129 |
635 | 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 \ | |
842 | 137 libdcmtk2-dev libboost-all-dev libwrap0-dev libcharls-dev |
138 | |
854
ff530685e46a
fast version of image copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
842
diff
changeset
|
139 With JPEG: |
635 | 140 |
842 | 141 # cmake "-DDCMTK_LIBRARIES=CharLS;dcmjpls;wrap;oflog" \ |
142 -DALLOW_DOWNLOADS=ON \ | |
143 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
144 -DUSE_SYSTEM_JSONCPP=OFF \ | |
145 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ | |
146 ~/Orthanc | |
147 | |
148 | |
854
ff530685e46a
fast version of image copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
842
diff
changeset
|
149 Without JPEG: |
842 | 150 |
151 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ | |
635 | 152 -DALLOW_DOWNLOADS=ON \ |
153 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
154 -DUSE_SYSTEM_JSONCPP=OFF \ | |
638 | 155 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ |
854
ff530685e46a
fast version of image copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
842
diff
changeset
|
156 -DENABLE_JPEG=OFF \ |
ff530685e46a
fast version of image copy
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
842
diff
changeset
|
157 -DENABLE_JPEG_LOSSLESS=OFF \ |
635 | 158 ~/Orthanc |
159 | |
160 | |
700 | 161 SUPPORTED - Ubuntu 13.10 |
162 ------------------------ | |
163 | |
164 # sudo apt-get install build-essential unzip cmake mercurial \ | |
165 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ | |
166 libgoogle-glog-dev libgtest-dev libpng-dev \ | |
167 libsqlite3-dev libssl-dev zlib1g-dev \ | |
168 libdcmtk2-dev libboost-all-dev libwrap0-dev libjsoncpp-dev | |
169 | |
170 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ | |
171 -DALLOW_DOWNLOADS=ON \ | |
172 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
173 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ | |
174 ~/Orthanc | |
175 | |
176 | |
634 | 177 |
736 | 178 SUPPORTED - Fedora 18/19/20 |
179 --------------------------- | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
180 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
181 # 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
|
182 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
|
183 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
|
184 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
|
185 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
186 # cmake ~/Orthanc |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
187 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
188 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
|
189 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
|
190 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
191 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
192 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
193 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
194 |
634 | 195 Other Linux distributions? |
196 -------------------------- | |
197 | |
198 Please send us your build instructions (by a mail to | |
199 s.jodogne@gmail.com)! | |
200 | |
201 You can find build instructions for Orthanc up to 0.7.0 on the | |
202 following Wiki page: | |
203 https://code.google.com/p/orthanc/wiki/LinuxCompilationUpTo070 | |
204 | |
205 These instructions will not work as such beyond Orthanc 0.7.0, but | |
206 they might give indications. | |
207 | |
208 | |
209 | |
210 | |
211 Using ccache | |
212 ============ | |
213 | |
214 Under Linux, you also have the opportunity to use "ccache" to | |
215 dramatically decrease the compilation time when rebuilding | |
216 Orthanc. This is especially useful for developers. To this end, you | |
217 would use: | |
218 | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
219 # CC="ccache gcc" CXX="ccache g++" cmake ~/Orthanc [Other Options] |