Bug 537612

Summary: compile error against boost/python/exception_translator.hpp
Product: [Fedora] Fedora Reporter: Thomas Spura <tomspur>
Component: boostAssignee: Benjamin Kosnik <bkoz>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: bkoz, mnewsome, pmachata
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: boost-1.39.0-9.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-18 22:22:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thomas Spura 2009-11-15 02:09:13 UTC
Following compile error:

libtool: compile:  g++ -I/usr/include/python2.6 -I/usr/lib64/python2.6/site-packages/numpy/core/include -DHAVE_CONFIG_H -I../dependencies/threadpool/include -I../include -I../include -I/usr/include/gtkglextmm-1.2 -I/usr/lib64/gtkglextmm-1.2/include -I/usr/include/gtkglext-1.0 -I/usr/include/gtkmm-2.4 -I/usr/lib64/gtkmm-2.4/include -I/usr/lib64/gtkglext-1.0/include -I/usr/include/gdkmm-2.4 -I/usr/lib64/gdkmm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib64/pangomm-1.4/include -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/giomm-2.4 -I/usr/lib64/giomm-2.4/include -I/usr/include/glibmm-2.4 -I/usr/lib64/glibmm-2.4/include -I/usr/include/sigc++-2.0 -I/usr/lib64/sigc++-2.0/include -I/usr/include/cairomm-1.0 -I/usr/include/atk-1.0 -I/usr/include/gtk-unix-print-2.0 -I/usr/include/atkmm-1.6 -I/usr/include/libglademm-2.4 -I/usr/lib64/libglademm-2.4/include -I/usr/include/libglade-2.0 -I/usr/include/libxml2 -I../include/gtk2 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/python2.6 -I/usr/lib64/python2.6/site-packages/numpy/core/include -fpic -DPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -ftemplate-depth-120 -DNDEBUG -MMD -MF cvisualmodule.d -MT "cvisualmodule.d cvisualmodule.lo" -c ./python/cvisualmodule.cpp  -fPIC -DPIC -o .libs/cvisualmodule.o
In file included from /usr/include/boost/python/exception_translator.hpp:13,
                 from ./python/cvisualmodule.cpp:13:
/usr/include/boost/python/detail/translate_exception.hpp:34: error: expected nested-name-specifier before 'add_reference'
/usr/include/boost/python/detail/translate_exception.hpp:34: error: expected ';' before '<' token
In file included from /usr/include/boost/python/exception_translator.hpp:13,
                 from ./python/cvisualmodule.cpp:13:
/usr/include/boost/python/detail/translate_exception.hpp: In member function 'bool boost::python::detail::translate_exception<ExceptionType, Translate>::operator()(const boost::python::detail::exception_handler&, const boost::function0<void>&, typename boost::call_traits<Translate>::param_type) const':
/usr/include/boost/python/detail/translate_exception.hpp:56: error: expected type-specifier before 'exception_cref'
/usr/include/boost/python/detail/translate_exception.hpp:56: error: expected ')' before 'e'
/usr/include/boost/python/detail/translate_exception.hpp:56: error: expected '{' before 'e'
/usr/include/boost/python/detail/translate_exception.hpp:56: error: 'e' was not declared in this scope
/usr/include/boost/python/detail/translate_exception.hpp:56: error: expected ';' before ')' token


When looking into the translate_exception.hpp file, there is some workaround for a broken gcc, maybe this is the same error here...

This was a try to compile Vpython. The spec file, which was used is available at:
http://tomspur.fedorapeople.org/python-visual-compile-error/

Comment 1 Petr Machata 2009-11-16 22:37:04 UTC
The problem is that translate_exception.hpp doesn't include boost/type_traits/add_reference.hpp.  I'll add the patch to the package right away, but one way for you to fix the problem temporarily would be to do that include in vpython code yourself, like this:

+#include <boost/type_traits/add_reference.hpp>
 #include <boost/python/exception_translator.hpp>

As a sidenote, you need to add `numpy' as buildrequires.

Comment 2 Fedora Update System 2009-11-16 23:58:20 UTC
boost-1.39.0-9.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/boost-1.39.0-9.fc12

Comment 3 Fedora Update System 2009-11-18 14:11:03 UTC
boost-1.39.0-9.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update boost'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2009-11670

Comment 4 Fedora Update System 2010-02-18 22:22:18 UTC
boost-1.39.0-9.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.