遇到gcc版本不够的问题,先通过命令:
module ava gcc 看看有没有多余的gcc版本,
如果有,load就好了,相应的软件都可以load上来,
module load gcc/5.4.0
module load boost/1.62.0
module load R/3.5.1
module load zlib/1.2.11-icc17
module load cmake/3.8.1
如果load之后,在编译的时候还报错gcc版本不对,那就需要设置环境变量:
gcc 如果是已经安装的版本,要export 这两个,
export CC=/WORK/app/gcc/5.4.0/bin/gcc
export CXX=/WORK/app/gcc/5.4.0/bin/g++
cmake如果找不到已经安装的包那么需要指定路径:cmake --help
/WORK/app/cmake/3.8.1/bin/cmake -DBOOST_ROOT=/WORK/app/boost/1_62_0 -DBAMTOOLS_ROOT=/BIGDATA1/cygene_sydu_1/local/usr/local -D R_ROOT=/BIGDATA1/cygene_sydu_1/02.dropEst/R-3.5.1/lib64/R ..
make的时候如果报错:
collect2: error: ld returned 1 exit status
If you have messages like "(path to some library): undefined reference to (some name) for std::__cxx11::basic_ostringstream<char, std::char_traits, std::allocator >", it means that you're trying to link a library, built with gcc < 5.0, while dropEst is built with gcc >= 5.0. It's a compiler issue, and you have to guarantee consistency of compiler versions by rebuilding either the library or dropEst. For more details see question on stackoverflow.
If you have several compilers in your system, please use cmake flags -DCMAKE_CXX_COMPILER=(c++ compiler)
and -DCMAKE_C_COMPILER=(c compiler)
to choose a compiler. Here, (c++ compiler)
and (c compiler)
denotes path to the prefered compiler version.
清楚掉build,重新编译
/WORK/app/cmake/3.8.1/bin/cmake -DCMAKE_CXX_COMPILER=/WORK/app/gcc/5.4.0/bin/g++ DCMAKE_C_COMPILER=/WORK/app/gcc/5.4.0/bin/gcc -DBOOST_ROOT=/WORK/app/boost/1_62_0 -DBAMTOOLS_ROOT=/BIGDATA1/cygene_sydu_1/local/usr/local -D R_ROOT=/BIGDATA1/cygene_sydu_1/02.dropEst/R-3.5.1/lib64/R ..
安装R包
install.packages("/path/to/your/package")
总结,最近安装了三个软件
dropEst,zumis,indrops,
只要按照说明,一步一步先把依赖的包检查安装一遍,在进行编译安装
网友评论