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

[Cmake]Fix undefined symbol for std::filesystem under GCC8 + Linux #1333

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

Aurelius84
Copy link
Collaborator

@Aurelius84 Aurelius84 commented Jul 23, 2024

一、问题

在Linux机器GCC8版本以上,源码编译时正常,但import paddle2onnx 时会报如下错误:

  File "/workspace/pd2onnx-fork/paddle2onnx/convert.py", line 17, in <module>
    import paddle2onnx.paddle2onnx_cpp2py_export as c_p2o
ImportError: paddle2onnx_cpp2py_export.cpython-39-x86_64-linux-gnu.so: 
                      undefined symbol: _ZNKSt10filesystem7__cxx114path11parent_pathEv

二、修复

参考:https://discourse.cmake.org/t/correct-way-to-link-std-filesystem-with-gcc-8/4121/5

Copy link
Collaborator

@Zheng-Bicheng Zheng-Bicheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jzhang533 jzhang533 merged commit 6d921f6 into PaddlePaddle:develop Jul 23, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

3 participants