-
CXXABI… not found
(1)strings /xxx/libstdc++.so.6 |grep CXXABI 先查看一下是否有你需要的版本
(2)从系统的库里查看是否有高版本的 libstdc++.so.6.xx ,一般是在/usr/lib64里
(3)将高版本的重新链接 ln -s libstdc++.so.6 libstdc++.so.6.xx 注意替换xx为你需要的版本
(4)在 module load conda 时,可能没有加载 conda/lib ,手动添加 LD_LIBRARY_PATH 即可 -
git ’ ’ … 时提示too many argument
问题的原因是有些系统内的git版本太低,无法识别新的参数,如果不是自己的电脑只能从别的地方下载好需要的包再上传(太坑爹了) -
对‘H5Aopen’未定义的引用,等等
添加-L/path/to/hdf5/lib -lhdf5 -
对‘cblas_sgemv’未定义的引用,等等
添加-L/path/to/lapack/lib -lcblas -
对‘sgemv_’未定义的引用,等等
添加-L/path/to/lapack/lib -lblas -
对‘_gfortran_st_write’未定义的引用,等等
添加 -lgfortran -
miniconda3 创建环境命令
conda create -n env_name -f env_file
网上很多教程还停留在老版本,使用 conda env create … -
conda 安装 basemap
conda install basemap 时会安装matplotlib 3.0.0,此时在 python 中使用 from mpl_toolkits.basemap import Basemap 会报错 ImportError: cannot import name ‘is_scalar’ ,需要用 pip 将 matplotlib 3.0.0卸载,安装 matplotlib 2.2.0(可能会有别的包冲突) -
undefined reference to `for_write_seq_fmt’
添加编译选项 -lifcore -
lapack 提示错误 undefined reference to `dcopy_’ 等等
在 -llapack 后添加编译选项 -lblas -
运行软件时提示 /lib64/libc.so.6: version GLIBC_2.14’ not found ,原因是 libc 版本太低,但是因为是在系统层面不方便升级,以下操作
强烈建议在 conda 虚拟环境中使用
patchelf --set-interpreter /new/path/to/glibc.so.6 /path/to/execute/file
或者
patchelf --set-rpath /new/path/to/glibc.so.6 /path/to/library/file -
Fortran 编译错误
Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/REAL(8)).
其实该错误并不影响程序的运行,在编译选项中添加 -fallow-argument-mismatch 即可跳过(亲测有些无法跳过) -
Fortran 编译器 mpif90 错误,版本 gcc 10.0.2
Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
原因:编译器版本太高
解决办法:https://gcc.gnu.org/gcc-10/porting_to.html
添加编译选项 -fallow-argument-mismatch -
C 编译器 mpicc 错误
error: Could not compile a test program with AVX512, adjust the C compiler or CFLAGS
解决办法:添加编译选项 CFLAGS=-march=sandybridge 或者 -march=haswell ,march=knl -
安装 libint 时遇到 gmpxx.h 缺失,明明安装 gcc 的时候已经安装了 gmp 为什么不行呢?
原因:安装 gmp 时没有支持 cxx
解决办法:安装 gmp 时,./configure --enable-cxx --prefix…
如果你是非 root 用户,在自己账号下安装一份也是可以用的 -
X11 库缺失
建议使用 conda 安装
conda install -c conda-forge xorg-libx11
- X11 库在调用时提示缺少 XauGetBestAuthByAddr 等函数,或者是提示找不到 libxau.so
依然使用 conda 安装
conda install -c conda-forge xorg-libxau
-
编译 lapack 时如果使用 mpiifort ,可能会出现错误 :second_INT_ETIME.f(53): error #6407: This symbolic name is not an intrinsic function name or an intrinsic subroutine name.
解决办法:在 make.inc 中设置 TIMER = INT_CPU_TIME -
perl “bsd_glob” is not defined in %File::Glob::EXPORT_TAGS
原因:bsd_glob 是 perl 5.10几以后的语法,需要升级
解决办法: 安装更高版本的perl,例如 perl 5.28 -
Perl 出错 Can’t locate XML/LibXML.pm in @INC
原因:新安装的 perl 没有 xml 模块
解决办法:cpan -i XML::LibXML -
无法识别的命令行选项“-fstack-protector-strong”
原因:gcc 版本过低
解决办法:需要更高版本的 gcc ,例如 gcc 5.4.0 -
编译时 error #6580: Name in only-list does not exist. [MPI_INFO_NULL] use mpi, only : MPI_COMM_NULL, MPI_INFO_NULL ! _EXTERNAL
原因: icc 编译器版本过低
解决办法:使用高版本的 icc ,例如 intel 2017 编译器 -
python GLIBC 2.14 缺少
patchelf --set-interpreter /path/to/glibc-2.14/lib/ld-linux-x86-64.so.2 /path/to/python
-
gcc、g++ 在编译时出现 cannot find ‘ld’
原因:系统里的 binutils 版本太低了
解决办法:1)如果是远程服务器,确保你的系统里的有 conda 环境 ,然后直接 conda install binutils 即可
2)如果是你的个人电脑,可以使用 yum 或者 apt-get 安装 -
使用 gcc 10 + openmpi 进行编译时出现:Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(4)/LOGICAL(4)).
原因:gcc 版本太高
解决办法:不需要更换编译器,而是在编译选项 FFLAGS 和 FCFLAGES 中添加 “-w -fallow-argument-mismatch -O2” 即可 -
Error: no such instruction: `vpbroadcastw %xmm2,%xmm2’
原因:avx2 的问题,有两种解决办法
解决办法:1. 在编译选择中添加 -march=native (具体看你自己的机器配置),这种办法在编译软件时可能没有作用
2.软件编译中一般在 configure 时有 avx2 的选项,关闭即可 (-no-avx2 / --disable-avx2) -
python 实用 mpi4py 提交到 slurm 上出现下述错误
python: error: Invalid user for SlurmUser slurmadmin, ignored
python: error: Invalid user for SlurmUser slurmadmin, ignored
python: error: plugin_load_from_file: dlopen(/xxxx/slurm-16.05.3/lib/slurm/auth_munge.so): libmunge.so.2: cannot open shared object file: No such file or directory
python: error: Couldn't load specified plugin name for auth/munge: Dlopen of plugin file failed
原因:使用上述的 patchelf 给 python 添加 glibc 后出现,可能导致了依赖库加载出现错误
解决方法:conda 重新安装 python,如果其他用 pip 安装的库提示确实 GLIBC_2.14 可以尝试使用conda 安装
(conda 会自动解决依赖问题)
-
intel 编译器链接 ioapi 库之后编译出错:
undefined reference to `__kmpc_atomic_cmplx4_add’undefined reference to `omp_get_num_procs’
等等 …
原因:缺少数学库以及 openmp 库
解决办法:在 intel 编译器中支持编译选项 -mkl ,在比较新的版本中可以直接使用-L{$MKLROOT}/lib/intel64 然后跟着 -mkl=cluster (并行) 或者 -mkl=sequential(串行),即可
-
ld提示 /usr/bin/ld: this linker was not configured to use sysroots
原因:binutils 套件在配置时没有添加 --sysroot 选项
解决办法:重新下载编译一个 binutils 套件 -
undefined reference to `operator delete(void*, std::nothrow_t const&)’
原因:缺少 stdc++ 编译选项
解决办法:在软件编译的命令中添加 -lstdc++ -
sorry - this program has been built without plugin support
原因:在链接最后的静态库时出现该错误,经过排查后发现最后链接库文件时使用的是 gcc-ar ,暂时也没找到具体原因
解决办法:在编译时指定 AR=ar 即可 -
undefined reference to `__ehdr_start’
原因:binutils 版本小于 2.24.51.0.2
解决方法:参考上面 -
pgi 编译器出现 /tmp/nvfortranZVdkzTW_Ab0q.s:15493: Error: suffix or operands invalid for `vbroadcastsd
原因:binutils 版本小于 2.2
解决方法:参考上面 -
gcc 安装时出现 error: #error “Where has __float128 gone?”
原因:系统内 Intel 编译器的环境变量影响到了 gcc 的编译
解决方法:unset C_INCLUDE_PATH ;unset CPATH -
R 安装包时出现 C++11 standard requested but CXX11 is not defined
原因:R 的配置文件中没有定义 CXX11 变量
解决方法:找到 R 的安装位置,进入 lib64/R/etc 目录,打开 Makeconf ,在 CXX11 = 后面添加上你的编译器(上面 CXX 的内容复制下来)-m64 ,类似 CXX11 = g++ -m64,以及在下面 CXX11PICFLAGS = 后面加上上面 CXXFLAGS 后面的内容,保存后重新安装即可 -
git 报错 fatal: HTTP request failed
原因:在网络没问题的情况下,先检查一下 git 版本是不是太低了
解决方法:如果网络没问题的话直接升级更高版本的 git 即可解决问题 -
编译软件时出现 :
Error: suffix or operands invalid for `vpxor'
suffix or operands invalid for `vpshufb'
suffix or operands invalid for `vpaddd
原因:binutils 套件版本太低
解决办法:编译一个更新版本的 binutils 套件
-
python 2.7 中出现 No module named _bsddb
原因:python 2 版本历史遗留错误,具体原因可以参考链接
解决办法:先使用 pip 安装 pip install bsddb3,然后在代码中将 import bsddb 改为新安装的 bsddb3,或者改为 import bsddb3 as bsddb -
automake 时出现错误:macro `AM_EXTRA_RECURSIVE_TARGETS’ not found in library
原因:系统中自带的 automake 版本太低
解决办法:手动安装一个新版本的 automake 或者使用 conda 安装 -
新版 intel 编译器报错:Catastrophic error: could not set locale “” to allow processing of multibyte characters
原因:intel 编译器在低版本的系统中出现的 bug
解决办法:在编译选项中添加 -no-multibyte-chars
41.error #5136: Illegal syntax for IMPLICIT NONE statement. IMPLICIT NONE (TYPE,EXTERNAL)
原因:intel mpi 不支持该种语法
解决办法:使用 sed 命令将这些 IMPLICIT NONE (TYPE,EXTERNAL) 语句全部注释
- error #6503: This keyword is invalid for this intrinsic procedure reference. [BACK]
原因:intel 2018 之前的版本不支持该语法
解决办法:切换到 intel 2018 或者更高的版本
-
g++ 编译报错 ‘xxxx’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation
原因:一是编译器版本太新,二可能是语法有问题
解决办法:添加 CPPFALGS = -fpermissive 可以忽略该错误,但后续使用软件时可能会出现一些问题 -
未完待续。。。。