我目前正在尝试在我的 Virtualbox Linux Mint 64 位上激活最新的 bwa 包。我已按照 README 文件中的说明进行操作:
## Getting started
git clone https://github.com/lh3/bwa.git
cd bwa; make
但是当我输入“make”并按回车键时,出现以下错误:
ksw.c: In function ‘ksw_u8’:
ksw.c:131:7: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi]
zero = _mm_set1_epi32(0);
~~~~~^~~~~~~~~~~~~~~~~~~
In file included from ksw.c:29:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:654:1: error: inlining failed in call to always_inline ‘_mm_set1_epi8’: target specific option mismatch
_mm_set1_epi8 (char __A)
^~~~~~~~~~~~~
ksw.c:136:8: note: called from here
shift = _mm_set1_epi8(q->shift);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ksw.c:29:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:654:1: error: inlining failed in call to always_inline ‘_mm_set1_epi8’: target specific option mismatch
_mm_set1_epi8 (char __A)
^~~~~~~~~~~~~
ksw.c:135:8: note: called from here
e_ins = _mm_set1_epi8(_e_ins);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from ksw.c:29:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:654:1: error: inlining failed in call to always_inline ‘_mm_set1_epi8’: target specific option mismatch
_mm_set1_epi8 (char __A)
^~~~~~~~~~~~~
ksw.c:134:9: note: called from here
oe_ins = _mm_set1_epi8(_o_ins + _e_ins);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ksw.c:29:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:654:1: error: inlining failed in call to always_inline ‘_mm_set1_epi8’: target specific option mismatch
_mm_set1_epi8 (char __A)
^~~~~~~~~~~~~
ksw.c:133:8: note: called from here
e_del = _mm_set1_epi8(_e_del);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from ksw.c:29:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:654:1: error: inlining failed in call to always_inline ‘_mm_set1_epi8’: target specific option mismatch
_mm_set1_epi8 (char __A)
^~~~~~~~~~~~~
ksw.c:132:9: note: called from here
oe_del = _mm_set1_epi8(_o_del + _e_del);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ksw.c:29:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:642:1: error: inlining failed in call to always_inline ‘_mm_set1_epi32’: target specific option mismatch
_mm_set1_epi32 (int __A)
^~~~~~~~~~~~~~
ksw.c:131:7: note: called from here
zero = _mm_set1_epi32(0);
~~~~~^~~~~~~~~~~~~~~~~~~
In file included from ksw.c:29:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:713:1: error: inlining failed in call to always_inline ‘_mm_store_si128’: target specific option mismatch
_mm_store_si128 (__m128i *__P, __m128i __B)
^~~~~~~~~~~~~~~
ksw.c:142:3: note: called from here
_mm_store_si128(Hmax + i, zero);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ksw.c:29:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:713:1: error: inlining failed in call to always_inline ‘_mm_store_si128’: target specific option mismatch
_mm_store_si128 (__m128i *__P, __m128i __B)
^~~~~~~~~~~~~~~
ksw.c:141:3: note: called from here
_mm_store_si128(H0 + i, zero);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ksw.c:29:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:713:1: error: inlining failed in call to always_inline ‘_mm_store_si128’: target specific option mismatch
_mm_store_si128 (__m128i *__P, __m128i __B)
^~~~~~~~~~~~~~~
ksw.c:140:3: note: called from here
_mm_store_si128(E + i, zero);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ksw.c:29:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:1191:1: error: inlining failed in call to always_inline ‘_mm_slli_si128’: target specific option mismatch
_mm_slli_si128 (__m128i __A, const int __N)
^~~~~~~~~~~~~~
ksw.c:149:5: note: called from here
h = _mm_slli_si128(h, 1); // h=H(i-1,-1); << instead of >> because x64 is little-endian
~~^~~~~~~~~~~~~~~~~~~~~~
In file included from ksw.c:29:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:695:1: error: inlining failed in call to always_inline ‘_mm_load_si128’: target specific option mismatch
_mm_load_si128 (__m128i const *__P)
^~~~~~~~~~~~~~
ksw.c:148:5: note: called from here
h = _mm_load_si128(H0 + slen - 1); // h={2,5,8,11,14,17,-1,-1} in the above example
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ksw.c:29:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:695:1: error: inlining failed in call to always_inline ‘_mm_load_si128’: target specific option mismatch
_mm_load_si128 (__m128i const *__P)
^~~~~~~~~~~~~~
ksw.c:174:6: note: called from here
h = _mm_load_si128(H0 + j); // h=H'(i-1,j)
~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ksw.c:29:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:1377:1: error: inlining failed in call to always_inline ‘_mm_max_epu8’: target specific option mismatch
_mm_max_epu8 (__m128i __A, __m128i __B)
^~~~~~~~~~~~
ksw.c:172:6: note: called from here
f = _mm_max_epu8(f, t);
~~^~~~~~~~~~~~~~~~~~~~
In file included from ksw.c:29:0:
/usr/lib/gcc/i686-linux-gnu/7/include/emmintrin.h:1100:1: error: inlining failed in call to always_inline ‘_mm_subs_epu8’: target specific option mismatch
_mm_subs_epu8 (__m128i __A, __m128i __B)
^~~~~~~~~~~~~
ksw.c:171:6: note: called from here
t = _mm_subs_epu8(h, oe_ins); // h=H'(i,j) - o_ins - e_ins
~~^~~~~~~~~~~~~~~~~~~~~~~~~~
整个错误信息太长,无法粘贴,但我想你明白了。
答案1
只要运行apt-get update && apt-get upgrade make gcc zlib1g-dev
就可以了。让我解释一下为什么它会这么想:
如果它没有帮助,而您只对这个确切案例的解决方案感兴趣,请跳到我的答案的末尾。
我通常使用 docker 解决构建问题,以便可以创建我的发行版的最小化环境。
您正在为 Mint 构建,它基本上是 Ubuntu 加上额外的功能。我假设您的版本是 Mint 19,它基于 Ubuntu 18.04,所以我运行docker run --name bwabuild -it --rm ubuntu:18.04
。从现在开始,我在容器内运行所有提到的命令:
- 我需要 git:
apt-get update && apt-get install git
- 我需要回购:
git clone https://github.com/lh3/bwa.git && cd bwa
- 我需要解析 makefile:
apt-get install make
从现在起,我只是make
一遍又一遍地运行,并始终处理我看到的第一个新错误。这些是我注意到的并且必须解决的问题:
- 没有海湾合作委员会:
apt-get install gcc
- 没有 zlib.h:我在“真实”系统上搜索(它在)并在“真实”系统上运行
apt-get install zlib1g-dev
,发现这是所需的包zlib.h
/usr/include/zlib.h
dpkg -S /usr/include/zlib.h
从这里开始,它可以正确构建(带有警告,但那只是因为代码“丑陋”)。我没有收到任何错误。所以现在我检查软件包版本:
dpkg -l make
:4.1-9.1ubuntu1dpkg -l gcc
:4:7.4.0-1ubuntu2.3dpkg -l zlib1g-dev
:1:1.2.11.dfsg-0ubuntu2
我现在知道我需要哪些包以及版本应该是什么,所以我exit
使用容器(因为我用它运行,所以它也会杀死它--rm
)。
我在我的主机系统上更新了这 3 个包(巧合的是我也使用 Mint)并尝试以与您相同的方式进行构建,现在构建完美。
如果由于某种原因它仍然无法在您的系统上构建,您可以像我一样在 docker 容器中执行此操作。这肯定会起作用,因为环境与我的情况完全相同。
构建完成后(退出容器之前),使用第二个终端运行以将docker cp bwabuild:/root/bwa/bwa .
bwa 程序从容器内复制到当前目录。
请注意:最后一种解决方案需要一定的工作才能构建它,但不一定能运行它。该程序是在假设某些库位于某些位置的情况下构建的。这些库在主机系统和容器中的位置可能不同(尽管这会让我感到惊讶,因为它们都基于 Ubuntu 18.04)
编辑:
我刚刚注意到这个程序也可以用 conda 安装:conda install -c bioconda bwa