forcing building boost_python early in SConscript
We are working on a newer version of Phaser. The new SConscript file for Phaser imports features from boost_python. Therefore it is currently not straightforward to build it since an empty build directory does not yet contain the boost_python module to be imported by SConscript (or python). So SCons crashes when it reads the new Phaser SCsonscript stating that boost_python cannot be imported. Currently our workaround is to first build CCTBX alone and then subsequently to build Phaser. My question is if it is possible to specify dependencies in cctbx_project/boost_adaptbx/SConscript to force building boost_python early on. On Windows boost_thread and a few other libraries are built before other SConscript files are read. So I have put some Depends(boost_thread, boost_python) andDepends(boost_thread, boost_python_meta_ext) statements into cctbx_project/boost_adaptbx/SConscript. These do seem to force building the boost_python.lib and .dll files. But building the boost_python_meta_ext python module fails with the error: boost_adaptbx\meta_ext.cpp(14): fatal error C1083: Cannot open include file: 'boost_adaptbx/type_id_eq.h' It's possible that I'm not using SCons as it's supposed to be used. Let me know if anyone has a suggestion on how to force building boost_python before other SConscript are read. Many thanks, Rob -- Robert Oeffner, Ph.D. Research Associate, The Read Group Department of Haematology, Cambridge Institute for Medical Research University of Cambridge Cambridge Biomedical Campus Wellcome Trust/MRC Building Hills Road Cambridge CB2 0XY www.cimr.cam.ac.uk/investigators/read/index.html tel: +44(0)1223 763234
Hi Rob,
Are these features required before anything is built? Or are they
dependencies for Phaser that get linked during building? Can you send me
your SConscript file?
--
Billy K. Poon
Research Scientist, Molecular Biophysics and Integrated Bioimaging
Lawrence Berkeley National Laboratory
1 Cyclotron Road, M/S 33R0345
Berkeley, CA 94720
Tel: (510) 486-5709
Fax: (510) 486-5909
Web: https://phenix-online.org
On Fri, Nov 16, 2018 at 9:07 AM Robert Oeffner
We are working on a newer version of Phaser. The new SConscript file for Phaser imports features from boost_python. Therefore it is currently not straightforward to build it since an empty build directory does not yet contain the boost_python module to be imported by SConscript (or python). So SCons crashes when it reads the new Phaser SCsonscript stating that boost_python cannot be imported. Currently our workaround is to first build CCTBX alone and then subsequently to build Phaser.
My question is if it is possible to specify dependencies in cctbx_project/boost_adaptbx/SConscript to force building boost_python early on. On Windows boost_thread and a few other libraries are built before other SConscript files are read. So I have put some Depends(boost_thread, boost_python) andDepends(boost_thread, boost_python_meta_ext) statements into cctbx_project/boost_adaptbx/SConscript. These do seem to force building the boost_python.lib and .dll files. But building the boost_python_meta_ext python module fails with the error: boost_adaptbx\meta_ext.cpp(14): fatal error C1083: Cannot open include file: 'boost_adaptbx/type_id_eq.h'
It's possible that I'm not using SCons as it's supposed to be used. Let me know if anyone has a suggestion on how to force building boost_python before other SConscript are read.
Many thanks,
Rob
-- Robert Oeffner, Ph.D. Research Associate, The Read Group Department of Haematology, Cambridge Institute for Medical Research University of Cambridge Cambridge Biomedical Campus Wellcome Trust/MRC Building Hills Road Cambridge CB2 0XY
www.cimr.cam.ac.uk/investigators/read/index.html tel: +44(0)1223 763234
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
My understanding was that all the SConscript files are normally read before
anything is built. Does this depart from that model?
Nick
On Fri, Nov 16, 2018 at 9:58 AM Billy Poon
Hi Rob,
Are these features required before anything is built? Or are they dependencies for Phaser that get linked during building? Can you send me your SConscript file?
-- Billy K. Poon Research Scientist, Molecular Biophysics and Integrated Bioimaging Lawrence Berkeley National Laboratory 1 Cyclotron Road, M/S 33R0345 Berkeley, CA 94720 Tel: (510) 486-5709 Fax: (510) 486-5909 Web: https://phenix-online.org
On Fri, Nov 16, 2018 at 9:07 AM Robert Oeffner
wrote: We are working on a newer version of Phaser. The new SConscript file for Phaser imports features from boost_python. Therefore it is currently not straightforward to build it since an empty build directory does not yet contain the boost_python module to be imported by SConscript (or python). So SCons crashes when it reads the new Phaser SCsonscript stating that boost_python cannot be imported. Currently our workaround is to first build CCTBX alone and then subsequently to build Phaser.
My question is if it is possible to specify dependencies in cctbx_project/boost_adaptbx/SConscript to force building boost_python early on. On Windows boost_thread and a few other libraries are built before other SConscript files are read. So I have put some Depends(boost_thread, boost_python) andDepends(boost_thread, boost_python_meta_ext) statements into cctbx_project/boost_adaptbx/SConscript. These do seem to force building the boost_python.lib and .dll files. But building the boost_python_meta_ext python module fails with the error: boost_adaptbx\meta_ext.cpp(14): fatal error C1083: Cannot open include file: 'boost_adaptbx/type_id_eq.h'
It's possible that I'm not using SCons as it's supposed to be used. Let me know if anyone has a suggestion on how to force building boost_python before other SConscript are read.
Many thanks,
Rob
-- Robert Oeffner, Ph.D. Research Associate, The Read Group Department of Haematology, Cambridge Institute for Medical Research University of Cambridge Cambridge Biomedical Campus Wellcome Trust/MRC Building Hills Road Cambridge CB2 0XY
www.cimr.cam.ac.uk/investigators/read/index.html tel: +44(0)1223 763234
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
Is there any real reason why we can't build boost earlier using their own
installers - e.g. as part of the base?
Baseless builds can install it the same way they install any other
dependencies. Conda can just install boost the same way it does any other
dependency.
I've always thought it strange the way we replicate the build process, It
would save a lot of time that we waste every time boost updates and having
to debug problems caused by not replicating the build properly (on linux
*and* windows).
Nick
On Fri, Nov 16, 2018 at 5:08 PM Robert Oeffner
We are working on a newer version of Phaser. The new SConscript file for Phaser imports features from boost_python. Therefore it is currently not straightforward to build it since an empty build directory does not yet contain the boost_python module to be imported by SConscript (or python). So SCons crashes when it reads the new Phaser SCsonscript stating that boost_python cannot be imported. Currently our workaround is to first build CCTBX alone and then subsequently to build Phaser.
My question is if it is possible to specify dependencies in cctbx_project/boost_adaptbx/SConscript to force building boost_python early on. On Windows boost_thread and a few other libraries are built before other SConscript files are read. So I have put some Depends(boost_thread, boost_python) andDepends(boost_thread, boost_python_meta_ext) statements into cctbx_project/boost_adaptbx/SConscript. These do seem to force building the boost_python.lib and .dll files. But building the boost_python_meta_ext python module fails with the error: boost_adaptbx\meta_ext.cpp(14): fatal error C1083: Cannot open include file: 'boost_adaptbx/type_id_eq.h'
It's possible that I'm not using SCons as it's supposed to be used. Let me know if anyone has a suggestion on how to force building boost_python before other SConscript are read.
Many thanks,
Rob
-- Robert Oeffner, Ph.D. Research Associate, The Read Group Department of Haematology, Cambridge Institute for Medical Research University of Cambridge Cambridge Biomedical Campus Wellcome Trust/MRC Building Hills Road Cambridge CB2 0XY
www.cimr.cam.ac.uk/investigators/read/index.html tel: +44(0)1223 763234
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
Hi, This is one of two clean ways to do it imho. Making a SConscript use features that belongs to libraries that it is in charge to build is a terrible idea I am afraid. It would require nasty hacks to work and I would be afraid to have to maintain that. Basically I see only two options: 1. Build Boost libraries as an external library, before our cctbx SConscript kick in, as other libraries such as wxWidget are built 2. Rewrite your SConscript not to use Boost.Python I would definitively give a thought to option 2! What do you need Boost.Python for in a SConscript? Best wishes, Luc
On 16 Nov 2018, at 21:35, Nicholas Devenish
wrote: Is there any real reason why we can't build boost earlier using their own installers - e.g. as part of the base?
Baseless builds can install it the same way they install any other dependencies. Conda can just install boost the same way it does any other dependency.
I've always thought it strange the way we replicate the build process, It would save a lot of time that we waste every time boost updates and having to debug problems caused by not replicating the build properly (on linux *and* windows).
Nick
On Fri, Nov 16, 2018 at 5:08 PM Robert Oeffner
mailto:[email protected]> wrote: We are working on a newer version of Phaser. The new SConscript file for Phaser imports features from boost_python. Therefore it is currently not straightforward to build it since an empty build directory does not yet contain the boost_python module to be imported by SConscript (or python). So SCons crashes when it reads the new Phaser SCsonscript stating that boost_python cannot be imported. Currently our workaround is to first build CCTBX alone and then subsequently to build Phaser. My question is if it is possible to specify dependencies in cctbx_project/boost_adaptbx/SConscript to force building boost_python early on. On Windows boost_thread and a few other libraries are built before other SConscript files are read. So I have put some Depends(boost_thread, boost_python) andDepends(boost_thread, boost_python_meta_ext) statements into cctbx_project/boost_adaptbx/SConscript. These do seem to force building the boost_python.lib and .dll files. But building the boost_python_meta_ext python module fails with the error: boost_adaptbx\meta_ext.cpp(14): fatal error C1083: Cannot open include file: 'boost_adaptbx/type_id_eq.h'
It's possible that I'm not using SCons as it's supposed to be used. Let me know if anyone has a suggestion on how to force building boost_python before other SConscript are read.
Many thanks,
Rob
-- Robert Oeffner, Ph.D. Research Associate, The Read Group Department of Haematology, Cambridge Institute for Medical Research University of Cambridge Cambridge Biomedical Campus Wellcome Trust/MRC Building Hills Road Cambridge CB2 0XY
www.cimr.cam.ac.uk/investigators/read/index.html http://www.cimr.cam.ac.uk/investigators/read/index.html tel: +44(0)1223 763234
_______________________________________________ cctbxbb mailing list [email protected] mailto:[email protected] http://phenix-online.org/mailman/listinfo/cctbxbb http://phenix-online.org/mailman/listinfo/cctbxbb _______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
Hi Rob, The SCons environment used to build the Boost libraries does not have any of the cctbx include’s. Hence the error you get: SCons does not tell the compiler to look in boost_adaptbx for headers when building boost_thread and the like but then you have now asked SCons. I am not sure I understand why you need to make boost_thread depends on boost_python_meta_ext actually. Best wishes, Luc
On 16 Nov 2018, at 18:07, Robert Oeffner
wrote: We are working on a newer version of Phaser. The new SConscript file for Phaser imports features from boost_python. Therefore it is currently not straightforward to build it since an empty build directory does not yet contain the boost_python module to be imported by SConscript (or python). So SCons crashes when it reads the new Phaser SCsonscript stating that boost_python cannot be imported. Currently our workaround is to first build CCTBX alone and then subsequently to build Phaser.
My question is if it is possible to specify dependencies in cctbx_project/boost_adaptbx/SConscript to force building boost_python early on. On Windows boost_thread and a few other libraries are built before other SConscript files are read. So I have put some Depends(boost_thread, boost_python) andDepends(boost_thread, boost_python_meta_ext) statements into cctbx_project/boost_adaptbx/SConscript. These do seem to force building the boost_python.lib and .dll files. But building the boost_python_meta_ext python module fails with the error: boost_adaptbx\meta_ext.cpp(14): fatal error C1083: Cannot open include file: 'boost_adaptbx/type_id_eq.h'
It's possible that I'm not using SCons as it's supposed to be used. Let me know if anyone has a suggestion on how to force building boost_python before other SConscript are read.
Many thanks,
Rob
-- Robert Oeffner, Ph.D. Research Associate, The Read Group Department of Haematology, Cambridge Institute for Medical Research University of Cambridge Cambridge Biomedical Campus Wellcome Trust/MRC Building Hills Road Cambridge CB2 0XY
www.cimr.cam.ac.uk/investigators/read/index.html tel: +44(0)1223 763234
_______________________________________________ cctbxbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/cctbxbb
participants (5)
-
Billy Poon
-
Luc Bourhis
-
Nicholas Devenish
-
Nicholas Sauter
-
Robert Oeffner