【发布时间】:2017-05-17 14:08:46
【问题描述】:
您好,我尝试在 ubuntu 16.04 上编译 libgta 1.0.8 这发生了:(在终端上)
john@john-K53SV:~/gta/libgta$ sudo make
make all-recursive
make[1]: Entering directory '/home/john/gta/libgta'
Making all in doc
make[2]: Entering directory '/home/john/gta/libgta/doc'
doxygen doxyfile
make all-am
make[3]: Entering directory '/home/john/gta/libgta/doc'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/john/gta/libgta/doc'
make[2]: Leaving directory '/home/john/gta/libgta/doc'
Making all in src
make[2]: Entering directory '/home/john/gta/libgta/src'
CC gta.lo
CCLD libgta.la
/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
Makefile:441: recipe for target 'libgta.la' failed
make[2]: *** [libgta.la] Error 1
make[2]: Leaving directory '/home/john/gta/libgta/src'
Makefile:491: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/john/gta/libgta'
Makefile:400: recipe for target 'all' failed
make: *** [all] Error 2
我已在 Makefile (CFLAGS = -g -O2 -fPIC) 中添加了 -fPIC 标志,但它仍然无法正常工作!
请帮帮我。
【问题讨论】:
标签: ubuntu gcc makefile compilation