Mercurial > hg > orthanc
annotate LinuxCompilation.txt @ 2172:84d1d392a9ab
GenerateUuid() not available in sandboxed environments
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 23 Nov 2016 12:06:00 +0100 |
parents | 630606097798 |
children | 741765ec8374 |
rev | line source |
---|---|
634 | 1 This file is a complement to "INSTALL", which contains instructions |
2086 | 2 that are specific to GNU/Linux. |
634 | 3 |
4 | |
2086 | 5 Static linking for GNU/Linux |
6 ============================ | |
634 | 7 |
2086 | 8 The most simple way of building Orthanc under GNU/Linux consists in |
634 | 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 |
2086 | 14 This process should work on any GNU/Linux distribution, provided that a |
1208
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 |
1219
c4ae92753d57
note about doxygen
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1208
diff
changeset
|
47 Note 3- To build the documentation, you will have to install doxyen. |
c4ae92753d57
note about doxygen
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1208
diff
changeset
|
48 |
634 | 49 |
2086 | 50 Use system-wide libraries under GNU/Linux |
51 ========================================= | |
634 | 52 |
2086 | 53 Under GNU/Linux, by default, Orthanc links against the shared |
54 libraries of your system (the "STATIC_BUILD" option is set to | |
55 "OFF"). This greatly speeds up the compilation. This is also required | |
56 when building packages for GNU/Linux distributions. Because using | |
57 system libraries is the default behavior, you just have to use: | |
634 | 58 |
59 # cd ~/OrthancBuild | |
60 # cmake -DCMAKE_BUILD_TYPE=Debug ~/Orthanc | |
61 # make | |
62 | |
1219
c4ae92753d57
note about doxygen
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1208
diff
changeset
|
63 Note that to build the documentation, you will have to install doxyen. |
634 | 64 |
2086 | 65 However, on some GNU/Linux distributions, it is still required to |
66 download and static link against some third-party dependencies, | |
67 e.g. when the system-wide library is not shipped or is | |
68 outdated. Because of difference in the packaging of the various | |
69 GNU/Linux distribution, it is also sometimes required to fine-tune | |
70 some options. | |
634 | 71 |
2086 | 72 You will find below build instructions for specific GNU/Linux |
634 | 73 distributions. Distributions tagged by "SUPPORTED" are tested by |
74 Sébastien Jodogne. Distributions tagged by "CONTRIBUTED" come from | |
75 Orthanc users. | |
76 | |
77 | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
78 SUPPORTED - Debian Jessie/Sid |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
79 ----------------------------- |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
80 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
81 # 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
|
82 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ |
1974
ea4b8975d064
no need for google log anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1622
diff
changeset
|
83 libgtest-dev libpng-dev libjpeg-dev \ |
678 | 84 libsqlite3-dev libssl-dev zlib1g-dev libdcmtk2-dev \ |
1077 | 85 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
|
86 |
651 | 87 # cmake -DALLOW_DOWNLOADS=ON \ |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
88 -DUSE_SYSTEM_MONGOOSE=OFF \ |
638 | 89 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ |
1078 | 90 -DDCMTK_LIBRARIES=dcmjpls \ |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
91 ~/Orthanc |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
92 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
93 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
|
94 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
|
95 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
96 |
1349 | 97 SUPPORTED - Ubuntu 12.04.5 LTS |
98 ------------------------------ | |
645
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
99 |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
100 # 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
|
101 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ |
1622
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
102 libgtest-dev libpng-dev libsqlite3-dev libssl-dev libjpeg-dev \ |
1349 | 103 zlib1g-dev libdcmtk2-dev libboost1.48-all-dev libwrap0-dev \ |
104 libcharls-dev | |
645
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
105 |
1349 | 106 # cmake "-DDCMTK_LIBRARIES=boost_locale;CharLS;dcmjpls;wrap;oflog" \ |
645
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
107 -DALLOW_DOWNLOADS=ON \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
108 -DUSE_SYSTEM_MONGOOSE=OFF \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
109 -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
|
110 -DUSE_SYSTEM_PUGIXML=OFF \ |
645
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
111 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
112 ~/Orthanc |
75af92b18e23
build notes for ubuntu 12.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
640
diff
changeset
|
113 |
636
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 |
1350
724dc4e17d38
build ubuntu 14.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1349
diff
changeset
|
116 SUPPORTED - Ubuntu 14.04 LTS |
724dc4e17d38
build ubuntu 14.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1349
diff
changeset
|
117 ---------------------------- |
724dc4e17d38
build ubuntu 14.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1349
diff
changeset
|
118 |
1552 | 119 # sudo apt-get install build-essential unzip cmake mercurial \ |
120 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ | |
1622
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
121 libgtest-dev libpng-dev libsqlite3-dev libssl-dev libjpeg-dev \ |
1552 | 122 zlib1g-dev libdcmtk2-dev libboost-all-dev libwrap0-dev \ |
123 libcharls-dev libjsoncpp-dev libpugixml-dev | |
124 | |
1350
724dc4e17d38
build ubuntu 14.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1349
diff
changeset
|
125 # cmake -DALLOW_DOWNLOADS=ON \ |
724dc4e17d38
build ubuntu 14.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1349
diff
changeset
|
126 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ |
724dc4e17d38
build ubuntu 14.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1349
diff
changeset
|
127 -DUSE_SYSTEM_MONGOOSE=OFF \ |
724dc4e17d38
build ubuntu 14.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1349
diff
changeset
|
128 -DDCMTK_LIBRARIES=dcmjpls \ |
724dc4e17d38
build ubuntu 14.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1349
diff
changeset
|
129 ~/Orthanc |
724dc4e17d38
build ubuntu 14.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1349
diff
changeset
|
130 |
724dc4e17d38
build ubuntu 14.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1349
diff
changeset
|
131 |
724dc4e17d38
build ubuntu 14.04 lts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1349
diff
changeset
|
132 |
1415 | 133 SUPPORTED - Fedora 20-22 |
134 ------------------------ | |
135 | |
136 # sudo yum install unzip make automake gcc gcc-c++ python cmake \ | |
1974
ea4b8975d064
no need for google log anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1622
diff
changeset
|
137 boost-devel curl-devel dcmtk-devel \ |
1622
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
138 gtest-devel libpng-devel libsqlite3x-devel libuuid-devel jpeg-devel \ |
1415 | 139 mongoose-devel openssl-devel jsoncpp-devel lua-devel pugixml-devel |
140 | |
141 You will also have to install "gflags-devel" on Fedora 21&22: | |
142 | |
143 # sudo yum install gflags-devel | |
144 | |
145 # cmake "-DDCMTK_LIBRARIES=CharLS" \ | |
146 -DSYSTEM_MONGOOSE_USE_CALLBACKS=OFF \ | |
147 ~/Orthanc | |
148 | |
149 Note: Have also a look at the official package: | |
150 http://pkgs.fedoraproject.org/cgit/orthanc.git/tree/?h=f18 | |
151 | |
152 | |
153 | |
1337 | 154 SUPPORTED - FreeBSD 10.1 |
155 ------------------------ | |
156 | |
1622
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
157 # pkg install jsoncpp pugixml lua51 curl googletest dcmtk cmake jpeg \ |
1974
ea4b8975d064
no need for google log anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1622
diff
changeset
|
158 e2fsprogs-libuuid boost-libs sqlite3 python libiconv |
1337 | 159 |
160 # cmake -DALLOW_DOWNLOADS=ON \ | |
161 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
162 -DDCMTK_LIBRARIES="dcmdsig;charls;dcmjpls" \ | |
163 ~/Orthanc | |
164 | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
165 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
166 |
1622
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
167 SUPPORTED - CentOS 6 |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
168 -------------------- |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
169 |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
170 # yum install unzip make automake gcc gcc-c++ python cmake curl-devel \ |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
171 libpng-devel sqlite-devel libuuid-devel openssl-devel \ |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
172 lua-devel mercurial patch tar |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
173 |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
174 # cmake -DALLOW_DOWNLOADS=ON \ |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
175 -DUSE_SYSTEM_JSONCPP=OFF \ |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
176 -DUSE_SYSTEM_MONGOOSE=OFF \ |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
177 -DUSE_SYSTEM_PUGIXML=OFF \ |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
178 -DUSE_SYSTEM_SQLITE=OFF \ |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
179 -DUSE_SYSTEM_BOOST=OFF \ |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
180 -DUSE_SYSTEM_DCMTK=OFF \ |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
181 -DUSE_SYSTEM_GOOGLE_TEST=OFF \ |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
182 -DUSE_SYSTEM_LIBJPEG=OFF \ |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
183 ~/Orthanc |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
184 |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
185 |
0b8e62bd9c48
build instructions for centos 6
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1552
diff
changeset
|
186 |
2086 | 187 Other GNU/Linux distributions? |
188 ------------------------------ | |
634 | 189 |
190 Please send us your build instructions (by a mail to | |
191 s.jodogne@gmail.com)! | |
192 | |
193 You can find build instructions for Orthanc up to 0.7.0 on the | |
194 following Wiki page: | |
195 https://code.google.com/p/orthanc/wiki/LinuxCompilationUpTo070 | |
196 | |
197 These instructions will not work as such beyond Orthanc 0.7.0, but | |
198 they might give indications. | |
199 | |
200 | |
201 | |
202 | |
203 Using ccache | |
204 ============ | |
205 | |
2086 | 206 Under GNU/Linux, you also have the opportunity to use "ccache" to |
634 | 207 dramatically decrease the compilation time when rebuilding |
208 Orthanc. This is especially useful for developers. To this end, you | |
209 would use: | |
210 | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
211 # CC="ccache gcc" CXX="ccache g++" cmake ~/Orthanc [Other Options] |