gpt4 book ai didi

c++ - 当出现 icq 桌面错误时如何编辑 makefile (make : *** [all] Error 2) Ubuntu 18. 04 64 bit

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:14:25 24 4
gpt4 key购买 nike

我尝试编译 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 标志重新编译。

最佳答案

你可以编译 Debug模式:(它的工作正常)

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

关于c++ - 当出现 icq 桌面错误时如何编辑 makefile (make : *** [all] Error 2) Ubuntu 18. 04 64 bit,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50786545/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com