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

Numpy detection/support in Boost build system #111

Closed
1pakch opened this issue Feb 16, 2017 · 2 comments
Closed

Numpy detection/support in Boost build system #111

1pakch opened this issue Feb 16, 2017 · 2 comments

Comments

@1pakch
Copy link
Contributor

1pakch commented Feb 16, 2017

I am building Boost 1.63 (all libraries) as a nix package on a Linux machine. Depending on how I supply numpy to the build environment the libboost_numpy is either built or not (in all cases it is available to the relevant interpreter via import numpy).

I am not familiar with boost jam build system and find it very difficult to understand how it decides whether to build the numpy extension or not. Hence I would be grateful if someone could point me in the right direction. I could contribute to documenting that aspect of the build system as it is very well warranted IMO.

@stefanseefeld
Copy link
Member

For my own work I'm actually moving away from Boost.Build, as I want to build Boost.Python standalone (against a pre-installed Boost). For that I'm using SCons, With that, the build logic is set up to build with NumPy support whenever that is detected. To not build libboost_numpy even if NumPy was detected, you can use the --no-numpy option.

I don't think Boost.Build (b2) right now offers an option to disable libboost_numpy, so it would be built whenever NumPy is found.
You seem to suggest that that isn't the case, i.e. you observe b2 not building libboost_numpy, even though NumPy is installed. That would be a bug worth reporting. (If you want to debug this yourself, the relevant logic is in https://github.com/boostorg/build/blob/develop/src/tools/python.jam#L833-L851

@1pakch
Copy link
Contributor Author

1pakch commented Feb 16, 2017

Many thanks Stefan, with your help I was able to quickly find the relevant debug messages (via ./b2 -d 5 -n|grep -i -A 2 'python.debug-message' if someone will be looking here). There is no bug, the python interpreter supplied to the build system indeed had no numpy.

I also feel that for my work it's better to build Boost.Python against an existing Boost and I will probably switch to that.

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