[C++-sig] boost/python 1.33.1 breaks aliasing rules
Hans-Peter Jansen
hpj at urpla.net
Thu Jun 22 22:30:07 CEST 2006
Hi Philipp,
since you seem the originator of that boost patch:
http://mail.python.org/pipermail/c++-sig/2005-December/009895.html
you might want to know, that this broke boost 1.33.1 compilation on SuSE
9.3:
"c++" -O2 -g -march=i586 -mcpu=i686 -fmessage-length=0 -c -Wall
-ftemplate-depth-255 -DNDEBUG -DNDEBUG -DBOOST_PYTHON_DYNAMIC_LIB
-DBOOST_PYTHON_SOURCE -O2 -finline-functions -Wno-inline -fPIC
-I"bin/boost/libs/python/build" -I "/usr/include/python2.4" -I
"/usr/src/packages/BUILD/boost_1_33_1" -o
"bin/boost/libs/python/build/libboost_python.so/gcc/release/shared-linkable-true/long.o"
"/usr/src/packages/BUILD/boost_1_33_1/libs/
python/build/../src/long.cpp"
/usr/src/packages/BUILD/boost_1_33_1/libs/python/src/long.cpp: In
constructor `boost::python::detail::long_base::long_base()':
/usr/src/packages/BUILD/boost_1_33_1/libs/python/src/long.cpp:27: error:
`new_reference' specified as declarator-id
/usr/src/packages/BUILD/boost_1_33_1/libs/python/src/long.cpp:27: error:
multiple declarations `int' and `boost::python::api::object'
/usr/src/packages/BUILD/boost_1_33_1/libs/python/src/long.cpp:27: error:
invalid conversion from `PyObject*' to `int'
/usr/src/packages/BUILD/boost_1_33_1/libs/python/src/long.cpp:27:
warning: unused variable `int boost::python::detail::new_reference'
/usr/src/packages/BUILD/boost_1_33_1/libs/python/src/long.cpp:27:
confused by earlier errors, bailing out
...failed gcc-C++-action
bin/boost/libs/python/build/libboost_python.so/gcc/release/shared-linkable-true/long.o...
which led to a broken packman package boost-1.33.1-17.pm.1.i586.rpm for
that release (at least):
# rpm -V boost
missing /usr/lib/libboost_python-gcc-1_33.so.1.33.0
missing /usr/lib/libboost_python-gcc-1_33_1.so.1.33.1
It's a pity, that rpm doesn't check for dangling symlinks, otherwise
this failure would have been caught. Why the boost build system bjam
doesn't propagate errors properly escapes me at the moment..
Essentially reverting your patch to long_base::long_base() fixed it for
me, see attached patch for reference.
Manfred, you might want to apply it to your boost build in order to
avoid unspecific "boost doesn't work with python",
"libboost_python*.so* missing" complains..
Cheers,
Pete
-------------- next part --------------
A non-text attachment was scrubbed...
Name: boost-fix_python_build.patch
Type: text/x-diff
Size: 652 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20060622/69107419/attachment.patch>
More information about the Cplusplus-sig
mailing list