Mercurial > hg > orthanc
comparison LinuxCompilation.txt @ 2884:497a637366b4 db-changes
integration mainline->db-changes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 12 Oct 2018 15:18:10 +0200 |
parents | fac458593ac8 |
children | 0e1755e5efd0 |
comparison
equal
deleted
inserted
replaced
1762:2b91363cc1d1 | 2884:497a637366b4 |
---|---|
1 This file is a complement to "INSTALL", which contains instructions | 1 This file is a complement to "INSTALL", which contains instructions |
2 that are specific to Linux. | 2 that are specific to GNU/Linux. |
3 | 3 |
4 | 4 |
5 Static linking for Linux | 5 Static linking for GNU/Linux |
6 ======================== | 6 ============================ |
7 | 7 |
8 The most simple way of building Orthanc under Linux consists in | 8 The most simple way of building Orthanc under GNU/Linux consists in |
9 statically linking against all the third-party dependencies. In this | 9 statically linking against all the third-party dependencies. In this |
10 case, the system-wide libraries will not be used. The build tool | 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 | 11 (CMake) will download the sources of all the required packages and |
12 automatically compile them. | 12 automatically compile them. |
13 | 13 |
14 This process should work on any Linux distribution, provided that a | 14 This process should work on any GNU/Linux distribution, provided that a |
15 C/C++ compiler ("build-essential" in Debian-based systems), the Python | 15 C/C++ compiler ("build-essential" in Debian-based systems), the Python |
16 interpreter, CMake, the "unzip" system tool, and the development | 16 interpreter, CMake, the "unzip" system tool, and the development |
17 package for libuuid ("uuid-dev" in Debian) are installed. | 17 package for libuuid ("uuid-dev" in Debian) are installed. |
18 | 18 |
19 | 19 |
45 then run cmake again. | 45 then run cmake again. |
46 | 46 |
47 Note 3- To build the documentation, you will have to install doxyen. | 47 Note 3- To build the documentation, you will have to install doxyen. |
48 | 48 |
49 | 49 |
50 Use system-wide libraries under Linux | 50 Use system-wide libraries under GNU/Linux |
51 ===================================== | 51 ========================================= |
52 | 52 |
53 Under Linux, by default, Orthanc links against the shared libraries of | 53 Under GNU/Linux, by default, Orthanc links against the shared |
54 your system (the "STATIC_BUILD" option is set to "OFF"). This greatly | 54 libraries of your system (the "STATIC_BUILD" option is set to |
55 speeds up the compilation. This is also required when building | 55 "OFF"). This greatly speeds up the compilation. This is also required |
56 packages for Linux distributions. Because using system libraries is | 56 when building packages for GNU/Linux distributions. Because using |
57 the default behavior, you just have to use: | 57 system libraries is the default behavior, you just have to use: |
58 | 58 |
59 # cd ~/OrthancBuild | 59 # cd ~/OrthancBuild |
60 # cmake -DCMAKE_BUILD_TYPE=Debug ~/Orthanc | 60 # cmake -DCMAKE_BUILD_TYPE=Debug ~/Orthanc |
61 # make | 61 # make |
62 | 62 |
63 Note that to build the documentation, you will have to install doxyen. | 63 Note that to build the documentation, you will have to install doxyen. |
64 | 64 |
65 However, on some Linux distributions, it is still required to download | 65 However, on some GNU/Linux distributions, it is still required to |
66 and static link against some third-party dependencies, e.g. when the | 66 download and static link against some third-party dependencies, |
67 system-wide library is not shipped or is outdated. Because of | 67 e.g. when the system-wide library is not shipped or is |
68 difference in the packaging of the various Linux distribution, it is | 68 outdated. Because of difference in the packaging of the various |
69 also sometimes required to fine-tune some options. | 69 GNU/Linux distribution, it is also sometimes required to fine-tune |
70 | 70 some options. |
71 You will find below build instructions for specific Linux | 71 |
72 You will find below build instructions for specific GNU/Linux | |
72 distributions. Distributions tagged by "SUPPORTED" are tested by | 73 distributions. Distributions tagged by "SUPPORTED" are tested by |
73 Sébastien Jodogne. Distributions tagged by "CONTRIBUTED" come from | 74 Sébastien Jodogne. Distributions tagged by "CONTRIBUTED" come from |
74 Orthanc users. | 75 Orthanc users. |
75 | 76 |
76 | 77 |
77 SUPPORTED - Debian Jessie/Sid | 78 SUPPORTED - Debian Jessie/Sid |
78 ----------------------------- | 79 ----------------------------- |
79 | 80 |
80 # sudo apt-get install build-essential unzip cmake mercurial \ | 81 # sudo apt-get install build-essential unzip cmake mercurial \ |
81 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ | 82 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ |
82 libgoogle-glog-dev libgtest-dev libpng-dev libjpeg-dev \ | 83 libgtest-dev libpng-dev libjpeg-dev \ |
83 libsqlite3-dev libssl-dev zlib1g-dev libdcmtk2-dev \ | 84 libsqlite3-dev libssl-dev zlib1g-dev libdcmtk2-dev \ |
84 libboost-all-dev libwrap0-dev libjsoncpp-dev libpugixml-dev | 85 libboost-all-dev libwrap0-dev libjsoncpp-dev libpugixml-dev |
85 | 86 |
86 # cmake -DALLOW_DOWNLOADS=ON \ | 87 # cmake -DALLOW_DOWNLOADS=ON \ |
87 -DUSE_SYSTEM_MONGOOSE=OFF \ | 88 -DUSE_SYSTEM_MONGOOSE=OFF \ |
88 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ | 89 -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON \ |
89 -DDCMTK_LIBRARIES=dcmjpls \ | 90 -DDCMTK_LIBRARIES=dcmjpls \ |
91 -DCMAKE_BUILD_TYPE=Release \ | |
90 ~/Orthanc | 92 ~/Orthanc |
91 | 93 |
92 Note: Have also a look at the official package: | 94 Note: Have also a look at the official package: |
93 http://anonscm.debian.org/viewvc/debian-med/trunk/packages/orthanc/trunk/debian/ | 95 http://anonscm.debian.org/viewvc/debian-med/trunk/packages/orthanc/trunk/debian/ |
94 | 96 |
104 | 106 |
105 # cmake "-DDCMTK_LIBRARIES=boost_locale;CharLS;dcmjpls;wrap;oflog" \ | 107 # cmake "-DDCMTK_LIBRARIES=boost_locale;CharLS;dcmjpls;wrap;oflog" \ |
106 -DALLOW_DOWNLOADS=ON \ | 108 -DALLOW_DOWNLOADS=ON \ |
107 -DUSE_SYSTEM_MONGOOSE=OFF \ | 109 -DUSE_SYSTEM_MONGOOSE=OFF \ |
108 -DUSE_SYSTEM_JSONCPP=OFF \ | 110 -DUSE_SYSTEM_JSONCPP=OFF \ |
109 -DUSE_SYSTEM_GOOGLE_LOG=OFF \ | |
110 -DUSE_SYSTEM_PUGIXML=OFF \ | 111 -DUSE_SYSTEM_PUGIXML=OFF \ |
111 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ | 112 -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON \ |
113 -DCMAKE_BUILD_TYPE=Release \ | |
112 ~/Orthanc | 114 ~/Orthanc |
113 | 115 |
114 | 116 |
115 | 117 |
116 SUPPORTED - Ubuntu 14.04 LTS | 118 SUPPORTED - Ubuntu 14.04 LTS |
121 libgtest-dev libpng-dev libsqlite3-dev libssl-dev libjpeg-dev \ | 123 libgtest-dev libpng-dev libsqlite3-dev libssl-dev libjpeg-dev \ |
122 zlib1g-dev libdcmtk2-dev libboost-all-dev libwrap0-dev \ | 124 zlib1g-dev libdcmtk2-dev libboost-all-dev libwrap0-dev \ |
123 libcharls-dev libjsoncpp-dev libpugixml-dev | 125 libcharls-dev libjsoncpp-dev libpugixml-dev |
124 | 126 |
125 # cmake -DALLOW_DOWNLOADS=ON \ | 127 # cmake -DALLOW_DOWNLOADS=ON \ |
126 -DUSE_GTEST_DEBIAN_SOURCE_PACKAGE=ON \ | 128 -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON \ |
127 -DUSE_SYSTEM_MONGOOSE=OFF \ | 129 -DUSE_SYSTEM_MONGOOSE=OFF \ |
128 -DDCMTK_LIBRARIES=dcmjpls \ | 130 -DDCMTK_LIBRARIES=dcmjpls \ |
131 -DCMAKE_BUILD_TYPE=Release \ | |
129 ~/Orthanc | 132 ~/Orthanc |
130 | 133 |
131 | 134 |
132 | 135 |
133 SUPPORTED - Fedora 20-22 | 136 SUPPORTED - Fedora 20-22 |
134 ------------------------ | 137 ------------------------ |
135 | 138 |
136 # sudo yum install unzip make automake gcc gcc-c++ python cmake \ | 139 # sudo yum install unzip make automake gcc gcc-c++ python cmake \ |
137 boost-devel curl-devel dcmtk-devel glog-devel \ | 140 boost-devel curl-devel dcmtk-devel \ |
138 gtest-devel libpng-devel libsqlite3x-devel libuuid-devel jpeg-devel \ | 141 gtest-devel libpng-devel libsqlite3x-devel libuuid-devel jpeg-devel \ |
139 mongoose-devel openssl-devel jsoncpp-devel lua-devel pugixml-devel | 142 mongoose-devel openssl-devel jsoncpp-devel lua-devel pugixml-devel |
140 | 143 |
141 You will also have to install "gflags-devel" on Fedora 21&22: | 144 You will also have to install "gflags-devel" on Fedora 21&22: |
142 | 145 |
143 # sudo yum install gflags-devel | 146 # sudo yum install gflags-devel |
144 | 147 |
145 # cmake "-DDCMTK_LIBRARIES=CharLS" \ | 148 # cmake "-DDCMTK_LIBRARIES=CharLS" \ |
146 -DSYSTEM_MONGOOSE_USE_CALLBACKS=OFF \ | 149 -DSYSTEM_MONGOOSE_USE_CALLBACKS=OFF \ |
150 -DCMAKE_BUILD_TYPE=Release \ | |
147 ~/Orthanc | 151 ~/Orthanc |
148 | 152 |
149 Note: Have also a look at the official package: | 153 Note: Have also a look at the official package: |
150 http://pkgs.fedoraproject.org/cgit/orthanc.git/tree/?h=f18 | 154 http://pkgs.fedoraproject.org/cgit/orthanc.git/tree/?h=f18 |
151 | 155 |
153 | 157 |
154 SUPPORTED - FreeBSD 10.1 | 158 SUPPORTED - FreeBSD 10.1 |
155 ------------------------ | 159 ------------------------ |
156 | 160 |
157 # pkg install jsoncpp pugixml lua51 curl googletest dcmtk cmake jpeg \ | 161 # pkg install jsoncpp pugixml lua51 curl googletest dcmtk cmake jpeg \ |
158 e2fsprogs-libuuid glog boost-libs sqlite3 python libiconv | 162 e2fsprogs-libuuid boost-libs sqlite3 python libiconv |
159 | 163 |
160 # cmake -DALLOW_DOWNLOADS=ON \ | 164 # cmake -DALLOW_DOWNLOADS=ON \ |
161 -DUSE_SYSTEM_MONGOOSE=OFF \ | 165 -DUSE_SYSTEM_MONGOOSE=OFF \ |
162 -DDCMTK_LIBRARIES="dcmdsig;charls;dcmjpls" \ | 166 -DDCMTK_LIBRARIES="dcmdsig;charls;dcmjpls" \ |
167 -DCMAKE_BUILD_TYPE=Release \ | |
163 ~/Orthanc | 168 ~/Orthanc |
164 | 169 |
165 | 170 |
166 | 171 |
167 SUPPORTED - CentOS 6 | 172 SUPPORTED - CentOS 6 |
178 -DUSE_SYSTEM_SQLITE=OFF \ | 183 -DUSE_SYSTEM_SQLITE=OFF \ |
179 -DUSE_SYSTEM_BOOST=OFF \ | 184 -DUSE_SYSTEM_BOOST=OFF \ |
180 -DUSE_SYSTEM_DCMTK=OFF \ | 185 -DUSE_SYSTEM_DCMTK=OFF \ |
181 -DUSE_SYSTEM_GOOGLE_TEST=OFF \ | 186 -DUSE_SYSTEM_GOOGLE_TEST=OFF \ |
182 -DUSE_SYSTEM_LIBJPEG=OFF \ | 187 -DUSE_SYSTEM_LIBJPEG=OFF \ |
188 -DCMAKE_BUILD_TYPE=Release \ | |
183 ~/Orthanc | 189 ~/Orthanc |
184 | 190 |
185 | 191 |
186 | 192 |
187 Other Linux distributions? | 193 Other GNU/Linux distributions? |
188 -------------------------- | 194 ------------------------------ |
189 | 195 |
190 Please send us your build instructions (by a mail to | 196 Please send us your build instructions (by a mail to |
191 s.jodogne@gmail.com)! | 197 s.jodogne@gmail.com)! |
192 | 198 |
193 You can find build instructions for Orthanc up to 0.7.0 on the | 199 You can find build instructions for Orthanc up to 0.7.0 on the |
201 | 207 |
202 | 208 |
203 Using ccache | 209 Using ccache |
204 ============ | 210 ============ |
205 | 211 |
206 Under Linux, you also have the opportunity to use "ccache" to | 212 Under GNU/Linux, you also have the opportunity to use "ccache" to |
207 dramatically decrease the compilation time when rebuilding | 213 dramatically decrease the compilation time when rebuilding |
208 Orthanc. This is especially useful for developers. To this end, you | 214 Orthanc. This is especially useful for developers. To this end, you |
209 would use: | 215 would use: |
210 | 216 |
211 # CC="ccache gcc" CXX="ccache g++" cmake ~/Orthanc [Other Options] | 217 # CC="ccache gcc" CXX="ccache g++" cmake ~/Orthanc [Other Options] |