[python] Building and Testing needs to be updated for modular-boost

Attempting to follow the building and testing explanation for Boost.Python in modular-boost, it appears it no longer works with the new structure of modular-boost and Boost Build. Staring with the 3.1 Basic Procedure section I invoke in the libs/python/example/quickstart/ directory the command:
b2 toolset=gcc-4.8.1 --verbose-test test
only to receive:
Unable to load Boost.Build: could not find build system. --------------------------------------------------------- C:\Programming\VersionControl\modular-boost\libs\python\example\quickstart\boost-build.jam attempted to load the build system by invoking
'boost-build ../../../../tools/build/v2 ;'
but we were unable to find "bootstrap.jam" in the specified directory or in BOOST_BUILD_PATH (searching C:\Programming\VersionControl\modular-boost\libs\python\example\quickstart\../../../../tools/build/v2).
Please consult the documentation at 'http://www.boost.org'.
I do not know who is taking care of Boost Python now but it appears that it needs to be updated for modular-boost.

Hi Edward, Am Freitag, 1. August 2014, 21:42:57 schrieb Edward Diener:
Attempting to follow the building and testing explanation for Boost.Python in modular-boost, it appears it no longer works with the new structure of modular-boost and Boost Build.
Staring with the 3.1 Basic Procedure section I invoke in the
libs/python/example/quickstart/ directory the command:
b2 toolset=gcc-4.8.1 --verbose-test test
I do not know who is taking care of Boost Python now but it appears that it needs to be updated for modular-boost.
It even needs more caretaking. After fixing boost-build.jam to point to the new build system location, I had to tweak the example itself. Full patch to get things compiling again attached. Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu ! Germany

On 8/2/2014 5:31 AM, Jürgen Hunold wrote:
Hi Edward,
Am Freitag, 1. August 2014, 21:42:57 schrieb Edward Diener:
Attempting to follow the building and testing explanation for Boost.Python in modular-boost, it appears it no longer works with the new structure of modular-boost and Boost Build.
Staring with the 3.1 Basic Procedure section I invoke in the
libs/python/example/quickstart/ directory the command:
b2 toolset=gcc-4.8.1 --verbose-test test
I do not know who is taking care of Boost Python now but it appears that it needs to be updated for modular-boost.
It even needs more caretaking. After fixing boost-build.jam to point to the new build system location, I had to tweak the example itself. Full patch to get things compiling again attached.
Does not this need to go into the upcoming 1.56 release ?

Hi Edward, Am Samstag, 2. August 2014, 20:28:42 schrieb Edward Diener:
On 8/2/2014 5:31 AM, Jürgen Hunold wrote:
It even needs more caretaking. After fixing boost-build.jam to point to the new build system location, I had to tweak the example itself. Full patch to get things compiling again attached.
Does not this need to go into the upcoming 1.56 release ?
Well, the Boot.Build setup broke due to modularization. The other fault seems to be much older, so this should not be deemed release critical. It should certainly be fixed for 1.56.1 / 1.57.0 though. Would you prepare a pull request? I doubt that Boost.Python is actively maintained, so this might be an issue for the maintenance team. And it might be wise to add the example to the regression tests... Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu ! Germany

On 8/3/2014 12:12 PM, Jürgen Hunold wrote:
Hi Edward,
Am Samstag, 2. August 2014, 20:28:42 schrieb Edward Diener:
On 8/2/2014 5:31 AM, Jürgen Hunold wrote:
It even needs more caretaking. After fixing boost-build.jam to point to the new build system location, I had to tweak the example itself. Full patch to get things compiling again attached.
Does not this need to go into the upcoming 1.56 release ?
Well, the Boot.Build setup broke due to modularization. The other fault seems to be much older, so this should not be deemed release critical. It should certainly be fixed for 1.56.1 / 1.57.0 though.
Would you prepare a pull request? I doubt that Boost.Python is actively maintained, so this might be an issue for the maintenance team. And it might be wise to add the example to the regression tests...
When I tried the quickstart with your changes it fixes the Boost Build issue previously seen. But another issue occurs, both in the quickstart instructions or when I try to run bjam in the Boost Python build directory:
..\..\..\../boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory # include
Do you have any idea where pyconfig.h is supposed to be ?

