[英]Error when building boost 1.61 iostreams - recompile with -fPIC
I am trying to build iostreams
boost library. 我正在尝试构建
iostreams
Boost库。 I downloaded bzip2 library from here: http://www.bzip.org/downloads.html 我从这里下载了bzip2库: http : //www.bzip.org/downloads.html
I built it and installed using make install
. 我构建并使用
make install
。 When I try to build boost using ./b2 install
I get this error: 当我尝试使用
./b2 install
构建boost时, ./b2 install
以下错误:
...patience...
...found 25987 targets...
...updating 3 targets...
gcc.link.dll bin.v2/libs/iostreams/build/gcc-4.8.5/release/threading-multi/libboost_iostreams.so.1.61.0
/usr/bin/ld: /usr/local/lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against `BZ2_crc32Table' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libbz2.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Just as warning suggest you should recompile bzip2
with -fPIC
option. 就像警告建议您应该使用
-fPIC
选项重新编译bzip2
。 You only need to add it into CFLAGS
list in Makefile
, like it is done in Makefile-libbz2_so
. 您只需将其添加到
Makefile
CFLAGS
列表中,就像在Makefile-libbz2_so
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.