我正在尝试从 KDE(此处)编译 KArchive。显然我正在按照他们在安装文件中的说明进行操作。首先一切顺利,我只需要创建一个名为build的目录,并在其中使用它:
cmake .. \
-DCMAKE_BUILD_TYPE=debug \
-DCMAKE_INSTALL_PREFIX=/usr/local
进展顺利。当我必须使用时出现问题make。运行后,我收到以下错误:
/usr/bin/ld: /usr/local/lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against symbol BZ2_crc32Table can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libbz2.a(compress.o): relocation R_X86_64_32 against .rodata.str1.1 can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libbz2.a(decompress.o): relocation R_X86_64_32S against .rodata can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libbz2.a(blocksort.o): relocation R_X86_64_32 against .rodata.str1.1 can not be used when making a shared object; recompile with -fPIC
现在,这个问题并不少见,但大多数解决方案都对我不起作用。