From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030701 Description of problem: The boost installation skips installing the jam files necessary to use bjam to function properly. For example, the python.jam file necessary to allow bjam to generate boost.python modules is not installed by any of the boost or boost-jam rpms. Using the example project, I've included in example.tar.gz, bjam won't be able to generate the python module. After untarring the included jam.tgz file in the /usr/share/doc/boost-1.30.0/tools/build/, bjam can successfully create the module. The files in the jam.tgz are from the tools/build subdirectory created by the source tarball. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Follow steps outlined in description. 2. 3. Actual Results: Error during compilation Expected Results: python module should be created Additional info:
Created attachment 93645 [details] jam files from the tools/build subdirectory
Created attachment 93646 [details] Example project for bjam
This is a problem, still present in mainline boost sources, with the installation routines. We're not likely to install all these files. I suppose we could hack this to just install a minimal subset, like: gcc-tools.jam python.jam etc Maybe in {_prefix}/share? Would this be acceptable? -benjamin
My concern with this is mainly that all of the documentation for boost python only gives examples that use bjam to build the python extension modules. However with the current rpms, bjam won't work without quite a few additional files. It would be great if either a minimal set of files were added so that bjam could generate python modules or if the gcc options needed to generate python modules were documented so that Makefile could be used instead. Incidentally, the tar file that I attached was just all of the bjam config files. I was looking more for a functioning build environment when I generated it. If it would help, I could remove the unnecessary files to just the needed files.
Created attachment 98886 [details] tarball with project files and necessary jam files minimal set of jam files and rules to create a python module. Needs to be untarred in /tmp/boost
It seems that you can get by on an x86 system using just the following files: allyourbase.jam bootstrap.jam gcc-tools.jam testing.jam boost-base.jam features.jam python.jam along with the appropriate jam files. The gcc invocation to create a .o file from a boost.python declaration seems to be: g++ -c -Wall -ftemplate-depth-100 -DBOOST_PYTHON_DYNAMIC_LIB -g -O0 -fno-inline -fPIC -I"." -I "/usr//include/python2.2" -I "/usr/include/boost" -o "interface.o" "interface.cpp" assuming that the declaration is in interface.cpp. I've attached a tar ball with the files and the Jamfiles and Jamrules (bjam's equivalent of Makefile) to generate a simple hello world example.
I don't know what to do about this. With Boost 1.31.0-4, boost-jam is deprecated, so I'm side-stepping this issue for the RH distros. You're right that this makes using Boost Python problematic. -benjamin
I guess the best thing may be to get the upstream to update the documentation to indicate at the very least how to compile a boost python project without bjam. In the meantime, I guess I could write a short HOWTO or a README that indicates how to compile a boost python module using gcc. I'm not entirely sure about this but I could take a stab at this. If this gets included in the docs with boost python that might be enough to make the boost python stuff semi-usable for beginners.