List Info

Thread: Problem with boost.python 1.35.0




Problem with boost.python 1.35.0
country flaguser name
United Kingdom
2008-04-11 03:34:00
Hi,

this looks like the same problem - have created a simple
test case this 
works on 1.35.0 on Centos 4 (gcc 3.4.6) but gives the same
error as 
previous post on Centos 5 (4.1.2)

more test.cpp
#include <boost/python/class.hpp>
#include <boost/python/module.hpp>
#include <boost/python/def.hpp>
#include <iostream>
#include <string>
#include <assert.h>
#include <sstream>
#include <boost/bind.hpp>
#include <cstdlib>

namespace
{

  class Test
  {
  public:
    Test (int aa, int bb, std::string  cc)
    {
    }
    ~Test ()
    {
    }
    int start (std::string ddd, int ee)
    {
    return 1;
    }
    int getport ()
    {
    return 1;
    }
  private:
  };
}

BOOST_PYTHON_MODULE (test)
{
  using namespace boost::python;
  class_ < Test > ("Test", init < int,
int, std::string >())
    // Add regular member functions
    .def ("getport", &Test::getport)
    .def ("start", &Test::start )
    ;
}
_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

Problem with boost.python 1.35.0
country flaguser name
United Kingdom
2008-04-11 04:27:30
Defining BOOST_PYTHON_NO_PY_SIGNATURES fixes the problem


Stuart Marsden wrote:
> Hi,
>
> this looks like the same problem - have created a
simple test case 
> this works on 1.35.0 on Centos 4 (gcc 3.4.6) but gives
the same error 
> as previous post on Centos 5 (4.1.2)
>
> more test.cpp
> #include <boost/python/class.hpp>
> #include <boost/python/module.hpp>
> #include <boost/python/def.hpp>
> #include <iostream>
> #include <string>
> #include <assert.h>
> #include <sstream>
> #include <boost/bind.hpp>
> #include <cstdlib>
>
> namespace
> {
>
>  class Test
>  {
>  public:
>    Test (int aa, int bb, std::string  cc)
>    {
>    }
>    ~Test ()
>    {
>    }
>    int start (std::string ddd, int ee)
>    {
>    return 1;
>    }
>    int getport ()
>    {
>    return 1;
>    }
>  private:
>  };
> }
>
> BOOST_PYTHON_MODULE (test)
> {
>  using namespace boost::python;
>  class_ < Test > ("Test", init <
int, int, std::string >())
>    // Add regular member functions
>    .def ("getport", &Test::getport)
>    .def ("start", &Test::start )
>    ;
> }
>

_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

Re: Problem with boost.python 1.35.0
country flaguser name
Canada
2008-04-14 16:56:01
I couldn't duplicate this on with :

~/tmp/boost_1_34_0_RC.svn/libs/python/test$ gcc --version
gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Copyright (C) 2006 Free Software Foundation, Inc.

could you post the error again, the way it is generated from
your
example?

Nikolay Mladenov

Stuart Marsden wrote:
> 
> Hi,
> 
> this looks like the same problem - have created a
simple test case this
> works on 1.35.0 on Centos 4 (gcc 3.4.6) but gives the
same error as
> previous post on Centos 5 (4.1.2)
> 
> more test.cpp
> #include <boost/python/class.hpp>
> #include <boost/python/module.hpp>
> #include <boost/python/def.hpp>
> #include <iostream>
> #include <string>
> #include <assert.h>
> #include <sstream>
> #include <boost/bind.hpp>
> #include <cstdlib>
> 
> namespace
> {
> 
>   class Test
>   {
>   public:
>     Test (int aa, int bb, std::string  cc)
>     {
>     }
>     ~Test ()
>     {
>     }
>     int start (std::string ddd, int ee)
>     {
>     return 1;
>     }
>     int getport ()
>     {
>     return 1;
>     }
>   private:
>   };
> }
> 
> BOOST_PYTHON_MODULE (test)
> {
>   using namespace boost::python;
>   class_ < Test > ("Test", init <
int, int, std::string >())
>     // Add regular member functions
>     .def ("getport", &Test::getport)
>     .def ("start", &Test::start )
>     ;
> }

