C++链接报错:which may bind externally can not be used when making a shared object; recompile with -fPIC
ngrest kyai编译运行的时候报错了
root@ubuntu:/kyai_nv# Building project kyai...
make[2]: Warning: File 'kyai/CMakeFiles/kyai.dir/flags.make' has modification time 30937670 s in the future
make[2]: warning: Clock skew detected. Your build may be incomplete.
make[2]: Warning: File 'kyai/CMakeFiles/kyai.dir/flags.make' has modification time 30937670 s in the future
/usr/bin/ld: /userdata/temp/libky_ai_socket.a(ky_ai_socket.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `filename' which may bind externally can not be used when making a shared object; recompile with -fPIC
/userdata/temp/libky_ai_socket.a(ky_ai_socket.o): In function `ky_ai_restart_algo(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
ky_ai_socket.cpp:(.text+0xe68): dangerous relocation: unsupported relocation
/usr/bin/ld: /userdata/temp/libky_ai_socket.a(ky_ai_socket.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZGVZ9KY_AI_LOGIA23_cJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA2_cEEvRKT_DpRKT0_E10s_ky_ai_fs' which may bind externally can not be used when making a shared object; recompile with -fPIC
/userdata/temp/libky_ai_socket.a(ky_ai_socket.o): In function `void KY_AI_LOG<char [23], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char [2]>(char const (&) [23], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const (&) [2])':
ky_ai_socket.cpp:(.text._Z9KY_AI_LOGIA23_cJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA2_cEEvRKT_DpRKT0_[_Z9KY_AI_LOGIA23_cJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA2_cEEvRKT_DpRKT0_]+0x2c): dangerous relocation: unsupported relocation
/usr/bin/ld: /userdata/temp/libky_ai_socket.a(ky_ai_socket.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_ZGVZ9KY_AI_LOGIA23_cJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA2_cEEvRKT_DpRKT0_E10s_ky_ai_fs' which may bind externally can not be used when making a shared object; recompile with -fPIC
解决方法:
同C/C++链接静态库报错:dangerous relocation: unsupported relocation(-fPIC)
C++链接报错:which may bind externally can not be used when making a shared object; recompile with -fPIC相关推荐
- 编译动态库时报错relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile
这个是由于编译单个c文件时没有指定-fPIC标志,而链接的时候又指定了-fPIC标志,那么最终链接时指定这个就会报错. 只需要在编译C文件时也加上这个选项就可以了. CFLAGS += -fPIC
- xshell进行ssh链接报错“所选的用户密钥未在远程主机上注册”处理
xshell进行ssh链接报错"所选的用户密钥未在远程主机上注册"处理 一.报错情况 二.控制台登录主机 三.解决步骤 1.重新生成公私钥 2./root/.ssh/authori ...
- VS Code远程链接报错Could not establish connection to “hz-t2.matpool.com”
VS Code远程链接报错Could not establish connection to "hz-t2.matpool.com" 输出的部分内容 ## 解决方法1 git fo ...
- webdriver 爬虫 java_java爬虫通过selenium+WebDriver遍历页面链接报错
背景 由于要爬取的页面,每个链接的请求都是点击之后js动态发起的,目标数据也多是js动态生成的,所以使用selenium工具+webdriver(调试用的是chrome,具体使用准备用phantomj ...
- 链接报错:ld: 1 duplicate symbol for architecture x86_64
一.问题原因 ld: 1 duplicate symbol for architecture x86_64 出现错误的原因是:重复定义. 完整的报错信息: ld: 1 duplicate symbol ...
- gitee 链接报错
一.gitee下载 https://git-scm.com/downloads http://npm.taobao.org/mirrors/git-for-windows/v2.26.2.window ...
- php ftp报错,ftp工具链接报错530错误详解
使用php空间的站长朋友,ftp工具是我们常常使用的一个管理站点的工具,那么之前无忧主机小编对其很多的报错做出了详解,那么今天无忧主机小编吧530报错的类型拿出来进行讨论一下,这个毕竟是很多的站点朋友 ...
- 【Linux动态库.so/ELF文件】链接报错:/usr/bin/ld: 当搜索用于 .//libzlog.so 时跳过不兼容的 -lzlog
已解决. 已经使用arm交叉编译工具链,出现了新的问题,原来正常的zmq出现了不可识别的格式错误: 查看软连接是否存在,发现只有一份zmq,复制两份zmq后,重新编译恢复正常: 编译成功. 但是查看该 ...
- postgresql安装后链接报错psql: FATAL: Ident authentication failed for user “postgres“
postgresql 安装成功后,使用链接语句链接 [root@iZbp1hdum7hefdeb75mnyfZ ~]# psql -d postgres -U postgres -W Password ...
- zookpeer链接报错Socket is not connected
相关报错代码 Object waiter = new Object();ZooKeeper zkClient;try{synchronized (waiter) {final CountDownLat ...
最新文章
- 常见的块状和内联元素
- POJ - 3268 Silver Cow Party(最短路)
- LeetCode 第 22 场双周赛(220/2041,前10.8%)
- 检索有关计算机系统功能设计方面的文献,文献检索系统
- 基础算法 —— 高精度计算 —— 高精度加法
- JavaScript设计模式(一)-- 简单工厂模式
- JS-内置对象内置构造函数事件-拖拽轮播图无缝滚动
- KDD2020 | 半监督迁移协同过滤推荐
- Vue学习笔记之09-v-model双向绑定
- linux 安装 yum
- 爬虫教程( 6 ) --- 爬虫 进阶、扩展
- 达摩达兰论估价pdf_应用公司理财PDF下载_(美)阿斯瓦斯・达摩达兰_机械工业出版社_会计_管理_零度图书网...
- Python正则表达式去除符号
- 在x64上构建智能家居(home assistant) (一) Supervised版本安装
- TotalControl连接问题
- cs1.5小地图如何加机器人 电脑人 POD2.5
- 自己动手实现@Autowired注解
- Koo叔说Shader—最基本的Shader
- 淘宝客微信html5,微信H5支付配置
- 初步认识C语言中的选择和循环语句