Open MeerMusik opened 3 years ago
This might be related to boostorg/build#481 where the Python installation is built with PyMalloc, so the header path has an m
suffix (e.g. path/to/Python/3.8.x/include/python3.8m
)
Wow. I totally forgot about that Bug Report. Thanks for the Hint adeadman!
A general FYI for People interested: Since I have reported this Bug, I am building Boost on Linux and Windows always with:
--without-python
as a work-around.
This does not change the Detection of Python as it is hard-coded in the configuration Files but compilation works fine.
I am not using the Boost Libs currently, so I am not aware of the Cons of not building with / against Python support.
Have a nice Day.
I needed to build the Boost.Python libraries back in 2012 or so, and it was an absolute nightmare back then. Now, here in 2023, I'm having to do it again, and having the same b2 and jam headaches. Even ChatGPT can't get it to compile.... All we really need is better documentation. For example, I'm running into the age-old problem of the compiler complaining about not finding Python.h. Capital P in Python.h, at least on this Linux machine. I'm an extensive user of conda environments, and I'm trying to bootstrap and b2 off of one of my environments. I've burned through 3 full days now trying to get the config right, and there seems to be no hope. Of all the code I have written over the decades of writing code, nothing has ever been as completely frustrating as trying to build Boost.Python with bootstrap and b2. I'm hoping that by venting here, I go back to my build project and it magically compiles so I can get on with what I need to be doing.
For what it is worth, as is often the case, after ranting publicly, I quickly came up with a solution that had been confounding me for days. My notes, should anyone care are here: github.com/rlovell3/boost_python_compile_notes. Those notes are for building on Ubuntu and associated flavors, using a highly customized conda environment running Python 3.11. Thank you to all the Boost contributors. Boost is truly an amazing work. b2 is still a pain though, but I get it.
Make sure you completed the following tasks
Environment and version details
Operating System+version: Windows 10, 20H2 (19042.906), x86_64
Compiler+version: GCC, MinGW-w64 on MSYS2, 10.2.0, x86_64
Shell: Bash, MSYS2, also tried to invoke the Script with sh - no difference
B2 Version: Output of
b2 -v
andb2 --version
B2 Configuration: Output of
b2 --debug-configuration
in your project.Bootstrapping is done. To build, run:
To generate header files, run:
The configuration generated uses gcc to build by default. If that is unintended either use the --with-toolset option or adjust configuration, by editing 'project-config.jam'.
Further information:
Command line help: ./b2 --help
Getting started guide: http://www.boost.org/more/getting_started/unix-variants.html
B2 documentation: http://www.boost.org/build/
Brief problem description
The Header File 'pyconfig.h' does not get found and compilation errors out:
Steps to reproduce the issue
I run the following Script (Snippet) to build the Boost Libraries from a locally fresh cloned Git Repository (Master Branch, 1.76):
Actual behavior summary
Also random stuff like this from the Internet did not help:
If a project of yours is blocked due to this bug, please, mention it explicitly.
Here is the cut Output from './b2 install -d2 --debug-configuration release link=static --prefix=${SYSTEMDRIVE}/Dev/Sources/GTK4/boost/x64/release/ 1>aaa.txt 2>&1':
If you want the whole Log I can upload it. Just let me know. It is 8.1 Megabyte of Text.
Expected behavior summary
The Header File 'pyconfig.h' should get detected correctly and the Boost Libraries should get compiled without further Issues.
Disclaimer: This is my first Day with Boost at all. I just need to build some Libs for some GTKMM4 Dependencies. And as I need to compile from Source anyway, to get Build Variants not provided by MSYS2, here I am reporting an 9 year old Issue.