====== 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 [[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207094|207094]] | |
| databases/mariadb55-server:package | PR [[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207115|207115]] | |
| games/supertux2:build | | Unrelated, fails on 10.x anyway, marked BROKEN |
| lang/sdcc-devel:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408498|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 ^
| audio/clementine-player:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408472|r408472]] | |
| audio/csound6:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408418|r408418]] | |
| cad/openscad:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408473|r408473]] | |
| databases/sfcgal:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408549|r408549]] | |
| deskutils/kdepim4:build | | Fixed by qt4-moc patch |
| deskutils/pinot:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408912|r408912]] | |
| devel/avro-cpp:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408476|r408476]] | |
| devel/codeblocks:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408415|r408415]] | |
| devel/kdevplatform:build | | Fixed by qt4-moc patch |
| devel/luabind:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=406614|r406614]] | |
| devel/msp430-debug-stack:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408552|r408552]] | |
| editors/openoffice-devel:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408611|r408611]], also PR [[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207073|207073]] | |
| finance/ledger:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=409549|r409549]] | |
| games/allacrost:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=406614|r406614]] | |
| games/plee-the-bear:build | | |
| games/pokerth:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408412|r408412]] | |
| games/traingame:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408413|r408413]] | |
| games/valyriatear:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=406614|r406614]] | |
| graphics/aqsis:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408475|r408475]] | |
| graphics/evolvotron:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408419|r408419]] | |
| graphics/mapnik:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=410719|r410719]] | |
| graphics/mitsuba:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408995|r408995]] | |
| graphics/py-openimageio:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=410146|r410146]] | |
| graphics/scantailor:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408592|r408592]] | |
| lang/sdcc:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408498|r408498]] | |
| math/pdal:build | PR [[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207059|207059]] | May be switched to internal boost for the time being, but needs update |
| multimedia/gstreamer-qt4:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408773|r408773]] | |
| multimedia/gstreamer1-qt4:build | PR [[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207144|207144]] | |
| net-p2p/namecoin:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408474|r408474]] | |
| science/avogadro:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408502|r408502]] | |
| security/quantis:build | | Fixed by qt4-moc patch |
| textproc/libabw:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=409560|r409560]] | |
| textproc/libe-book00:build | PR [[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207017|207017]] | Deprecated |
| textproc/libe-book:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=409567|r409567]] | |
| textproc/libvisio:build | PR [[https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206999|206999]] | Deprecated |
| textproc/luceneplusplus:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408572|r408572]] | |
| www/anyterm:build | Committed [[https://svnweb.freebsd.org/ports?view=revision&revision=408416|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 [[https://svnweb.freebsd.org/ports/head/games/allacrost/files/patch-src_luabind_luabind_object.hpp?revision=406614&view=markup|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 [[https://bugreports.qt.io/browse/QTBUG-22829|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
#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 [[https://github.com/boostorg/test/blob/8c598cd8df38d9d2d5441a469e68c2ba8eb8c7e2/include/boost/test/test_tools.hpp#L367|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::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
+#if BOOST_VERSION == 106000
+ #include
+#endif