c++ - Linking problems due to symbols with abi::cxx11?
看错误内容:
/data/projects/LipReadingSDKGPU/lib/cwlibs/libLipReading.so: undefined reference to `tensorflow::Status::ToString[abi:cxx11]() const'
/data/projects/LipReadingSDKGPU/lib/cwlibs/libLipReading.so: undefined reference to `tensorflow::ReadBinaryProto(tensorflow::Env*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::MessageLite*)'
/data/projects/LipReadingSDKGPU/lib/cwlibs/libLipReading.so: undefined reference to `google::protobuf::internal::fixed_address_empty_string[abi:cxx11]'
/data/projects/LipReadingSDKGPU/lib/cwlibs/libLipReading.so: undefined reference to `tensorflow::internal::CheckOpMessageBuilder::NewString[abi:cxx11]()'
/data/projects/LipReadingSDKGPU/lib/cwlibs/libLipReading.so: undefined reference to `tensorflow::strings::StrCat[abi:cxx11](tensorflow::strings::AlphaNum const&)'
stackoverflow上一个友人的解释:
I suspect this is a C++ ABI issue. The ABI for std::string has changed in GCC (related to C++ requirements, but it applies even if you aren't using C++11). See:
https://gcc.gnu.org/gcc-5/changes.html#libstdcxx If libprotobuf was built with GCC .x or prior, but your app is built with GCC , then you will see problems, because libprotobuf uses std::string in its interface. You have two options: .Rebuild libprotobuf with GCC (but now any apps built with GCC won't work with the new version of libprotobuf).
.Build you app with -D_GLIBCXX_USE_CXX11_ABI= as described at the above link. This will force GCC to use the old ABI version.
这个错误是在我把gcc4.8编的工程迁移到ubuntu16.04(gcc5.4)上编译时候发生的。这是C++ ABI一个错误,gcc4升gcc5时,std::string库接口做了迁移,而我工程中用了三方库tensorflow和protobuf,protobuf中用到了std::string。已经编好的tensorflow是用gcc4.8编的,gcc5上链接,接口对不上。两种解决方案:一种用gcc5重新编译三方库和工程,另一种就是在工程的编译选项(而不是链接选项)上加上-D_GLIBCXX_USE_CXX11_ABI=0参数,强制使用旧接口,问题解决。
更详细的解释可以参考:http://www.itkeyword.com/doc/8367047421581508x309/linking-problems-due-to-symbols-with-abicxx11
c++ - Linking problems due to symbols with abi::cxx11?的更多相关文章
- Xcode Build Setting Reference
https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/ ...
- Extremely fast hash algorithm-xxHash
xxHash - Extremely fast hash algorithm xxHash is an Extremely fast Hash algorithm, running at RAM sp ...
- Java多线程系列--“JUC集合”10之 ConcurrentLinkedQueue
概要 本章对Java.util.concurrent包中的ConcurrentHashMap类进行详细的介绍.内容包括:ConcurrentLinkedQueue介绍ConcurrentLinkedQ ...
- [Artoolkit] Can I Use LGPL code for commercial application
这是一个比较普遍但又容易被忽略的问题. From: http://answers.google.com/answers/threadview/id/439136.html 假设背景: - want t ...
- c malloc分配内存
php中的内存分配有用类似emalloc这样的函数,emalloc实际上是C语言中的malloc的一层封装,php启动后,会向OS申请一块内存,可以理解为内存池,以后的php分配内存都是在这块内存池中 ...
- OPENVPN2.3配置文档官方说明
openvpn Section: Maintenance Commands (8)Index NAME openvpn - secure IP tunnel daemon. SYNOPSIS open ...
- malloc.c
glibc-2.14中的malloc.c源代码,供研究malloc和free实现使用: /* Malloc implementation for multiple threads without lo ...
- gcc6.3编译c++11的程序链接opencv时字符型函数未定义
在Windows下编写图像处理程序,由于要使用regex,升级了mingw,编译c++11代码.之前代码中使用了opencv2.4.10,一直运行良好,升级编译器以后发现了错误:undefined r ...
- J.U.C并发框架源码阅读(十)ConcurrentLinkedQueue
基于版本jdk1.7.0_80 java.util.concurrent.ConcurrentLinkedQueue 代码如下 /* * ORACLE PROPRIETARY/CONFIDENTIAL ...
随机推荐
- Centos7 用户登录失败N次后锁定用户禁止登陆
参考网站:https://blog.csdn.net/qq_33285112/article/details/78813369 未试 思路是查找/var/log/secure中验证失败且出现的次数较 ...
- java poi处理excel多sheet并实现排序
需求:有一个数据字典全量汇总表,其中第一个sheet为目录,包括编号和表名,第二个以后为表的明细.其中sheet名就是表名但无序,sheet内字段序号无序有空行 现在要求将其中101,104,107, ...
- react-navigation,StackNavigator,TabNavigator 导航使用
StackNavigator 参考这里 TabNavigator 参考这里 是一个组合,我把这2个写在一起了 代码: import React, { Component } from 'react ...
- 20165304学习基础和C语言基础调查
20165304学习基础和C语言基础调查 你有什么技能比大多人(超过90%以上)更好? 我觉得自己应该算是一个比较宅的人,因为在高中的时候我在外边租房子住,我爸妈都去上班,平时就只有我自己,当然只能自 ...
- win7系统svn创建版本库
1. 在svn所在的服务器上, 找到它的目录, 右击创建项目名称文件夹, 然后右击该文件夹创建版本库 2. 创建版本库之后, 会出现几个文件夹, 打开conf文件夹, 修改里面的配置文件 3. 在自 ...
- jsfl 将库中声音放置到时间轴上
setBrokenFrames("cz1.mp3",2); /**/ /*<--------------将库中声音放置到时间轴上------------->*/ /** ...
- Java IO流学习总结五:转换流-InputStreamReader、OutputStreamWriter
类的继承关系 Reader |__ BufferedReader.StringReader.InputStreamReader |__ FileReader Writer |__ BufferedWr ...
- linux suse 3.0.101的一次中断暴增的排查
本文相关背景知识可以在:http://man7.org/linux/man-pages/man5/proc.5.html?spm=5176.100239.blogcont6047.8.ImCGpr 看 ...
- VS Code 使用笔记
改变 UI 语言 How to change UI language in Visual Studio Code? 设置 Tab 空格 How to set tab-space style?
- 18.2 不同用户 不同颜色光标 redis
上次,我们完成了 change 这个event 通过 collaborationsrvice 与 server 进行 sockrt io 将 client端的监听的 change 发给 server ...