[C++-sig] trouble with boost.python build (blame boost-1_34_1/boost/function/function_template.hpp?)

Matthew O'Meara mattjomeara at gmail.com
Tue Jan 22 18:38:16 CET 2008


To whom it may concern,

The solution was to put the line

#include <boost/type_traits/is_void.hpp

at the top of boost/function/function_template.hpp.

REQUEST: CLOSED


Best,
Matt




On Jan 18, 2008 1:58 PM, Matthew O'Meara <mattjomeara at gmail.com> wrote:

> Hi all,
>
>
>
>
> I've got a complicated boost.python build and I'm running into an error
> that I can't figure out.  I've tried to simplify it as much as I can while
> still reproducing the same error.
>
>
> For reasons outside of my control I am trying to build using g++ as
> follows.
>
>
> in /path/to/source.cc I have:
>
> #include "boost/python.hpp"
>
>
>
> running:
>
> $g++ -v -I/users/momeara/svn/mini_19621/src
> -I/usr/local/include/boost-1_34_1 -I/usr/local/include/python2.5 -o
> /path/to/target.o /path/to/source.cc
>
> gives:
>
> Using built-in specs.
> Target: i386-redhat-linux
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info --enable-shared --enable-threads=posix
> --enable-checking=relea\
> se --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
> --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
> --di\
> sable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-
> 1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile
> --enable-java-maintainer-mode --with-ecj-jar=/\
> usr/share/java/eclipse-ecj.jar --with-cpu=generic --host=i386-redhat-linux
> Thread model: posix
> gcc version 4.1.2 20070925 (Red Hat 4.1.2-27)
>  /usr/libexec/gcc/i386-redhat-linux/4.1.2/cc1plus -quiet -v
> -I/users/momeara/svn/mini_19621/src -I/usr/local/include/boost-1_34_1
> -I/usr/local/include/pytho\
> n2.5 -D_GNU_SOURCE /users/momeara/svn/_utility__by_hand.cc -quiet
> -dumpbase _utility__by_hand.cc -mtune=generic -auxbase _utility__by_hand
> -version -o /tmp/\
> ccWhDU3J.s
> ignoring nonexistent directory
> "/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/include"
> #include "..." search starts here:
> #include <...> search starts here:
>  /users/momeara/svn/mini_19621/src
>  /usr/local/include/boost-1_34_1
>  /usr/local/include/python2.5
>  /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2
>  /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-linux
>
>
>  /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward
>  /usr/local/include
>  /usr/lib/gcc/i386-redhat-linux/4.1.2/include
>  /usr/include
> End of search list.
> GNU C++ version 4.1.2 20070925 (Red Hat 4.1.2-27) (i386-redhat-linux)
>         compiled by GNU C version 4.1.2 20070925 (Red Hat 4.1.2-27).
> GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
> Compiler executable checksum: 47ecd5b49be3842ab15019d13f95ada6
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:242:
> error: 'is_void' was not declared in this scope
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:242:
> error: '::value' has not been declared
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:253:
> error: template argument 1 is invalid
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:253:
> error: typedef name may not be a nested-name-specifier
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:253:
> error: expected ';' before 'type'
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:263:
> error: 'is_void' was not declared in this scope
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:263:
> error: '::value' has not been declared
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:274:
> error: template argument 1 is invalid
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:274:
> error: typedef name may not be a nested-name-specifier
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:274:
> error: expected ';' before 'type'
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:284:
> error: 'is_void' was not declared in this scope
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:284:
> error: '::value' has not been declared
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:295:
> error: template argument 1 is invalid
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:295:
> error: typedef name may not be a nested-name-specifier
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:295:
> error: expected ';' before 'type'
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp: In
> instantiation of
> 'boost::detail::function::get_invoker0<boost::detail::function::fu\
> nction_obj_ref_tag>::apply<boost::reference_wrapper<void (*)()>, void,
> std::allocator<boost::function_base> >':
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:783:
> instantiated from 'void boost::function0<R, Allocator>::assign_to(const
> Functor&\
> ) [with Functor = boost::reference_wrapper<void (*)()>, R = void,
> Allocator = std::allocator<boost::function_base>]'
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:624:
> instantiated from 'boost::function0<R, Allocator>::function0(Functor,
> typename b\
> oost::enable_if_c<boost::type_traits::ice_not<boost::is_integral<Functor>::value>::value,
> int>::type) [with Functor = boost::reference_wrapper<void (*)()>, \
> R = void, Allocator = std::allocator<boost::function_base>]'
> /usr/local/include/boost-1_34_1/boost/python/errors.hpp:29:   instantiated
> from 'bool boost::python::handle_exception(T) [with T = void (*)()]'
> /usr/local/include/boost-1_34_1/boost/python/errors.hpp:36:   instantiated
> from here
> /usr/local/include/boost-1_34_1/boost/function/function_template.hpp:410:
> error: no type named 'type' in 'struct
> boost::detail::function::get_function_ref_i\
> nvoker0<void (*)(), void>'
>
>
>
>
>
> I have seen seen posts (
> http://archives.free.net.ph/message/20071221.134700.e0c7e2b6.pl.html)
> claiming that there is a bug in function_template that causes it to be
> non-thread-safe.  I tried the suggested patch--replacing
> function_template.hpp and function_base.hpp with the most current version
> from boost svn and it returns the same error.
>
>
> For reference I downloaded the July 2007 boost 1.34.1 source from
> sourceforge and built using ./configure --with-libraries=python
> --with-python=python2.5.
>
>
> I've been trying to get the quickstart builds working--but I am having
> different issues.
>
>
> If anyone has any suggestions for things to look at or try, I would be
> very thankful.
>
> Best,
> Matt
>
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20080122/36754384/attachment.htm>


More information about the Cplusplus-sig mailing list