On 8/3/2014 7:17 PM, Edward Diener wrote:
On 8/3/2014 12:12 PM, Jürgen Hunold wrote:
Hi Edward,
Am Samstag, 2. August 2014, 20:28:42 schrieb Edward Diener:
On 8/2/2014 5:31 AM, Jürgen Hunold wrote:
It even needs more caretaking. After fixing boost-build.jam to point to the new build system location, I had to tweak the example itself. Full patch to get things compiling again attached.
Does not this need to go into the upcoming 1.56 release ?
Well, the Boot.Build setup broke due to modularization. The other fault seems to be much older, so this should not be deemed release critical. It should certainly be fixed for 1.56.1 / 1.57.0 though.
Would you prepare a pull request? I doubt that Boost.Python is actively maintained, so this might be an issue for the maintenance team. And it might be wise to add the example to the regression tests...
When I tried the quickstart with your changes it fixes the Boost Build issue previously seen. But another issue occurs, both in the quickstart instructions or when I try to run bjam in the Boost Python build directory:
..\..\..\../boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory # include
Do you have any idea where pyconfig.h is supposed to be ?
Please ignore. It was a user ( me ) error.

On 8/2/2014 5:31 AM, Jürgen Hunold wrote:
Hi Edward,
Am Freitag, 1. August 2014, 21:42:57 schrieb Edward Diener:
Attempting to follow the building and testing explanation for Boost.Python in modular-boost, it appears it no longer works with the new structure of modular-boost and Boost Build.
Staring with the 3.1 Basic Procedure section I invoke in the
libs/python/example/quickstart/ directory the command:
b2 toolset=gcc-4.8.1 --verbose-test test
I do not know who is taking care of Boost Python now but it appears that it needs to be updated for modular-boost.
It even needs more caretaking. After fixing boost-build.jam to point to the new build system location, I had to tweak the example itself. Full patch to get things compiling again attached.
With the example that you tweaked I get:
embedding.cpp: In function 'void exec_test()': embedding.cpp:56:48: error: 'PyInit_embedded_hello' was not declared in this scope if (PyImport_AppendInittab("embedded_hello", PyInit_embedded_hello) == -1)
It appears that the change you made in embedding.cpp is not correct, or I am doing something wrong.

Hi Edward, Am Montag, 4. August 2014, 11:55:12 schrieb Edward Diener:
On 8/2/2014 5:31 AM, Jürgen Hunold wrote:
It even needs more caretaking. After fixing boost-build.jam to point to the new build system location, I had to tweak the example itself. Full patch to get things compiling again attached.
With the example that you tweaked I get:
embedding.cpp: In function 'void exec_test()': embedding.cpp:56:48: error: 'PyInit_embedded_hello' was not declared in this scope> if (PyImport_AppendInittab("embedded_hello", PyInit_embedded_hello) == -1)
It appears that the change you made in embedding.cpp is not correct, or I am doing something wrong.
Which Python do you use? I have Python-3.4 installed, this would be one possible reason. Does the example compile without my patch on your system? Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! * voice: ++49 4257 300 ! Fährstraße 1 * fax : ++49 4257 300 ! 31609 Balge/Sebbenhausen * jhunold@gmx.eu ! Germany

