Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined symbol: _ZN2cv6formatB5cxx11EPKcz #9

Open
Xiao-Ann opened this issue Jan 9, 2020 · 8 comments
Open

undefined symbol: _ZN2cv6formatB5cxx11EPKcz #9

Xiao-Ann opened this issue Jan 9, 2020 · 8 comments

Comments

@Xiao-Ann
Copy link

Xiao-Ann commented Jan 9, 2020

作者您好!
我已经生成了Augment.so文件,在运行脚本时出现了这个错误,不知道作者知道可能是什么引起的吗?感谢!
ImportError: /home/sun/sunny/projects/Decoupled-attention-network/Scene-Text-Image-Transformer/Augment.so: undefined symbol: _ZN2cv6formatB5cxx11EPKcz

@Canjie-Luo
Copy link
Owner

您好!当前的repo确实对依赖库的版本要求有点高,严格用我们推荐的python、GCC和boost版本即可解决。为了cmake的时候找对路径,建议用-D来指定路径。如果得到实验室许可,后续会上传一个更好的版本,且支持Python 3,OpenCV 3。

@Codermanok
Copy link

@Xiao-Ann
Hi,你好!中途遇到了类似的问题

undefined symbol: _ZN2cv3Mat10deallocateEv

使用GCC and MSVC C++ Demangler解析后发现是OpenCV的问题,OpenCV2.x在CUDA9.0或者高点的CUDA上容易出问题,所以首先检查下OpenCV 2.x的编译,检查完后重新make该工程可能最后还会遇到如下问题:

/usr/bin/ld: cannot find -lopencv_dep_nppial
/usr/bin/ld: cannot find -lopencv_dep_nppicc
/usr/bin/ld: cannot find -lopencv_dep_nppicom
/usr/bin/ld: cannot find -lopencv_dep_nppidei
/usr/bin/ld: cannot find -lopencv_dep_nppif
/usr/bin/ld: cannot find -lopencv_dep_nppig
/usr/bin/ld: cannot find -lopencv_dep_nppim
/usr/bin/ld: cannot find -lopencv_dep_nppist
/usr/bin/ld: cannot find -lopencv_dep_nppisu
/usr/bin/ld: cannot find -lopencv_dep_nppitc
collect2: error: ld returned 1 exit status

可以参考链接CentOS7下OpenCV2+CUDA9的编译问题解决最末尾的方法解决,希望对你有所帮助!

@RubanSeven
Copy link

我用python重写了这个代码,速度在14ms,有兴趣的可以支持下,https://github.com/RubanSeven/Text-Image-Augmentation-python

@WDONG66
Copy link

WDONG66 commented Mar 18, 2020

您好,我也遇到了相同的问题,_ZN2cv6formatB5cxx11EPKcz,所有的环境都是一样的,但是也不知道为什么,我c++filt命令看了一下,是cv::format()函数没有找到,可是我并没有grep到这个函数,版本是python 2.7.15 boost 1.67 opencv 2.4.11 gcc 4.8.5 ,有什么问题吗?或者您是怎么解决的呢?

@WDONG66
Copy link

WDONG66 commented Mar 18, 2020

是不是需要和cuda8搭配使用呢?

@Canjie-Luo
Copy link
Owner

@RubanSeven
谢谢关注和进一步的工作!但是纯Python版本效率低一些。我想,做成Pip安装库才是最方便的。另外,实验室内部有更好用的版本,安装极简,支持更高Python版本。欢迎合作!

@Canjie-Luo
Copy link
Owner

@WDONG66
理论上与CUDA无关,我想应该还是依赖库的指向没有对应。

@wangjue-wzq
Copy link

@Xiao-Ann 你好请问你解决了嘛,我也遇到类似的问题了 undefined symbol: _ZN2cv9rectangleERKNS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants