-
Notifications
You must be signed in to change notification settings - Fork 20
Building from source
This is an overview of the main versions of Lambda:
Repository | Branch | Description |
---|---|---|
https://github.com/seqan/lambda | lambda3 | recommended branch |
https://github.com/seqan/lambda | lambda2 | previous master-branch (please upgrade) |
https://github.com/seqan/lambda | lambda1 | deprecated |
https://github.com/h-2/seqan | feature/lambda | initially published; deprecated |
Only lambda3 and lambda2 are supported and below instructions will not work for older versions.
Check out the desired branch with git:
% git clone --recursive [-b BRANCHNAME] https://github.com/seqan/lambda.git
Alternatively, you can download a tarball from the releases page. Use a file that includes the submodules.
- operating systems: Linux, FreeBSD, macOS
- CPUs: x86_64 with SSE4
-
compilers:
GCC ≥ 11
(no other compiler is supported!) - cmake ≥ 3.10.0
% mkdir -p lambda-build/release
% cd lambda-build/release
% cmake ../../lambda
% make -j4
Please be aware that due to excessive use of templating and compile-time optimizations the build might take around 5min. macOS builds are slower and can take up to 15min.
If your most recent version of GCC is not the default, you have to specify the path. In many setups you then also need to adjust the paths to standard libraries, e.g.
% cmake ../../lambda \
-DCMAKE_CXX_COMPILER="/path/to/gcc_install/bin/g++" \
-DCMAKE_CXX_FLAGS="-L/path/to/gcc_install/lib64/" \
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-rpath=/path/to/gcc_install/lib64/"
NAME | description | default |
---|---|---|
LAMBDA_STATIC_BUILD | Activate to include all libs in the binary. This will result in a bigger binary but in return work on different software than the one you are building from (e.g. compiler and OS version). | off |
NAME | description | default |
---|---|---|
LAMBDA_FASTBUILD | Setting this is useful for debugging, because the build will be faster. Only BLASTP and BLASTX support will be built. | off |
LAMBDA_MMAPPED_DB | Use memory-mapped IO to access the database. | off |
LAMBDA_LINGAPS_OPT | This activates optimized codepaths for linear gaps costs (i.e. additional gap open cost == 0). It has no drawbacks other than increased compile time and binary size. | off |
LAMBDA_LONG_PROTEIN_SUBJ_SEQS | Make max protein sequence length == 4.3billion instead of 65,535. If you set this all previously built indexes will be incompatible! | off |
LAMBDA_NATIVE_BUILD | Deactivating this will disable CPU-specific optimization, but in return your binary will work on different hardware than the one you are building from. | on |
LAMBDA_STATIC_BUILD | Activate to include all libs in the binary. This will result in a bigger binary but in return work on different software than the one you are building from (e.g. compiler and OS version). | off |
To build portable binaries of Lambda, deactivate native builds and activate static builds, i.e. pass -DLAMBDA_NATIVE_BUILD=0 -DLAMBDA_STATIC_BUILD=1
to cmake.
Please note that it is not possible to build completely static binaries on Mac OS X, but the flag at least packages the compiler specific bits into the binary.
If anything is unclear, don't hesitate to contact to me.