-
Notifications
You must be signed in to change notification settings - Fork 2
/
INSTALL
151 lines (109 loc) · 5.33 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
Building and Installing hfile_cyrpt4gh
======================================
Requirements
============
Building HTSlib requires a few programs and libraries to be present.
See the "System Specific Details" below for guidance on how to install
these.
At least the following are required:
GNU make
C compiler (e.g. gcc or clang)
In addition, building the configure script requires:
autoheader
autoconf
Running the configure script uses awk, along with a number of
standard UNIX tools (cat, cp, grep, mv, rm, sed, among others). Almost
all installations will have these already.
hfile_cyrpt4gh uses the following external libraries. Building requires both
the library itself, and include files needed to compile code that uses functions
from the library. Note that some Linux distributions put include files in
a development ('-dev' or '-devel') package separate from the main library.
htslib (required)
libsodium (required)
Building Configure
==================
This step is only needed if configure.ac has been changed, or if configure
does not exist (for example, when building from a git clone). The
configure script and config.h.in can be built by running:
autoheader
autoconf
Basic Installation
==================
To build and install, run the following commands in the base directory
or the source distribution:
./configure
make
make install
Configuration
=============
By default, './configure' examines your build environment, checking for
requirements such as the htslib development files, and arranges for a
plain build. The following configure options can be used to enable
various features and specify further optional external requirements:
--with-htslib=DIR
Specifies the HTSlib source tree or installation directory. Configure
will check that DIR appears to contain HTSlib source files or to be the
root of an installation directory (i.e., it has 'include' and 'lib'
subdirectories containing HTSlib headers and libraries).
By default, configure looks for an HTSlib source tree within or alongside
the hfile_crypt4gh source directory; if there are several likely candidates,
you will have to choose one via this option.
--with-htslib=system
Ignores any nearby HTSlib source trees, and builds hfile_crypt4gh using an
existing HTSlib installation in a system directory (i.e., a directory
already being searched by $CPPFLAGS/$LDFLAGS).
--enable-configure-htslib
When building with an HTSlib source tree, run HTSlib's configure script
as well. HTSlib configure options can also be used and will be
passed down to the HTSlib configure. See HTSlib's INSTALL documentation
for details of these options.
--with-plugin-dir=DIR
Specifies the directory into which the plugin should be installed; by
default, LIBEXECDIR/htslib.
The configure script also accepts the usual options and environment variables
for tuning installation locations and compilers: type './configure --help'
for details. For example,
./configure CC=icc --prefix=/opt/icc-compiled
would specify that samtools is to be built with icc and installed into bin,
lib, etc subdirectories under /opt/icc-compiled.
If dependencies have been installed in non-standard locations (i.e. not on
the normal include and library search paths) then the CPPFLAGS and LDFLAGS
environment variables can be used to set the options needed to find them.
For example, if you have installed a copy of libsodium in $HOME/opt/sodium,
you can use:
./configure CPPFLAGS=-I"$HOME/opt/sodium/include" \
LDFLAGS="-L$HOME/opt/sodium/lib -Wl,-R$HOME/opt/sodium/lib"
Installation Locations
======================
By default, 'make install' installs programs to /usr/local/bin, and
the plug-in to /usr/local/libexec/htslib.
You can specify a different location to install by configuring with
--prefix=DIR or specify locations for particular parts of the package by
configuring with --bindir=DIR and so on. The location where the plug-in
will be installed can be set using --with-plugin-dir=DIR. Ideally this
should match the setting of the same option that was used when building
HTSlib.
It's possible to install to a staging area by typing 'make DESTDIR=DIR install',
possibly in conjunction with other --prefix configure settings. For
example,
./configure --prefix=/opt
make
make DESTDIR=/tmp/staging install
will install into /tmp/staging/opt/bin, /tmp/staging/opt/libexec/htslib, etc.
System Specific Details
=======================
Installing the prerequisites is system dependent and there is more
than one correct way of satisfying these, including downloading them
from source, compiling and installing them yourself.
For people with super-user access, we provide an example set of commands
below for installing the dependencies on a variety of operating system
distributions. Note these are not specific recommendations on distribution,
or compiler. It is assumed you already have the core set of packages for
the given distribution - the lists may be incomplete if this is not the case.
Debian / Ubuntu (18.04 and later)
---------------------------------
sudo apt-get update # Ensure the package list is up to date
sudo apt-get install autoconf automake make gcc libsodium-dev
RedHat / CentOS
---------------
sudo yum install autoconf automake make gcc libsodium-devel