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

pyadolc will not build with boost 1.65 ("obsoleted" boost::python::numeric API) #29

Open
paulrozdeba opened this issue Oct 19, 2017 · 2 comments

Comments

@paulrozdeba
Copy link
Contributor

The build step of pyadolc, i.e. running
python setup.py build
fails when version 1.65 of boost is installed on the system. The first error message thrown is:

gcc: adolc/src/py_adolc.cpp
In file included from adolc/src/py_adolc.hpp:5:0,
                 from adolc/src/py_adolc.cpp:3:
adolc/src/num_util.h:32:18: error: ‘numeric’ in namespace ‘boost::python’ does not name a type
   boost::python::numeric::array makeNum(boost::python::object x);
                  ^~~~~~~

followed by many similar error messages related to the boost::python::numeric namespace.

According to the boost 1.65.1 release notes:

The boost::python::numeric API has been removed, as it is being obsoleted by boost::python::numpy.

In other words I think the solution may be to change all references to the old namespace to the new numpy namespace. I'm going to try this out and, if it works, submit a pull request.

@paulrozdeba paulrozdeba changed the title pyadolc will not build with boost 1.65 ("obsoleted" boost:python::numeric API) pyadolc will not build with boost 1.65 ("obsoleted" boost::python::numeric API) Oct 19, 2017
@paulrozdeba
Copy link
Contributor Author

After changing references to boost::python::numeric to boost::python::numpy, and also taking the error message in my previous comment into account, I think the problem is more complicated. There is some issue with the numpy array dtype being fed to makeNum (scattered throughout num_util.h and num_util.cpp), I'm just not exactly sure what's going on at the moment.

Here's a link to all the error messages I get (on pastebin).

Note: pyadolc still builds successfully with boost 1.64.0 on my system.

@b45ch1
Copy link
Owner

b45ch1 commented Oct 19, 2017

Brad Bell might have solved a similar problem for pycppad. I recommend looking at the pycppad build process, before attempting to adapt pyadolc to boost >= 1.65.1.

I don't have time to do it myself but can offer to test and merge a PR.

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