Paddle Merge 45998 undefined reference error -DWITH_DISTRIBUTE=OFF

wgx48brx  于 2022-10-20  发布在  其他
关注(0)|答案(3)|浏览(902)

bug描述 Describe the Bug

链接libpaddle.so出现问题
undefined reference to `paddle::pybind::StopWorker(pybind11::module*)'

[build] /usr/bin/ld: /home/wjl/gitlab_xdx/paddle_opencl_backend/lib/libpaddle.so: undefined reference to `paddle::pybind::StopWorker(pybind11::module*)'[build] /usr/bin/ld: /home/wjl/gitlab_xdx/paddle_opencl_backend/lib/libpaddle.so: undefined reference to `shm_unlink'[build] /usr/bin/ld: /home/wjl/gitlab_xdx/paddle_opencl_backend/lib/libpaddle.so: undefined reference to `paddle::pybind::StartClient(pybind11::module*)'[build] /usr/bin/ld: /home/wjl/gitlab_xdx/paddle_opencl_backend/lib/libpaddle.so: undefined reference to `paddle::pybind::InitAndSetAgentInstance(pybind11::module*)'[build] /usr/bin/ld: /home/wjl/gitlab_xdx/paddle_opencl_backend/lib/libpaddle.so: undefined reference to `shm_open'[build] /usr/bin/ld: /home/wjl/gitlab_xdx/paddle_opencl_backend/lib/libpaddle.so: undefined reference to `paddle::pybind::GetCurrentWorkerInfo(pybind11::module*)'[build] /usr/bin/ld: /home/wjl/gitlab_xdx/paddle_opencl_backend/lib/libpaddle.so: undefined reference to `paddle::pybind::BindFuture(pybind11::module*)'[build] /usr/bin/ld: /home/wjl/gitlab_xdx/paddle_opencl_backend/lib/libpaddle.so: undefined reference to `paddle::pybind::InvokeRpc(pybind11::module*)'[build] /usr/bin/ld: /home/wjl/gitlab_xdx/paddle_opencl_backend/lib/libpaddle.so: undefined reference to `paddle::pybind::GetWorkerInfo(pybind11::module*)'[build] /usr/bin/ld: /home/wjl/gitlab_xdx/paddle_opencl_backend/lib/libpaddle.so: undefined reference to `paddle::pybind::GetAllWorkerInfos(pybind11::module*)'[build] /usr/bin/ld: /home/wjl/gitlab_xdx/paddle_opencl_backend/lib/libpaddle.so: undefined reference to `paddle::pybind::StartWorker(pybind11::module*)'[build] /usr/bin/ld: /home/wjl/gitlab_xdx/paddle_opencl_backend/lib/libpaddle.so: undefined reference to `paddle::pybind::BindWorkerInfo(pybind11::module*)'[build] /usr/bin/ld: /home/wjl/gitlab_xdx/paddle_opencl_backend/lib/libpaddle.so: undefined reference to `paddle::pybind::GetWorkerInfoByRank(pybind11::module*)

原因引起:
#45998

这个PR 有BUG。
paddle/fluid/pybind/pybind.cc
Line 2611


# if defined(__linux__) && !defined(PADDLE_WITH_XPU) &&               \

    !defined(PADDLE_WITH_ASCEND_CL) && !defined(PADDLE_WITH_CINN) && \
    !defined(PADDLE_WITH_HIP)
  BindWorkerInfo(&m);
  BindFuture(&m);
  InitAndSetAgentInstance(&m);
  InvokeRpc(&m);
  StartWorker(&m);
  StartClient(&m);
  StopWorker(&m);
  GetWorkerInfo(&m);
  GetWorkerInfoByRank(&m);
  GetCurrentWorkerInfo(&m);
  GetAllWorkerInfos(&m);

# endif

这段代码需要在 -DWITH_DISTRIBUTE=OFF 情况下关闭掉

其他补充信息 Additional Supplementary Information

  • No response*
0yycz8jy

0yycz8jy1#

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看 官网API文档常见问题历史IssueAI社区 来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

osh3o9ms

osh3o9ms2#

@Ningsir #47026 这里你是修复了没

pepwfjgg

pepwfjgg3#

麻烦拉一下这个 #47026 ,里面修复了这个问题

相关问题