InceptText-Tensorflow icon indicating copy to clipboard operation
InceptText-Tensorflow copied to clipboard

cd /lib;./make.sh error

Open zhangtao22 opened this issue 7 years ago • 42 comments

/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1265): warning: calling a constexpr host function("real") from a host device function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this lib/python2.7/site-packages/tensorflow/include/unsupported/Eigen/CXX11/../../../Eigen/src/Core/MathFunctions.h(1270): warning: calling a constexpr host function("real") from a host device function("abs") is not allowed. The experimental flag '--expt-relaxed-constexpr' can be used to allow this. why?

zhangtao22 avatar Sep 27 '18 02:09 zhangtao22

what is your gcc version and python version?

FakerYFX avatar Sep 27 '18 03:09 FakerYFX

中间有两个编译依赖错误,我都解决了,最后编译出来了,报了一个这个错误 tensorflow.python.framework.errors_impl.NotFoundError: /home/zhangtao/work/InceptText-Tensorflow/lib/deform_conv_layer/deform_conv.so: undefined symbol: _ZN10tensorflow8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev

zhangtao22 avatar Sep 27 '18 03:09 zhangtao22

just follow this one CharlesShang/TFFRCNN#108

FakerYFX avatar Sep 27 '18 05:09 FakerYFX

我这边是gcc5,是把下边注释打开,把上边注释掉是吧,Python是2.7

if you install tf using already-built binary, or gcc version 4.x, uncomment the two lines be low

g++ -std=c++11 -shared -o roi_pooling.so roi_pooling_op.cc
roi_pooling_op.cu.o -I $TF_INC -I $NSYNC_INC -fPIC -D GOOGLE_CUDA -lcudart -L $CUDA_HOM E/lib64 -L $TF_LIB -ltensorflow_framework -D_GLIBCXX_USE_CXX11_ABI=0

for gcc5-built tf

g++ -std=c++11 -shared -o roi_pooling.so roi_pooling_op.cc \

roi_pooling_op.cu.o -I $TF_INC -I $NSYNC_INC -fPIC -D GOOGLE_CUDA -lcudart -L $CUDA_HOM E/lib64 -L $TF_LIB -ltensorflow_framework -D_GLIBCXX_USE_CXX11_ABI=0

zhangtao22 avatar Sep 27 '18 06:09 zhangtao22

yes,have a try

FakerYFX avatar Sep 27 '18 06:09 FakerYFX

试了,把所有gcc5打开,上边的注释掉,还是这个错误tensorflow.python.framework.errors_impl.NotFoundError: /home/zhangtao/work/InceptText-Tensorflow/lib/deform_conv_layer/deform_conv.so: undefined symbol: _ZN10tensorflow8internal21CheckOpMessageBuilder9NewStringB5cxx11Ev

zhangtao22 avatar Sep 27 '18 06:09 zhangtao22

follow this One https://github.com/Zardinality/TF_Deformable_Net

FakerYFX avatar Sep 27 '18 06:09 FakerYFX

感觉除了降gcc g++版本没有其他办法了

zhangtao22 avatar Sep 27 '18 07:09 zhangtao22

@zhangtao22 请问除了去gcc5相关掉注释,还用改其他值吗?我报错跟你不一样。

4 errors detected in the compilation of "/tmp/tmpxft_00005a43_000000007_deform_psroi_pooling_op_gpu.cu.cpp1.ii". g++: error: deform_psroi_pooling_op.cu.o: No such file or directory

undefined symbol: _ZTIN10tensorflow8OpKernelE**

ccnankai avatar Sep 27 '18 08:09 ccnankai

你这个问题我没有遇到过啊

zhangtao22 avatar Sep 27 '18 08:09 zhangtao22

好吧,谢谢。

ccnankai avatar Sep 27 '18 09:09 ccnankai

have you solved your problem when change the gcc version @zhangtao22

FakerYFX avatar Sep 27 '18 12:09 FakerYFX

@xieyufei1993 没有

zhangtao22 avatar Sep 28 '18 02:09 zhangtao22

the error is what?

FakerYFX avatar Sep 29 '18 02:09 FakerYFX

还是解决不了啊

zhangtao22 avatar Sep 29 '18 06:09 zhangtao22

我都按照github上面的答案,试了个遍,没解决。

ccnankai avatar Sep 29 '18 07:09 ccnankai

@ccnankai 你也是用的gcc5嘛?

zhangtao22 avatar Sep 29 '18 09:09 zhangtao22

我现在用虚拟机里面gcc4.9编译出来的deform_psroi_pooling.so替换了原来的同名库,还是有这个错误 undefined symbol: _ZTIN10tensorflow8OpKernelE

zhangtao22 avatar Sep 29 '18 09:09 zhangtao22

@zhangtao22 4.9 5.4 我都用了,不行。服了

ccnankai avatar Sep 29 '18 10:09 ccnankai

try this One image I also meet this error before

FakerYFX avatar Sep 30 '18 01:09 FakerYFX

@xieyufei1993 Thank you for your advice . use the command pip install tensorflow-gpu==1.3 or compile tensorflow source code ?

ccnankai avatar Sep 30 '18 04:09 ccnankai

just use the command pip install tensorflow-gpu==1.3

FakerYFX avatar Sep 30 '18 06:09 FakerYFX

I just come back to class, thank you for your advice .

ccnankai avatar Oct 09 '18 01:10 ccnankai

我执行了pip install tensorflow-gpu==1.3.0 --user,然后进入lib文件夹下make,出现/usr/bin/ld: cannot find -ltensorflow_framework

zhangtao22 avatar Oct 10 '18 02:10 zhangtao22

@zhangtao22 设这个问题。各种我都试了 跑不起来 问题出在 “nvcc -std=c++11 -c -o deform_psroi_pooling_op.cu.o deform_psroi_pooling_op_gpu.cu.cc -I $TF_INC -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -D GOOGLE_CUDA -arch=$ARCH“” 不能生成deform_psroi_pooling_op.cu.o 弄了好多天 ,哎

ccnankai avatar Oct 10 '18 02:10 ccnankai

@ccnankai 你解决了吗?怎么解决的?

zhangtao22 avatar Oct 10 '18 02:10 zhangtao22

@zhangtao22 没解决 ,所有环境我都试了,换了机器都不行,只编译通过TFFRCNN 我没查到解决方法。

ccnankai avatar Oct 10 '18 02:10 ccnankai

@zhangtao22 这篇论文泛化能力强吗?能检测较长的文字行吗? 效果不咋样的话,我就放弃了

ccnankai avatar Oct 10 '18 02:10 ccnankai

@ccnankai 应该可以吧,我还没有试。你现在gcc,g++,tensorflow都是什么版本,什么问题

zhangtao22 avatar Oct 10 '18 02:10 zhangtao22

@zhangtao22 好像跟g++版本没什么关系 tensorflow 1.0 1.3 1.4 1.11我都试了 都是can't find deform_psroi_pooling_op.cu.o 你这个问题 /usr/bin/ld: cannot find -ltensorflow_framework 1.4以上版本就没有了

ccnankai avatar Oct 10 '18 03:10 ccnankai