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

Compilation of PaddlePaddle's C_API meets error #3329

Closed
gongweibao opened this issue Aug 8, 2017 · 2 comments
Closed

Compilation of PaddlePaddle's C_API meets error #3329

gongweibao opened this issue Aug 8, 2017 · 2 comments
Assignees

Comments

@gongweibao
Copy link
Contributor

gongweibao commented Aug 8, 2017

When I was compiling the C-API of PaddlePaddle, I got an error:

CMake Error at cmake/generic.cmake:185 (add_dependencies):
  The dependency target "python" of target "paddle_pybind" does not exist.
Call Stack (most recent call first):
  paddle/framework/CMakeLists.txt:40 (cc_library)

And the CI environment in our company meets the same error.

@gongweibao
Copy link
Contributor Author

gongweibao commented Aug 8, 2017

When we build the PaddlePaddle inference library, a.k.a. the C-API, we'd like to disable Python, because we don't need to generate the training system's Python API.

However, in the newly added paddle/framework package, we have a rule building the Python binding which links to libpython. This rule would fail when we are building the inference library and set WITH_PYTHON and WITH_SWIG_PY as OFF.

The solution is

  1. Enclose the Python binding rule by checking if Python is enabled,
  2. Control Python enabling parameters in build.sh.

@gongweibao
Copy link
Contributor Author

感谢益哥手把手的改动!

heavengate pushed a commit to heavengate/Paddle that referenced this issue Aug 16, 2021
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

1 participant