Mercurial > hg > orthanc
annotate LinuxCompilation.txt @ 636:9ac1e8383877
build instructions for Debian Sid and Fedora 18
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 29 Oct 2013 11:15:24 +0100 |
parents | cd3b60f6e7d4 |
children | 92aa6df91c30 |
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 | |
63 SUPPORTED - Debian Squeeze (6.0) | |
64 -------------------------------- | |
65 | |
66 # sudo apt-get install build-essential unzip cmake mercurial \ | |
635 | 67 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ |
68 libgoogle-glog-dev libpng-dev \ | |
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 | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
79 SUPPORTED - Debian Jessie/Sid |
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 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
82 # 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
|
83 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
|
84 libgoogle-glog-dev libgtest-dev libpng-dev \ |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
85 libsqlite3-dev libssl-dev zlib1g-dev \ |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
86 libdcmtk2-dev libboost-all-dev libwrap0-dev |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
87 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
88 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
89 -DALLOW_DOWNLOADS=ON \ |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
90 -DUSE_SYSTEM_MONGOOSE=OFF \ |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
91 -DUSE_GTEST_DEBIAN_PACKAGE=ON \ |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
92 -DDCMTK_DICTIONARY_DIR:PATH=/usr/share/libdcmtk2 \ |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
93 ~/Orthanc |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
94 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
95 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
|
96 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
|
97 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
98 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
99 |
635 | 100 SUPPORTED - Ubuntu 12.10 |
101 ------------------------ | |
102 | |
103 # sudo apt-get install build-essential unzip cmake mercurial \ | |
104 uuid-dev libcurl4-openssl-dev liblua5.1-0-dev \ | |
105 libgoogle-glog-dev libgtest-dev libpng-dev \ | |
106 libsqlite3-dev libssl-dev zlib1g-dev \ | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
107 libdcmtk2-dev libboost-all-dev libwrap0-dev |
635 | 108 |
109 # cmake "-DDCMTK_LIBRARIES=wrap;oflog" \ | |
110 -DALLOW_DOWNLOADS=ON \ | |
111 -DUSE_SYSTEM_MONGOOSE=OFF \ | |
112 -DUSE_SYSTEM_JSONCPP=OFF \ | |
113 -DUSE_GTEST_DEBIAN_PACKAGE=ON \ | |
114 ~/Orthanc | |
115 | |
116 | |
634 | 117 |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
118 SUPPORTED - Fedora 18 |
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 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
121 # 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
|
122 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
|
123 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
|
124 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
|
125 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
126 # cmake ~/Orthanc |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
127 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
128 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
|
129 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
|
130 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
131 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
132 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
133 |
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
134 |
634 | 135 Other Linux distributions? |
136 -------------------------- | |
137 | |
138 Please send us your build instructions (by a mail to | |
139 s.jodogne@gmail.com)! | |
140 | |
141 You can find build instructions for Orthanc up to 0.7.0 on the | |
142 following Wiki page: | |
143 https://code.google.com/p/orthanc/wiki/LinuxCompilationUpTo070 | |
144 | |
145 These instructions will not work as such beyond Orthanc 0.7.0, but | |
146 they might give indications. | |
147 | |
148 | |
149 | |
150 | |
151 Using ccache | |
152 ============ | |
153 | |
154 Under Linux, you also have the opportunity to use "ccache" to | |
155 dramatically decrease the compilation time when rebuilding | |
156 Orthanc. This is especially useful for developers. To this end, you | |
157 would use: | |
158 | |
636
9ac1e8383877
build instructions for Debian Sid and Fedora 18
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
635
diff
changeset
|
159 # CC="ccache gcc" CXX="ccache g++" cmake ~/Orthanc [Other Options] |