cd kallisto-0.42.5/build
cmake ..
-- The C compiler identification is GNU 4.4.7 -- The CXX compiler identification is GNU 4.4.7 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works ...
make
Scanning dependencies of target kallisto_core [ 5%] Building CXX object src/CMakeFiles/kallisto_core.dir/Bootstrap.cpp.o cc1plus: error: unrecognized command line option "-std=c++11" make[2]: *** [src/CMakeFiles/kallisto_core.dir/Bootstrap.cpp.o] Error 1 make[1]: *** [src/CMakeFiles/kallisto_core.dir/all] Error 2 make: *** [all] Error 2
This is because of G++ version 4.7 or less. Kallisto requires gcc >= 4.8. If you have root privileges, you can updaet G++ to recent version and problem should go away.
For HPC (cluster) machines where updated G++ may be available using module load gcc/4.8.5
command, kallisto build may fail as cmake ..
seems to pick up default cc
and c++
from /usr/bin
and not updated c++
in user PATH.
You can export CMAKE specific enviornment variables for updated compiler as follows and do cmake ..
followed by make
to build kallisto.
export CC=/risapps/rhel6/gcc/4.8.5/bin/gcc
export CXX=/risapps/rhel6/gcc/4.8.5/bin/c++
pwd
.../kallisto-0.42.5/build
# export updated compiler path to env which cmake can recognize
export CC=/risapps/rhel6/gcc/4.8.5/bin/gcc
export CXX=/risapps/rhel6/gcc/4.8.5/bin/c++
# confirm that updated compiler is present in current env
echo $CC
echo $CXX
# compile kallisto
cd .. && rm -rf build && mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=$HOME` ..
cmake will now recognize updated compiler
- The C compiler identification is GNU 4.8.5 -- The CXX compiler identification is GNU 4.8.5 -- Check for working C compiler: /risapps/rhel6/gcc/4.8.5/bin/gcc -- Check for working C compiler: /risapps/rhel6/gcc/4.8.5/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /risapps/rhel6/gcc/4.8.5/bin/c++ -- Check for working CXX compiler: /risapps/rhel6/gcc/4.8.5/bin/c++ -- works ...
make
make install
kallisto
binary will be atkallisto-0.42.5/build/src/kallisto
and~/bin
or under path given in-DCMAKE_INSTALL_PREFIX:PATH/bin
Scanning dependencies of target kallisto_core [ 5%] Building CXX object src/CMakeFiles/kallisto_core.dir/Bootstrap.cpp.o [ 11%] Building CXX object src/CMakeFiles/kallisto_core.dir/H5Writer.cpp.o [ 17%] Building CXX object src/CMakeFiles/kallisto_core.dir/Kmer.cpp.o [ 23%] Building CXX object src/CMakeFiles/kallisto_core.dir/KmerIndex.cpp.o [ 29%] Building CXX object src/CMakeFiles/kallisto_core.dir/KmerIterator.cpp.o [ 35%] Building CXX object src/CMakeFiles/kallisto_core.dir/MinCollector.cpp.o [ 41%] Building CXX object src/CMakeFiles/kallisto_core.dir/PlaintextWriter.cpp.o [ 47%] Building CXX object src/CMakeFiles/kallisto_core.dir/ProcessReads.cpp.o [ 52%] Building CXX object src/CMakeFiles/kallisto_core.dir/PseudoBam.cpp.o [ 58%] Building CXX object src/CMakeFiles/kallisto_core.dir/common.cpp.o [ 64%] Building CXX object src/CMakeFiles/kallisto_core.dir/h5utils.cpp.o [ 70%] Building CXX object src/CMakeFiles/kallisto_core.dir/hash.cpp.o [ 76%] Building CXX object src/CMakeFiles/kallisto_core.dir/main.cpp.o [ 82%] Building CXX object src/CMakeFiles/kallisto_core.dir/weights.cpp.o [ 88%] Linking CXX static library libkallisto_core.a [ 88%] Built target kallisto_core Scanning dependencies of target kallisto [ 94%] Building CXX object src/CMakeFiles/kallisto.dir/main.cpp.o [100%] Linking CXX executable kallisto [100%] Built target kallisto
If you get error, GLIBCXX_3.*.* not found
while running kallisto, it is likely because of incorrect version of libstdc++.so.6
library sourced in user environment. Check LD_LIBRARY_PATH
and make sure that it being sourced from updated gcc, e.g., /risapps/rhel6/gcc/4.8.5/lib64/libstdc++.so.6
and not /lib64/
or /usr/lib64/
.
END