On 8/5/2014 3:12 AM, Jürgen Hunold wrote:
Hi Edward,
Am Montag, 4. August 2014, 11:55:12 schrieb Edward Diener:
On 8/2/2014 5:31 AM, Jürgen Hunold wrote:
It even needs more caretaking. After fixing boost-build.jam to point to the new build system location, I had to tweak the example itself. Full patch to get things compiling again attached.
With the example that you tweaked I get:
embedding.cpp: In function 'void exec_test()': embedding.cpp:56:48: error: 'PyInit_embedded_hello' was not declared in this scope> if (PyImport_AppendInittab("embedded_hello", PyInit_embedded_hello) == -1)
It appears that the change you made in embedding.cpp is not correct, or I am doing something wrong.
Which Python do you use? I have Python-3.4 installed, this would be one possible reason. Does the example compile without my patch on your system?
The patch for the boost-build.jam file without the change you specified in embedding.cpp works with Python-2.7.8 32 bit. The patch for the boost-build.jam file with the change you specified in embedding.cpp works produces this error with Python-2.7.8 32 bit:
embedding.cpp: In function 'void exec_test()': embedding.cpp:56:48: error: 'PyInit_embedded_hello' was not declared in this scope if (PyImport_AppendInittab("embedded_hello", PyInit_embedded_hello) == -1)
The patch for the boost-build.jam file without the change you specified in embedding.cpp produces these errors with Python-3.4.1 32 bit:
gcc.link.dll bin\gcc-mingw-4.8.1\debug\libextending.dll.a bin\gcc-mingw-4.8.1\debug\extending.o: In function `PyInit_extending': C:\Programming\VersionControl\modular-boost\libs\python\example\quickstart/extending.cpp:29: undefined reference to `_imp___ZN5boost6python6detail11init_moduleER11PyModuleDefPFvvE' collect2.exe: error: ld returned 1 exit status
"g++" -L"C:\Utilities\Python341_32\libs" -Wl,-R -Wl,"C:\Utilities\Python341_32" -Wl,-R -Wl,"C:\Utilities\Python341_32\libs" "-Wl,--out-implib,bin\gcc-mingw-4.8.1\debug\libextending.dll.a" -o "bin\gcc-mingw-4.8.1\debug\extending.pyd" -shared -Wl,--start-group "bin\gcc-mingw-4.8.1\debug\extending.o" "..\..\..\..\bin.v2\libs\python\build\gcc-mingw-4.8.1\debug\libboost_python-mgw48-d-1_56.dll.a" -Wl,-Bstatic -Wl,-Bdynamic -lpython34 -Wl,--end-group -g
...failed gcc.link.dll bin\gcc-mingw-4.8.1\debug\libextending.dll.a bin\gcc-mingw-4.8.1\debug\extending.pyd...
embedding.cpp: In function 'void exec_test()': embedding.cpp:57:48: error: 'initembedded_hello' was not declared in this scope if (PyImport_AppendInittab("embedded_hello", initembedded_hello) == -1) ^
"g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -g -I"..\..\..\.." -I"C:\Utilities\Python341_32\Include" -c -o "bin\gcc-mingw-4.8.1\debug\embedding.o" "embedding.cpp"
...failed gcc.compile.c++ bin\gcc-mingw-4.8.1\debug\embedding.o...
The patch for the boost-build.jam file with the change you specified in embedding.cpp produces these errors with Python-3.4.1 32 bit:
gcc.link.dll bin\gcc-mingw-4.8.1\debug\libextending.dll.a bin\gcc-mingw-4.8.1\debug\extending.o: In function `PyInit_extending': C:\Programming\VersionControl\modular-boost\libs\python\example\quickstart/extending.cpp:29: undefined reference to `_imp___ZN5boost6python6detail11init_moduleER11PyModuleDefPFvvE' collect2.exe: error: ld returned 1 exit status
"g++" -L"C:\Utilities\Python341_32\libs" -Wl,-R -Wl,"C:\Utilities\Python341_32" -Wl,-R -Wl,"C:\Utilities\Python341_32\libs" "-Wl,--out-implib,bin\gcc-mingw-4.8.1\debug\libextending.dll.a" -o "bin\gcc-mingw-4.8.1\debug\extending.pyd" -shared -Wl,--start-group "bin\gcc-mingw-4.8.1\debug\extending.o" "..\..\..\..\bin.v2\libs\python\build\gcc-mingw-4.8.1\debug\libboost_python-mgw48-d-1_56.dll.a" -Wl,-Bstatic -Wl,-Bdynamic -lpython34 -Wl,--end-group -g
...failed gcc.link.dll bin\gcc-mingw-4.8.1\debug\libextending.dll.a bin\gcc-mingw-4.8.1\debug\extending.pyd...
gcc.link bin\gcc-mingw-4.8.1\debug\embedding.exe bin\gcc-mingw-4.8.1\debug\embedding.o: In function `PyInit_embedded_hello': C:\Programming\VersionControl\modular-boost\libs\python\example\quickstart/embedding.cpp:45: undefined reference to `_imp___ZN5boost6python6detail11init_moduleER11PyModuleDefPFvvE' collect2.exe: error: ld returned 1 exit status
"g++" -L"C:\Utilities\Python341_32\libs" -Wl,-R -Wl,"C:\Programming\VersionControl\modular-boost\bin.v2\libs\python\build\gcc-mingw-4.8.1\debug" -Wl,-R -Wl,"C:\Utilities\Python341_32" -Wl,-R -Wl,"C:\Utilities\Python341_32\libs" -Wl,-rpath-link -Wl,"C:\Programming\VersionControl\modular-boost\bin.v2\libs\python\build\gcc-mingw-4.8.1\debug" -o "bin\gcc-mingw-4.8.1\debug\embedding.exe" -Wl,--start-group "bin\gcc-mingw-4.8.1\debug\embedding.o" "..\..\..\..\bin.v2\libs\python\build\gcc-mingw-4.8.1\debug\libboost_python-mgw48-d-1_56.dll.a" -Wl,-Bstatic -Wl,-Bdynamic -lpython34 -Wl,--end-group -g
...failed gcc.link bin\gcc-mingw-4.8.1\debug\embedding.exe...
Hopefully these will give you enough to fix this problem in Boost Python. I am pretty sure I have done everything correctly. I also have 64-bit versions of Python 2.7.8 and Python 3.4.1 but I am not sure how I test that. Do I have to add some sort of address model parameter to the bjam line ?
participants (2)
-
Edward Diener
-
Jürgen Hunold