_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

Re: Problem with boost.python 1.35.0
country flaguser name
United Kingdom
2008-04-16 10:05:14
Hi,

output from running bjam on exactly the sample code below
centos5 32bit 
patched up to date

gcc 4.1.2. 20070626 (Red Hat 4.1.2-14)

Thanks

Stuart

warning: Graph library does not contain optional GraphML
reader.
note: to enable GraphML support, set EXPAT_INCLUDE and
EXPAT_LIBPATH to the
note: directories containing the Expat headers and
libraries, respectively.
warning: skipping optional Message Passing Interface (MPI)
library.
note: to enable MPI support, add "using mpi ;" to
user-config.jam.
note: to suppress this message, pass
"--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
Building Boost.Regex with the optional Unicode/ICU support
disabled.
Please refer to the Boost.Regex documentation for more
information
(don't panic: this is a strictly optional feature).
warning: No toolsets are configured.
warning: Configuring default toolset "gcc".
warning: If the default is wrong, your build may not work
correctly.
warning: Use the "--toolset=xxxxx" option to
override our guess.
warning: For more configuration options, please consult
warning: 
http://boost.org/boost-build2/doc/html/bb
v2/advanced/configuration.html
...patience...
...patience...
...found 1559 targets...
...updating 2 targets...
gcc.compile.c++
bin/gcc-4.1.2/debug/threading-multi/client.o
/usr/local/boost_1_35_0/boost/type_traits/detail/cv_traits_i
mpl.hpp: In 
instantiation of 'const bool 
boost::detail::cv_traits_imp<<unnamed>::Test*>::
is_const':
/usr/local/boost_1_35_0/boost/type_traits/is_const.hpp:53:  

instantiated from
'boost::is_const<<unnamed>::Test>'
/usr/local/boost_1_35_0/boost/python/detail/cv_category.hpp:
31:   
instantiated from
'boost::python::detail::cv_category<<unnamed>::Test
>'
/usr/local/boost_1_35_0/boost/python/detail/unwind_type.hpp:
58:   
instantiated from 'typename Generator::result_type 
boost::python::detail::unwind_ptr_type(U*, Generator*) [with
Generator = 
boost::python::converter::detail::unwind_type_id_helper, U =

<unnamed>::Test]'
/usr/local/boost_1_35_0/boost/python/detail/unwind_type.hpp:
127:   
instantiated from 'static typename Generator::result_type 
boost::python::detail::unwind_helper2<2>::execute(U&am
p; (*)(), Generator*) 
[with Generator = 
boost::python::converter::detail::unwind_type_id_helper, U =

<unnamed>::Test]'
/usr/local/boost_1_35_0/boost/python/detail/unwind_type.hpp:
165:   
instantiated from 'typename Generator::result_type 
boost::python::detail::unwind_type(boost::type<U>*,
Generator*) [with 
Generator =
boost::python::converter::detail::unwind_type_id_helper, U =

<unnamed>::Test&]'
/usr/local/boost_1_35_0/boost/python/converter/pytype_functi
on.hpp:45:   
instantiated from 'boost::python::type_info 
boost::python::converter::detail::unwind_type_id_(boost::typ
e<T>*, 
mpl_::false_*) [with T = <unnamed>::Test&]'
/usr/local/boost_1_35_0/boost/python/converter/pytype_functi
on.hpp:68:   
instantiated from 'static const PyTypeObject* 
boost::python::converter::expected_pytype_for_arg<T>::
get_pytype() [with 
T = <unnamed>::Test&]'
/usr/local/boost_1_35_0/boost/python/detail/signature.hpp:98
:   
instantiated from 'static const 
boost::python::detail::signature_element* 
boost::python::detail::signature_arity<3u>::impl<Si
g>::elements() [with 
Sig = boost::mpl::vector4<int,
<unnamed>::Test&, std::basic_string<char, 
std::char_traits<char>, std::allocator<char>
>, int>]'
/usr/local/boost_1_35_0/boost/python/detail/caller.hpp:232: 
 
instantiated from 'static
boost::python::detail::py_func_sig_info 
boost::python::detail::caller_arity<3u>::impl<F,
Policies, 
Sig>::signature() [with F = int
(<unnamed>::Test:)(std::strin
g, int), 
Policies = boost::python::default_call_policies, Sig = 
boost::mpl::vector4<int, <unnamed>::Test&,
std::basic_string<char, 
std::char_traits<char>, std::allocator<char>
>, int>]'
/usr/local/boost_1_35_0/boost/python/object/py_function.hpp:
48:   
instantiated from 'boost::python::detail::py_func_sig_info 
boost::python::objects::caller_py_function_impl<Caller>
;::signature() 
const [with Caller = boost::python::detail::caller<int 
(<unnamed>::Test:)(std::strin
g, int), 
boost::python::default_call_policies,
boost::mpl::vector4<int, 
<unnamed>::Test&, std::basic_string<char,
std::char_traits<char>, 
std::allocator<char> >, int> >]'
client.cpp:42:   instantiated from here
/usr/local/boost_1_35_0/boost/type_traits/detail/cv_traits_i
mpl.hpp:37: 
internal compiler error: in make_rtl_for_nonlocal_decl, at
cp/decl.c:4970
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzil
la.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccTc0vtd.out file,
please attach 
this to your bugreport.

    "g++"  -ftemplate-depth-128 -O0 -fno-inline
-Wall -g -fPIC -pthread  
-DBOOST_SYSTEM_DYN_LINK=1 
-I"/usr/include/python2.4" 
-I"/usr/local/boost_1_35_0" -c -o 
"bin/gcc-4.1.2/debug/threading-multi/client.o"
"client.cpp"

...failed gcc.compile.c++
bin/gcc-4.1.2/debug/threading-multi/client.o...
...skipped
<pbin/gcc-4.1.2/debug/threading-multi>rtpclient.so for
lack 
of <pbin/gcc-4.1.2/debug/threading-multi>client.o...
...failed updating 1 target...
...skipped 1 target...


> I couldn't duplicate this on with :
>
> ~/tmp/boost_1_34_0_RC.svn/libs/python/test$ gcc
--version
> gcc (GCC) 4.1.2 20061115 (prerelease) (Debian
4.1.1-21)
> Copyright (C) 2006 Free Software Foundation, Inc.
>
> could you post the error again, the way it is generated
from your
> example?
>
> Nikolay Mladenov
>
> Stuart Marsden wrote:
>   
>> Hi,
>>
>> this looks like the same problem - have created a
simple test case this
>> works on 1.35.0 on Centos 4 (gcc 3.4.6) but gives
the same error as
>> previous post on Centos 5 (4.1.2)
>>
>> more test.cpp
>> #include <boost/python/class.hpp>
>> #include <boost/python/module.hpp>
>> #include <boost/python/def.hpp>
>> #include <iostream>
>> #include <string>
>> #include <assert.h>
>> #include <sstream>
>> #include <boost/bind.hpp>
>> #include <cstdlib>
>>
>> namespace
>> {
>>
>>   class Test
>>   {
>>   public:
>>     Test (int aa, int bb, std::string  cc)
>>     {
>>     }
>>     ~Test ()
>>     {
>>     }
>>     int start (std::string ddd, int ee)
>>     {
>>     return 1;
>>     }
>>     int getport ()
>>     {
>>     return 1;
>>     }
>>   private:
>>   };
>> }
>>
>> BOOST_PYTHON_MODULE (test)
>> {
>>   using namespace boost::python;
>>   class_ < Test > ("Test", init
< int, int, std::string >())
>>     // Add regular member functions
>>     .def ("getport", &Test::getport)
>>     .def ("start", &Test::start )
>>     ;
>> }
>>     
>
> _______________________________________________
> C++-sig mailing list
> C++-sigpython.org
> http:
//mail.python.org/mailman/listinfo/c++-sig
>
>
>   

_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

Re: Problem with boost.python 1.35.0
country flaguser name
Canada
2008-04-16 14:26:53
Hi Stuart,

It looks like a compiler bug. Is the unnamed namespace
related to it?

Nikolay Mladenov

Stuart Marsden wrote:
> 
> Hi,
> 
> output from running bjam on exactly the sample code
below centos5 32bit
> patched up to date
> 
> gcc 4.1.2. 20070626 (Red Hat 4.1.2-14)
> 
> Thanks
> 
> Stuart
> 
> warning: Graph library does not contain optional
GraphML reader.
> note: to enable GraphML support, set EXPAT_INCLUDE and
EXPAT_LIBPATH to the
> note: directories containing the Expat headers and
libraries, respectively.
> warning: skipping optional Message Passing Interface
(MPI) library.
> note: to enable MPI support, add "using mpi
;" to user-config.jam.
> note: to suppress this message, pass
"--without-mpi" to bjam.
> note: otherwise, you can safely ignore this message.
> Building Boost.Regex with the optional Unicode/ICU
support disabled.
> Please refer to the Boost.Regex documentation for more
information
> (don't panic: this is a strictly optional feature).
> warning: No toolsets are configured.
> warning: Configuring default toolset "gcc".
> warning: If the default is wrong, your build may not
work correctly.
> warning: Use the "--toolset=xxxxx" option to
override our guess.
> warning: For more configuration options, please
consult
> warning:
> http://boost.org/boost-build2/doc/html/bb
v2/advanced/configuration.html
> ...patience...
> ...patience...
> ...found 1559 targets...
> ...updating 2 targets...
> gcc.compile.c++
bin/gcc-4.1.2/debug/threading-multi/client.o
>
/usr/local/boost_1_35_0/boost/type_traits/detail/cv_traits_i
mpl.hpp: In
> instantiation of 'const bool
>
boost::detail::cv_traits_imp<<unnamed>::Test*>::
is_const':
>
/usr/local/boost_1_35_0/boost/type_traits/is_const.hpp:53:
> instantiated from
'boost::is_const<<unnamed>::Test>'
>
/usr/local/boost_1_35_0/boost/python/detail/cv_category.hpp:
31:
> instantiated from
'boost::python::detail::cv_category<<unnamed>::Test
>'
>
/usr/local/boost_1_35_0/boost/python/detail/unwind_type.hpp:
58:
> instantiated from 'typename Generator::result_type
> boost::python::detail::unwind_ptr_type(U*, Generator*)
[with Generator =
>
boost::python::converter::detail::unwind_type_id_helper, U
=
> <unnamed>::Test]'
>
/usr/local/boost_1_35_0/boost/python/detail/unwind_type.hpp:
127:
> instantiated from 'static typename
Generator::result_type
>
boost::python::detail::unwind_helper2<2>::execute(U&am
p; (*)(), Generator*)
> [with Generator =
>
boost::python::converter::detail::unwind_type_id_helper, U
=
> <unnamed>::Test]'
>
/usr/local/boost_1_35_0/boost/python/detail/unwind_type.hpp:
165:
> instantiated from 'typename Generator::result_type
>
boost::python::detail::unwind_type(boost::type<U>*,
Generator*) [with
> Generator =
boost::python::converter::detail::unwind_type_id_helper, U
=
> <unnamed>::Test&]'
>
/usr/local/boost_1_35_0/boost/python/converter/pytype_functi
on.hpp:45:
> instantiated from 'boost::python::type_info
>
boost::python::converter::detail::unwind_type_id_(boost::typ
e<T>*,
> mpl_::false_*) [with T = <unnamed>::Test&]'
>
/usr/local/boost_1_35_0/boost/python/converter/pytype_functi
on.hpp:68:
> instantiated from 'static const PyTypeObject*
>
boost::python::converter::expected_pytype_for_arg<T>::
get_pytype() [with
> T = <unnamed>::Test&]'
>
/usr/local/boost_1_35_0/boost/python/detail/signature.hpp:98
:
> instantiated from 'static const
> boost::python::detail::signature_element*
>
boost::python::detail::signature_arity<3u>::impl<Si
g>::elements() [with
> Sig = boost::mpl::vector4<int,
<unnamed>::Test&, std::basic_string<char,
> std::char_traits<char>,
std::allocator<char> >, int>]'
>
/usr/local/boost_1_35_0/boost/python/detail/caller.hpp:232:
> instantiated from 'static
boost::python::detail::py_func_sig_info
>
boost::python::detail::caller_arity<3u>::impl<F,
Policies,
> Sig>::signature() [with F = int
(<unnamed>::Test:)(std::strin
g, int),
> Policies = boost::python::default_call_policies, Sig =
> boost::mpl::vector4<int, <unnamed>::Test&,
std::basic_string<char,
> std::char_traits<char>,
std::allocator<char> >, int>]'
>
/usr/local/boost_1_35_0/boost/python/object/py_function.hpp:
48:
> instantiated from
'boost::python::detail::py_func_sig_info
>
boost::python::objects::caller_py_function_impl<Caller>
;::signature()
> const [with Caller =
boost::python::detail::caller<int
> (<unnamed>::Test:)(std::strin
g, int),
> boost::python::default_call_policies,
boost::mpl::vector4<int,
> <unnamed>::Test&, std::basic_string<char,
std::char_traits<char>,
> std::allocator<char> >, int> >]'
> client.cpp:42:   instantiated from here
>
/usr/local/boost_1_35_0/boost/type_traits/detail/cv_traits_i
mpl.hpp:37:
> internal compiler error: in make_rtl_for_nonlocal_decl,
at cp/decl.c:4970
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://bugzil
la.redhat.com/bugzilla> for instructions.
> Preprocessed source stored into /tmp/ccTc0vtd.out file,
please attach
> this to your bugreport.
> 
>     "g++"  -ftemplate-depth-128 -O0
-fno-inline -Wall -g -fPIC -pthread
> -DBOOST_SYSTEM_DYN_LINK=1 
-I"/usr/include/python2.4"
> -I"/usr/local/boost_1_35_0" -c -o
>
"bin/gcc-4.1.2/debug/threading-multi/client.o"
"client.cpp"
> 
> ...failed gcc.compile.c++
bin/gcc-4.1.2/debug/threading-multi/client.o...
> ...skipped
<pbin/gcc-4.1.2/debug/threading-multi>rtpclient.so for
lack
> of
<pbin/gcc-4.1.2/debug/threading-multi>client.o...
> ...failed updating 1 target...
> ...skipped 1 target...
> 
> > I couldn't duplicate this on with :
> >
> > ~/tmp/boost_1_34_0_RC.svn/libs/python/test$ gcc
--version
> > gcc (GCC) 4.1.2 20061115 (prerelease) (Debian
4.1.1-21)
> > Copyright (C) 2006 Free Software Foundation, Inc.
> >
> > could you post the error again, the way it is
generated from your
> > example?
> >
> > Nikolay Mladenov
> >
> > Stuart Marsden wrote:
> >
> >> Hi,
> >>
> >> this looks like the same problem - have
created a simple test case this
> >> works on 1.35.0 on Centos 4 (gcc 3.4.6) but
gives the same error as
> >> previous post on Centos 5 (4.1.2)
> >>
> >> more test.cpp
> >> #include <boost/python/class.hpp>
> >> #include <boost/python/module.hpp>
> >> #include <boost/python/def.hpp>
> >> #include <iostream>
> >> #include <string>
> >> #include <assert.h>
> >> #include <sstream>
> >> #include <boost/bind.hpp>
> >> #include <cstdlib>
> >>
> >> namespace
> >> {
> >>
> >>   class Test
> >>   {
> >>   public:
> >>     Test (int aa, int bb, std::string  cc)
> >>     {
> >>     }
> >>     ~Test ()
> >>     {
> >>     }
> >>     int start (std::string ddd, int ee)
> >>     {
> >>     return 1;
> >>     }
> >>     int getport ()
> >>     {
> >>     return 1;
> >>     }
> >>   private:
> >>   };
> >> }
> >>
> >> BOOST_PYTHON_MODULE (test)
> >> {
> >>   using namespace boost::python;
> >>   class_ < Test > ("Test",
init < int, int, std::string >())
> >>     // Add regular member functions
> >>     .def ("getport",
&Test::getport)
> >>     .def ("start", &Test::start
)
> >>     ;
> >> }
> >>
> >
> > _______________________________________________
> > C++-sig mailing list
> > C++-sigpython.org
> > http:
//mail.python.org/mailman/listinfo/c++-sig
> >
> >
> >

_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )