c++ - 非法指令调试

标签 c++ compilation bioinformatics lapack suite

我编制了一整套生物信息学分析。 ( https://github.com/iontorrent/TS ) 它有很多依赖项( Armadillo 、blas、lapack、atlas 等)。

在编译时我没有错误。问题是创建的某些可执行文件无法正常工作,并在没有任何其他信息的情况下抛出 Illegal Instruccion。我在 CentOS 5.6 上使用 GCC 4.8.2。

我想知道如何调试这些可执行文件,以便检查我的系统中哪个库或代码有问题。

./tvc
tvc 4.0-7 () - Torrent Variant Caller

Illegal instruction

我认为问题出在 LAPACK/BLAS/CBLAS 上。 我对如何从源代码构建 LAPACK/BLAS 和 CBLAS 感到很困惑。 (LAPACK/BLAS 的rpm 版本在Centos 5 中已经过时,本软件套件需要LAPACK 3.2.1)。 我知道如何编译 LAPACK 和 BLAS,我不知道如何安装 CBLAS。

谢谢。

已编辑:

提供此分析套件的人员还提供了一个预装了 Ubuntu 和所有软件的虚拟机。

看了下他们的gcc版本和配置:

gcc -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5.1'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1)

我的 GCC 配置:

Configured with: ../configure --prefix=/share/apps/local/gcc/4.8.2 --with-mpfr=/share/apps/local/gcc/4.8.2 --with-gmp=/share/apps/local/gcc/4.8.2 --with-as=/share/apps/local/binutils/2.24/bin/as --enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.8.2 (GCC) 

最佳答案

有两种可能性;但要解决这个问题,请按照说明在调试器中运行程序

$ gdb ./tvc

从调试器运行程序。注:(gdb)为提示符

(gdb) run

这应该抛出非法指令;从这里开始

(gdb) bt full

这将告诉您非法指令发生的位置。

关于c++ - 非法指令调试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22454200/

相关文章:

c++ - google mock - 即使函数有不同的参数,EXPECT_CALL 也会触发

c++ - 映射 ISpMMSysAudio::SetLineId 和 mixerLineId

java - 如何将 .jar 文件转换为 Unix 可执行文件? (苹果)

c++ - 在 C++ 中使用模板时,编译器如何知道要实例化多少数据类型?

python - 从大文件中检索行的更有效方法

c++ - 多线程与多处理

c++ - 如何在 C++ 中找到两个 vector 之间的最小(优化)距离

java - 构建错误,Gradle -> 错误 :Execution failed for task ':app:preDexDebug' . > org.gradle.process.internal.ExecException:

perl - 如何从 Perl 中的 DNA 序列中提取开始和结束密码子?

blogs - 生物信息学资源