PaddlePaddle / models

Officially maintained, supported by PaddlePaddle, including CV, NLP, Speech, Rec, TS, big models and so on.
Apache License 2.0
6.89k stars 2.91k forks source link

undefined symbol: when trying PointNet++ #4677

Open MiiViiDynamics opened 4 years ago

MiiViiDynamics commented 4 years ago

Hi

I follow the following process to do the test. https://github.com/PaddlePaddle/models/tree/develop/PaddleCV/3d_vision/PointNet++

But I tried with the following paddle version, and get the same error.

I have set the LD_LIBRARY_PATH, and from the log, pointnet_lib.so is found. But failed due to link issue. Did I miss anything?

root@907039411a82:/paddle/models/PaddleCV/3d_vision/PointNet++/ext_op/src# ls farthest_point_sampling_op.cc gather_point_op.cu make.sh query_ball_op.cu three_nn_op.cc farthest_point_sampling_op.cu group_points_op.cc pointnet_lib.so three_interp_op.cc three_nn_op.cu gather_point_op.cc group_points_op.cu query_ball_op.cc three_interp_op.cu util.cu.h root@907039411a82:/paddle/models/PaddleCV/3d_vision/PointNet++/ext_op/src# bash make.sh /usr/local/lib/python2.7/dist-packages/paddle/include /usr/local/lib/python2.7/dist-packages/paddle/libs

root@907039411a82:/paddle/models/PaddleCV/3d_vision/PointNet++/ext_op/src# root@907039411a82:/paddle/models/PaddleCV/3d_vision/PointNet++/ext_op/src# root@907039411a82:/paddle/models/PaddleCV/3d_vision/PointNet++/ext_op/src# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:python -c 'import paddle; print(paddle.sysconfig.get_lib())' root@907039411a82:/paddle/models/PaddleCV/3d_vision/PointNet++/ext_op/src# cd .. root@907039411a82:/paddle/models/PaddleCV/3d_vision/PointNet++/ext_op# export PYTHONPATH=$PYTHONPATH:pwd root@907039411a82:/paddle/models/PaddleCV/3d_vision/PointNet++/ext_op# python tests/test_farthest_point_sampling_op.py W0531 08:31:49.706547 225 dynamic_loader.cc:120] Can not find library: /paddle/models/PaddleCV/3d_vision/PointNet++/ext_op/src/pointnet_lib.so. The process maybe hang. Please try to add the lib path to LD_LIBRARY_PATH. Traceback (most recent call last): File "tests/test_farthest_point_sampling_op.py", line 20, in import pointnet_lib File "/paddle/models/PaddleCV/3d_vision/PointNet++/ext_op/pointnet_lib.py", line 19, in fluid.load_op_library(os.path.join(file_dir, 'src/pointnet_lib.so')) File "/usr/local/lib/python2.7/dist-packages/paddle/fluid/framework.py", line 5035, in load_op_library core.load_op_library(lib_filename) paddle.fluid.core_avx.EnforceNotMet:


C++ Call Stacks (More useful to developers):

0 std::string paddle::platform::GetTraceBackString<char const>(char const&&, char const, int) 1 paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const, int) 2 paddle::platform::dynload::GetOpDsoHandle(std::string const&) 3 paddle::framework::LoadOpLib(std::string const&)


Error Message Summary:

Error: Failed to find dynamic library: /paddle/models/PaddleCV/3d_vision/PointNet++/ext_op/src/pointnet_lib.so ( /paddle/models/PaddleCV/3d_vision/PointNet++/ext_op/src/pointnet_lib.so: undefined symbol: _ZNK6paddle9framework12OperatorBase13DebugStringExB5cxx11EPKNS0_5ScopeE ) Please specify its path correctly using following ways: Method. set environment variable LD_LIBRARY_PATH on Linux or DYLD_LIBRARY_PATH on Mac OS. For instance, issue command: export LD_LIBRARY_PATH=... Note: After Mac OS 10.11, using the DYLD_LIBRARY_PATH is impossible unless System Integrity Protection (SIP) is disabled. at (/paddle/paddle/fluid/platform/dynload/dynamic_loader.cc:177)

heavengate commented 4 years ago

这个报错是因为编译ext_op的cmake版本和编译Paddle的cmake版本不一致导致的,看你是通过conda安装的我们发布的pip包,我们发布的包是使用cmake 4.8.5编译的,如果是安装我们发布的pip包需要用cmake 4.8.x版本来编译ext_op,可以更换一下cmake版本试下。 或者也可以尝试一下编译安装Paddle https://www.paddlepaddle.org.cn/documentation/docs/zh/install/compile/fromsource.html

MiiViiDynamics commented 4 years ago

您确定是cmake 4.8.x么? 目前cmake最新的release也才3.17 https://cmake.org/download/

zhufeng888 commented 4 years ago

应该是说错了,是指g++版本是4.8.x才行,而不是cmake?我也遇到了这个问题,难搞

XiaXingLuo commented 3 years ago

应该是说错了,是指g ++版本是4.8.x才行,而不是cmake?我也遇到了这个问题,难搞

你解决了嘛?g++版本在ai stuidio下无法自己降级安装,脑阔痛

zhufeng888 commented 3 years ago

应该是说错了,是指g ++版本是4.8.x才行,而不是cmake?我也遇到了这个问题,难搞

你解决了嘛?g++版本在ai stuidio下无法自己降级安装,脑阔痛

可以自己在线下先编译好,然后再把编译好的文件上传到ai studio内运行

zhufeng888 commented 3 years ago

应该是说错了,是指g ++版本是4.8.x才行,而不是cmake?我也遇到了这个问题,难搞

你解决了嘛?g++版本在ai stuidio下无法自己降级安装,脑阔痛 我有传到公开项目里,你可以直接fork运行。 https://aistudio.baidu.com/aistudio/projectdetail/891826?channelType=0&channel=0

XiaXingLuo commented 3 years ago

应该是说错了,是指g ++版本是4.8.x才行,而不是cmake?我也遇到了这个问题,难搞

你解决了嘛?g++版本在ai stuidio下无法自己降级安装,脑阔痛 我有传到公开项目里,你可以直接fork运行。 https://aistudio.baidu.com/aistudio/projectdetail/891826?channelType=0&channel=0

谢谢老哥 我才开始动手搞,谢谢你的项目。