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

Python binding failing compilation due to boost placeholder #38

Closed
Kotochleb opened this issue Sep 7, 2024 · 1 comment
Closed

Python binding failing compilation due to boost placeholder #38

Kotochleb opened this issue Sep 7, 2024 · 1 comment

Comments

@Kotochleb
Copy link

When trying to compile code from source on release, v0.0.5 I got errors like this:

In file included from /usr/include/boost/python.hpp:28,
                 from /home/user/mim_solvers/include/mim_solvers/python.hpp:12,
                 from /home/user/mim_solvers/bindings/utils/callbacks.cpp:10:
/usr/include/boost/python/exception_translator.hpp: In function 'void boost::python::register_exception_translator(Translate, boost::type<Target>*)':
/usr/include/boost/python/exception_translator.hpp:22:83: error: '_1' was not declared in this scope
   22 |         boost::bind<bool>(detail::translate_exception<ExceptionType,Translate>(), _1, _2, translate)

After some digging into the problem, I found that commenting out the following preprocessor directive solves the problem.

#define BOOST_BIND_NO_PLACEHOLDERS

I did not find usage of it in Crocoddyl source code, which makes me confused about why it is here in the first place.
After making the change locally, I tested python binging with solo12.py example and it seemed to work.

The code was compiled on Ubuntu 22.04, bare OS, no Conda environment.

@skleff1994
Copy link
Collaborator

Thanks for pointing this out ! solved by #39

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

2 participants