source:
trunk/README
@
4276
Last change on this file since 4276 was 4276, checked in by , 8 months ago | |
---|---|
|
|
File size: 9.5 KB |
$Id: README 4276 2023-01-25 06:58:38Z peter $
About yat
This directory contains the yat library. For an overview of the project, visit
Configuring and building yat
- If you checked out this project from the subversion repository you
must run '
bootstrap
' to initialize the build system. - Issue '
./configure
' to create the Makefiles. Optionally run configure with '--enable-debug
', which will turn on debug options. - Compile with '
make
'. - '
make doc
' will generate documentation. - Optionally do '
make check
' to run test programs. - Issue '
make install
' to install the package on your system, documentation will not be installed if documentation was not generated above. Default installation location is/usr/local
; this can be changed with './configure --prefix=/dir/to/install/to
'. - Optionally do '
make installcheck
' to verify that intallation completed correctly.
The configure
script has additional options; ./configure --help
will offer you those choices or refer to Requirements below.
Compile Flag Variables
Compile flags (CPPFLAGS
(preprocessor), CXXFLAGS
(compiler),
and LDFLAGS
(linker)) can be set at via configure, e.g.:
#> ./configure CPPFLAGS=-I/my/local/path/include
This setting will be used both when building the source into libyat as
well as propagated into script yat-config
. If you only want the
variable propagated to yat-config
, you can instead set variables
with prefix YAT_CONFIG_
:
#> ./configure YAT_CONFIG_CXXFLAGS=
Similarly, if you only want the variable used when building libyat,
and not propagated to output of yat-config
or pkg-config
, you can
use flags with prefix INTERNAL_
:
#> ./configure INTERNAL_CXXFLAGS="-g 03"
Requirements
From version 0.18, yat needs a C++11 compliant compiler to build. In addition, there are a few packages and programs required for compiling yat and generate supporting material. The configure script will look for required programs and report failure to meet the requirements. Here we list some of the requirements, but omit required standard utilities such as echo and sed since these are normally available.
Required packages
GSL
GNU Scientific Library, GSL version
1.13 or later. If you have GSL installed in a non-standard location,
./configure --with-gsl=DIR
can be useful to provide the location of
GSL. The gsl-config
script, which is used to retrieve needed
compiler and linker flags, is expected to be found in DIR/bin/
. The
check for existing GSL can be turned off with option
--without-gsl
. This can be useful, for example, if gsl-config is not
available at configure time but header file will be available at make
time.
BLAS
A C implementation of Basic Linear Algebra Subprograms (BLAS) is required. GSL comes with a reference implementation, but you should consider getting a hardware optimized implementation. ATLAS provides optimized BLAS (see below).
The configure
script searches for many different BLAS libraries in a
specific order (for details refer to m4/yat_cblas.m4
). If you want
to use a specific CBLAS library, ./configure --with-cblas=LIB
may be
useful. Note, however, that the chosen/detected CBLAS library is not
hard-coded into the installed libyat, but a user can choose a
different CBLAS when she links her application. A way to access which
CBLAS was detected during the configuration is to access the
yat-config script directly or via the autoconf macros included in the
distribution. If you do want to hard-code a choice of CBLAS into the
installed libyat, you may provide the appropriate value to LIBS. The
following line, for example:
#> ./configure LIBS=-lcblas
will hard-code the choice of -lcblas into libyat.
Boost
Boost version 1.66 or later. If you have Boost
installed in a non-standard location, ./configure --with-boost=DIR
can be useful to provide the location of Boost. Boost header files are
expected to be found in DIR/include/
and boost libraries are
expected to be found in DIR/lib/
. The configure
script tries to
detect libraries boost_thread
, boost_thread
and
boost_iostreams
. The name of a boost library typically depends on
its configuration (see boost's naming convention) and there may be
several versions/configurations of the same library installed. The
configure
tries to pick one of the available libraries, wchih can be
overridden with ./configure --with-boost-thread=foo
, `configure
--with-boost-system=foo, and
--with-boost-iostreams=foo`,
respectively. The check for boost can be turned off with
--without-boost
.
quiet nan
Quiet NaN's must be supported.
infinity
infinity for type double must be supported.
Optional packages
HTSLIB and Samtools
In order to enable functionality related to bam files htslib
(http://www.htslib.org) version 1.10 (or newer) must be
available. Header file <htslib/sam.h> is required as well as
'libhts'. If you have header files installed outside compiler's search
path (in e.g. '/path/to/htslib/sam.h', you can help the compiler with
./configure CPPFLAGS=-I/path/to
. If library is installed outside
linker's search path, in e.g. <libdir>
, you can run `./configure
LDFLAGS=-L<lib dir>`. You can build yat without bam support by running
./configure --without-htslib
.
The samtools program (version 1.2 or newer) is needed for some tests related to bam functionality. If samtools is not found by configure, these tests will be skipped. If you have samtools available outside PATH, you can help configure to find it with `./configure SAMTOOLS=/path/to/samtools`.
The bcftools program is needed for some tests. If bcftools is not
found by configure, these tests will be skipped. If you have bcftools
available outside your PATH, you can help configure to find it with
./configure BCFTOOLS=/path/to/bcftools
.
ZLIB
Zlib available from http://www.zlib.net/ is required to build samtools
and consequently needed to build yat too, unless you turn off samtools
support (please refer to samtools section above). Header file zlib.h
and library libz are required. If installed in an unconventional
location you can help the compiler/linker with `CPPFLAGS=-I<include
dir> and
LDFLAGS=-L<lib dir>`, respectively.
ATLAS
GSL supplies a reference implementation of BLAS. You may want to consider using hardware optimized BLAS. The ATLAS software provides an automatic hardware optimized BLAS library.
The detection of ATLAS is supported by the yat configuration script but in many cases the ATLAS libraries are installed in non-conventional directory locations. As an example, on Fedora 8, ATLAS libraries are located in /usr/lib/atlas or /usr/lib64/atlas depending on your hardware architecture. If you have ATLAS installed and the configure script fails to locate it, try to add the location to the atlas libraries when running configure:
#> ./configure LDFLAGS="-L/usr/lib64/atlas"
C++11 Compliant Compiler
The configure script will test that the compiler is in C++11 mode and supports features such as rvalue and std::atomic. If you run configure with option --enable-cxx11
#> ./configure --enable-cxx11
and the compiler is not in C++11 mode, the configure script will try different options such as '-std=cxx11' to turn on support for C++11 features.
Doxygen
Doxygen 1.5 (or newer) is required for generation of the API documentation. If doxygen application is missing, generation of API documentation is disabled. You can turn off doxygen usage with
#> ./configure DOXYGEN=no
Documentation
The API documentation for the latest release is available in HTML and
can be found through http://dev.thep.lu.se/yat. If you wish to build a
local copy, issue make doc
and you will find the documents in
directory doc/html/
.
Developers
See file README.developer for developer specific information.
Mac OS X
On Mac OS X you can create a universal library, a library that works
on multiple systems. You can do this by specifying multiple -arch
options to the compiler (but not to the preprocessor):
#> ./configure CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXXCPP="g++ -E" --disable-dependency-tracking
This will produce a universal yat library with 4 architectures. If your OS X does not support both Power-PC and Intel-based processors, you can omit these architectures. Also, required libraries, GSL and CBLAS, need to be available as universal libraries with desired architectures.
Copyright (C) 2003 Jari Häkkinen, Peter Johansson Copyright (C) 2004 Jari Häkkinen Copyright (C) 2006, 2007, 2008 Jari Häkkinen, Peter Johansson Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Peter Johansson Copyright (C) 2022 Jari Häkkinen, Peter Johansson This file is part of yat library, http://dev.thep.lu.se/yat The yat library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. The yat library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with yat. If not, see <http://www.gnu.org/licenses/>.