[cctbxbb] Boost Python 1.56

Marcin Wojdyr wojdyr at gmail.com
Wed Feb 10 10:45:23 PST 2016


To help a bit I went through compilation of cctbx/Dials with Boost 1.60.

There is a lot of warnings from Boost.Python,
about deprecated header:
https://github.com/boostorg/python/commit/0a4c76b9ac16974d7d4f164cf6179095217a981a
and unused typedefs. After adding -Wno-unused-local-typedefs and
removing the deprecated #include almost all warnings are gone.

Then there is one error, copy&pasted below.
I tracked it down to this change in boost.rational:
https://github.com/boostorg/rational/commit/5fddb3f889cd2a2fe59cdcae182f8b3f78ec31e3
I just reverted this change to finish compilation, but I suppose a
proper fix is also not difficult.

I don't know if this is relevant, but I'm using Boost compiled outside of cctbx.
I'm attaching a patch that we use in CCP4 for this. It's based on
Debian/Gentoo patches.

cheers,
Marcin


g++ -o boost_adaptbx/rational_ext.o -c
-I/home/marcin/dials/boost_160/include -Wno-unused-local-typedefs
-DBOOST_PYTHON_MAX_BASES=2 -fPIC -fno-strict-aliasing -w -DNDEBUG -O3
-ffast-math -DBOOST_ALL_NO_LIB -I/home/marcin/dials/build/include
-I/home/marcin/miniconda2/include/python2.7
/home/marcin/dials/modules/cctbx_project/boost_adaptbx/rational_ext.cpp
In file included from
/home/marcin/dials/boost_160/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:47:0,
                 from
/home/marcin/dials/boost_160/include/boost/python/detail/invoke.hpp:63,
                 from
/home/marcin/dials/boost_160/include/boost/python/detail/caller.hpp:16,
                 from
/home/marcin/dials/boost_160/include/boost/python/object/function_handle.hpp:8,
                 from
/home/marcin/dials/boost_160/include/boost/python/converter/arg_to_python.hpp:19,
                 from
/home/marcin/dials/boost_160/include/boost/python/call.hpp:15,
                 from
/home/marcin/dials/boost_160/include/boost/python/object_core.hpp:14,
                 from
/home/marcin/dials/boost_160/include/boost/python/args.hpp:25,
                 from
/home/marcin/dials/boost_160/include/boost/python/make_function.hpp:11,
                 from
/home/marcin/dials/boost_160/include/boost/python/def.hpp:11,
                 from
/home/marcin/dials/modules/cctbx_project/boost_adaptbx/rational_ext.cpp:2:
/home/marcin/dials/boost_160/include/boost/python/detail/invoke.hpp:
In instantiation of 'PyObject*
boost::python::detail::invoke(boost::python::detail::invoke_tag_<false,
true>, const RC&, F&, TC&) [with RC =
boost::python::detail::specify_a_return_value_policy_to_wrap_functions_returning<const
int&>; F = const int& (boost::rational<int>::*)()const; TC =
boost::python::arg_from_python<boost::rational<int>&>; PyObject =
_object]':
/home/marcin/dials/boost_160/include/boost/python/detail/caller.hpp:223:13:
  required from 'PyObject*
boost::python::detail::caller_arity<1u>::impl<F, Policies,
Sig>::operator()(PyObject*, PyObject*) [with F = const int&
(boost::rational<int>::*)()const; Policies =
boost::python::default_call_policies; Sig = boost::mpl::vector2<const
int&, boost::rational<int>&>; PyObject = _object]'
/home/marcin/dials/boost_160/include/boost/python/object/py_function.hpp:38:33:
  required from 'PyObject*
boost::python::objects::caller_py_function_impl<Caller>::operator()(PyObject*,
PyObject*) [with Caller = boost::python::detail::caller<const int&
(boost::rational<int>::*)()const,
boost::python::default_call_policies, boost::mpl::vector2<const int&,
boost::rational<int>&> >; PyObject = _object]'
/home/marcin/dials/modules/cctbx_project/boost_adaptbx/rational_ext.cpp:231:1:
  required from here
/home/marcin/dials/boost_160/include/boost/python/detail/invoke.hpp:88:90:
error: no match for call to '(const
boost::python::detail::specify_a_return_value_policy_to_wrap_functions_returning<const
int&>) (const int&)'
     return rc( (tc().*f)(BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, ac, ()
BOOST_PP_INTERCEPT)) );

                   ^
In file included from
/home/marcin/dials/boost_160/include/boost/python/object/function_handle.hpp:8:0,
                 from
/home/marcin/dials/boost_160/include/boost/python/converter/arg_to_python.hpp:19,
                 from
/home/marcin/dials/boost_160/include/boost/python/call.hpp:15,
                 from
/home/marcin/dials/boost_160/include/boost/python/object_core.hpp:14,
                 from
/home/marcin/dials/boost_160/include/boost/python/args.hpp:25,
                 from
/home/marcin/dials/boost_160/include/boost/python/make_function.hpp:11,
                 from
/home/marcin/dials/boost_160/include/boost/python/def.hpp:11,
                 from
