加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c – 当icqdesktop出错时如何编辑make文件(make:*** [all] Erro

发布时间:2020-12-16 07:23:26 所属栏目:百科 来源:网络整理
导读:我尝试编译 icqdesktop在ubuntu 18.04 64位上,我尝试: mkdir build cd build cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DLINUX_ARCH=64 make 但我有这个错误: [ 19%] Built target core[ 19%] Built target corelib[ 20%] Linking CXX ex
我尝试编译 icqdesktop在ubuntu 18.04 64位上,我尝试:

mkdir build && cd build && cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DLINUX_ARCH=64 && make

但我有这个错误:

[ 19%] Built target core
[ 19%] Built target corelib
[ 20%] Linking CXX executable ../../bin/Release64/icq

...
/usr/bin/x86_64-linux-gnu-ld: ../../external/linux/x64/libevent-2.1.8/lib/libevent.a(epoll.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: ../../external/linux/x64/libevent-2.1.8/lib/libevent.a(signal.o): relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: ../../external/linux/x64/libevent-2.1.8/lib/libevent_pthreads.a(evthread_pthread.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/x86_64-linux-gnu-ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
gui/CMakeFiles/icq.dir/build.make:16257: recipe for target '../bin/Release64/icq' failed
make[2]: *** [../bin/Release64/icq] Error 1
CMakeFiles/Makefile2:196: recipe for target 'gui/CMakeFiles/icq.dir/all' failed
make[1]: *** [gui/CMakeFiles/icq.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

我的问题是:(这不重复!!)

现在我如何将make文件更改为使用-fPIC标志重新编译.

解决方法

你可以编译调试模式:(它的工作正确)

mkdir build&& cd build&& cmake .. -G“Unix Makefiles”-DCMAKE_BUILD_TYPE = Debug -DLINUX_ARCH = 64&&使

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读