Upgrade boost from 1.55 to 1.60
This wiki page is based on the following bug-request:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199601#c27
| Port failures with 1.55 | Patch/PR | Notes |
|---|---|---|
| databases/mariadb100-server:build | PR 207094 | |
| databases/mariadb55-server:package | PR 207115 | |
| | Unrelated, fails on 10.x anyway, marked BROKEN | |
| | Committed r408498 |
truckmans' logs for the following list: https://people.freebsd.org/~truckman/boost-1.60_fallout/r405759/FreeBSD-10.1-amd64/
| Port failures with 1.60 | Patch/PR | Notes |
|---|---|---|
| | Committed r408472 | |
| | Committed r408418 | |
| | Committed r408473 | |
| | Committed r408549 | |
| deskutils/kdepim4:build | Fixed by qt4-moc patch | |
| | Committed r408912 | |
| | Committed r408476 | |
| | Committed r408415 | |
| devel/kdevplatform:build | Fixed by qt4-moc patch | |
| | Committed r406614 | |
| | Committed r408552 | |
| | Committed r408611, also PR 207073 | |
| | Committed r409549 | |
| | Committed r406614 | |
| games/plee-the-bear:build | ||
| | Committed r408412 | |
| | Committed r408413 | |
| | Committed r406614 | |
| | Committed r408475 | |
| | Committed r408419 | |
| | Committed r410719 | |
| | Committed r408995 | |
| | Committed r410146 | |
| | Committed r408592 | |
| | Committed r408498 | |
| math/pdal:build | PR 207059 | May be switched to internal boost for the time being, but needs update |
| | Committed r408773 | |
| multimedia/gstreamer1-qt4:build | PR 207144 | |
| | Committed r408474 | |
| | Committed r408502 | |
| security/quantis:build | Fixed by qt4-moc patch | |
| | Committed r409560 | |
| | | Deprecated |
| | Committed r409567 | |
| | | Deprecated |
| | Committed r408572 | |
| | Committed r408416 | |
| x11/leechcraft:build | Fixed by qt4-moc patch |
Common problems
luabind
error: no matching function for call to 'operator!=' note: in expansion of macro 'LUABIND_OPERATOR_ADL_WKND' LUABIND_OPERATOR_ADL_WKND(!=) ^
This is luabind problem (probably in bundled version of luabind).
Examples: devel/luabind, games/allacrost, games/valyriatear
Solution: you need to patch luabind/object.hpp like this
qt4 moc
Parse error at "BOOST_JOIN"
Qt4's moc fails to parse macros in namespace declarations, like this in boost/type_traits/detail/has_binary_operator.hpp:
namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
There is an upstream bug about this and it is fixed in Qt 5, but there are no plans to backport the fix to Qt 4.
Examples: audio/clementine-player, cad/openscad, graphics/evolvotron
Solution: It is possible to solve the problem in two different ways:
1. Make moc automatically define the include guards for the headers that ultimately include the other headers that use namespace BOOST_JOIN, so that moc does not include them and does not fail to process a port's includes. It involves some trial and error to find out which headers must be skipped. It helps to replace the moc-qt4 invocation with c++ -E to see which headers are being included where. Once you have figured out which headers must be skipped, edit devel/qt4-moc/files/patch-src__tools__moc__main.cpp and add their include guards to the list.
2. Instead of changing moc, wrap the Boost includes in a port within an #ifndef Q_MOC_RUN block so that moc just skips them when processing a port's source code.
#ifndef Q_MOC_RUN #include <boost/...> #endif
It can be quicker than the other solution, but requires patching a lot of files in many different ports.
file streams
error: reference to 'ifstream' is ambiguous
Namespace conflict between std::ifstream and boost::filesystem::ifstream (or ofstream).
Examples: games/pokerth, games/traingame
Solution: resolve the conflict by using fully qualified name. Since boost/filesystem/fstream.hpp is included only in newer boost, it is likely that std streams are actually meant, so you need to replace [io]fstream mentions by std::[io]fstream correspondingly:
@${FIND} ${WRKSRC} -name '*.cpp' -print0 | ${XARGS} -0 \
${REINPLACE_CMD} -e 's|[io]fstream|std::&|'
missing symbols
undefined reference to `boost::system::generic_category()'
Examples: devel/codeblocks, www/anyterm
Solution: link with needed boost libraries
LIBS+= -L${LOCALBASE}/lib -lboost_system
PFTO
It was a hack for broken old compilers, no op on actual clang and gcc that we use.
Examples: graphics/aqsis
Solution: just remove pfto.hpp includes and BOOST_MAKE_PFTO_WRAPPER.
boost test
error: use of undeclared identifier 'BOOST_CHECKPOINT'
This is deprecated API which was removed in 1.60 or earlier. See this.
Examples: devel/avro-cpp
Solution: Replace BOOST_CHECKPOINT with BOOST_TEST_CHECKPOINT, BOOST_MESSAGE with BOOST_TEST_MESSAGE, BOOST_BITWISE_EQUAL with BOOST_CHECK_BITWISE_EQUAL.
ice
/usr/local/include/boost/graph/adjacency_matrix.hpp:446:5: error: type name requires a specifier or qualifier
BOOST_STATIC_ASSERT(type_traits::ice_not<(is_same<Directed, bidirectionalS>::value)>::value);
^
Examples: databases/sfcgal (actually math/cgal)
Solution: Bug in boost. Need to explicitly include <boost/type_traits/ice.hpp> for boost 1.60
+// Workaround for boost bug #11880 +#include <boost/version.hpp> +#if BOOST_VERSION == 106000 + #include <boost/type_traits/ice.hpp> +#endif