/home/marcin/dials/modules/cctbx_project/boost_adaptbx/rational_ext.cpp:2:
/home/marcin/dials/boost_160/include/boost/python/detail/caller.hpp:
In instantiation of 'static const PyTypeObject*
boost::python::detail::converter_target_type<ResultConverter>::get_pytype()
[with ResultConverter =
boost::python::detail::specify_a_return_value_policy_to_wrap_functions_returning<const
int&>; PyTypeObject = _typeobject]':
/home/marcin/dials/boost_160/include/boost/python/detail/caller.hpp:240:19:
  required from 'static boost::python::detail::py_func_sig_info
boost::python::detail::caller_arity<1u>::impl<F, Policies,
Sig>::signature() [with F = const int&
(boost::rational<int>::*)()const; Policies =
boost::python::default_call_policies; Sig = boost::mpl::vector2<const
int&, boost::rational<int>&>]'
/home/marcin/dials/boost_160/include/boost/python/object/py_function.hpp:48:35:
  required from 'boost::python::detail::py_func_sig_info
boost::python::objects::caller_py_function_impl<Caller>::signature()
const [with Caller = boost::python::detail::caller<const int&
(boost::rational<int>::*)()const,
boost::python::default_call_policies, boost::mpl::vector2<const int&,
boost::rational<int>&> >]'
/home/marcin/dials/modules/cctbx_project/boost_adaptbx/rational_ext.cpp:231:1:
  required from here
/home/marcin/dials/boost_160/include/boost/python/detail/caller.hpp:102:109:
error: 'struct boost::python::detail::specify_a_return_value_policy_to_wrap_functions_returning<const
int&>' has no member named 'get_pytype'
         return create_result_converter((PyObject*)0, (ResultConverter
*)0, (ResultConverter *)0).get_pytype();

                                      ^
scons: *** [boost_adaptbx/rational_ext.o] Error 1
scons: building terminated because of errors.





On Wed, Feb 10, 2016 at 4:44 PM, Aaron Brewster <asbrewster at lbl.gov> wrote:
> Hi Nick, Billy and I will work on this today,
>
> -Aaron
>
> On Wed, Feb 10, 2016 at 6:40 AM, Marcin Wojdyr <wojdyr at gmail.com> wrote:
>>
>> FWIW the latest version of Boost is 1.60.
>> CCP4 6.5 was using cctbx compiled with Boost 1.56
>> and CCP4 7.0 uses Boost 1.58.
>>
>> Marcin
>>
>> On Wed, Feb 10, 2016 at 2:17 PM, Nicholas Sauter <nksauter at lbl.gov> wrote:
>> > Nigel, Billy & Aaron,
>> >
>> > I completely endorse this move to Boost 1.56.  Can we update our build?
>> >
>> > Nick
>> >
>> > Nicholas K. Sauter, Ph. D.
>> > Computer Staff Scientist, Molecular Biophysics and Integrated Bioimaging
>> > Division
>> > Lawrence Berkeley National Laboratory
>> > 1 Cyclotron Rd., Bldg. 33R0345
>> > Berkeley, CA 94720
>> > (510) 486-5713
>> >
>> > On Wed, Feb 10, 2016 at 2:41 PM, Luc Bourhis <luc_j_bourhis at mac.com>
>> > wrote:
>> >>
>> >> Hi,
>> >>
>> >> I have improvements to the smtbx on their way to be committed which
>> >> require Boost version 1.56. This is related to Boost.Threads, whose
>> >> support
>> >> I re-activated a few months ago on Nick’s request. I need the function
>> >> boost::thread::physical_concurrency which returns the number of
>> >> physical
>> >> cores on the machine, as opposed to virtual cores when hyperthreading
>> >> is
>> >> enabled (which it is by default on any Intel machine). That function is
>> >> not
>> >> available in Boost 1.55 which is the version currently used in the
>> >> nightly
>> >> tests: it appeared in 1.56.
>> >>
>> >> So, would it be possible to move to Boost 1.56? Otherwise, I will need
>> >> to
>> >> backport that function. Not too difficult but not thrilling.
>> >>
>> >> Best wishes,
>> >>
>> >> Luc
>> >>
>> >>
>> >> _______________________________________________
>> >> cctbxbb mailing list
>> >> cctbxbb at phenix-online.org
>> >> http://phenix-online.org/mailman/listinfo/cctbxbb
>> >
>> >
>> >
>> > _______________________________________________
>> > cctbxbb mailing list
>> > cctbxbb at phenix-online.org
>> > http://phenix-online.org/mailman/listinfo/cctbxbb
>> >
>>
>> _______________________________________________
>> cctbxbb mailing list
>> cctbxbb at phenix-online.org
>> http://phenix-online.org/mailman/listinfo/cctbxbb
>
>
>
> _______________________________________________
> cctbxbb mailing list
> cctbxbb at phenix-online.org
> http://phenix-online.org/mailman/listinfo/cctbxbb
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cctbx-system-boost.patch
Type: text/x-patch
Size: 3101 bytes
Desc: not available
URL: <http://phenix-online.org/pipermail/cctbxbb/attachments/20160210/00ca0832/attachment.bin>


More information about the cctbxbb mailing list