Bug 227553 - editors/openoffice-4 and editors/openoffice-devel: fail to build with boost 1.67
Summary: editors/openoffice-4 and editors/openoffice-devel: fail to build with boost 1.67
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Don Lewis
URL:
Keywords: needs-patch
Depends on:
Blocks: 227427
  Show dependency treegraph
 
Reported: 2018-04-16 13:32 UTC by Jan Beich
Modified: 2018-04-22 18:42 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (office)


Attachments
Probable fix (1.03 KB, patch)
2018-04-19 03:32 UTC, Pedro F. Giffuni
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2018-04-16 13:32:42 UTC
After bug 227427 lands this port will end up BROKEN. Can you help?

$ fetch -qo- 'https://reviews.freebsd.org/D15030?download=true' | patch -Efsp0 -d /usr/ports
$ make all deinstall install clean -C/usr/ports/devel/boost-jam
$ make all deinstall install clean -C/usr/ports/devel/boost-libs
$ make all deinstall install clean -C/usr/ports/devel/boost-python-libs
$ make -C/usr/ports/editors/openoffice-4
[...]
basegfx/source/range/b2drangeclipper.cxx:754:40: error: no member named 'prior' in namespace 'boost'
                    rList.erase(boost::prior(aIter.base())));
                                ~~~~~~~^

build log: https://ptpb.pw/J48y https://ptpb.pw/i8UD
regressed by: https://github.com/boostorg/utility/commit/b74f49f1e56e
Comment 1 Pedro F. Giffuni freebsd_committer 2018-04-17 06:52:32 UTC
(In reply to Jan Beich from comment #0)
The release notes say:
____
Utility:
Breaking change: <boost/utility.hpp> header no longer includes boost::next and boost::prior as they have been moved to the iterator module. Instead include <boost/next_prior.hpp>. Other uses of <boost/utility.hpp> are discouraged, it's better to use the header for the specific functionality instead.

____

So a simple replacement should work.

s a side note: I am not sure how to upstream this since upstream still carries a very old boost version to accompany the older MSVC compiler.
Comment 2 Don Lewis freebsd_committer 2018-04-17 17:05:39 UTC
Something like this should work:

#include <boost/version.h>
#if BOOST_VERSION < 106700
#include <boost/utility.hpp>
#else
#include <boost/next_prior.hpp>
#endif
Comment 3 Jan Beich freebsd_committer 2018-04-18 14:36:22 UTC
Don't forget to remove BROKEN line added on Boost 1.67 landing.
Comment 4 commit-hook freebsd_committer 2018-04-18 21:06:05 UTC
A commit references this bug:

Author: truckman
Date: Wed Apr 18 21:06:00 UTC 2018
New revision: 467736
URL: https://svnweb.freebsd.org/changeset/ports/467736

Log:
  Fix editors/openoffice-4 build with boost 1.67 by checking the boost
  version and including <boost/next_prior.hpp> instead of
  <boost/utility.hpp> when the new version of boost is detected.

  PR:		227553
  Reported by:	jbeich

Changes:
  head/editors/openoffice-4/Makefile
  head/editors/openoffice-4/files/patch-boost1.67
Comment 5 Pedro F. Giffuni freebsd_committer 2018-04-19 03:32:53 UTC
Created attachment 192636 [details]
Probable fix

Looking at opengrok, it appears boost:prior is only used twice. No uses of boost:next.

The attached patch (against AOO trunk) should fix it but is untested.
Comment 6 Pedro F. Giffuni freebsd_committer 2018-04-19 03:37:24 UTC
(In reply to Pedro F. Giffuni from comment #5)
Nevermind .. basically the same patch was committed already.
I will upstream this.
Comment 7 Don Lewis freebsd_committer 2018-04-19 04:23:52 UTC
The hangup has been finding enough CPU cycles for test builds ...
Comment 8 Pedro F. Giffuni freebsd_committer 2018-04-19 16:04:43 UTC
(In reply to Don Lewis from comment #7)
I hear you ...

It does look good and the ASF buildbots all show green lights :).
Comment 9 Don Lewis freebsd_committer 2018-04-22 18:42:41 UTC
editors/openoffice-devel has been fixed by upgrading to upstream SVN r1829757
which incorporates the fix for boost 1.67.

Author: truckman
Date: Sun Apr 22 17:09:14 2018
New Revision: 468039
URL: https://svnweb.freebsd.org/changeset/ports/468039

Log:
  Upgrade openoffice-devel to upstream SVN r1829757.
  
  The fix for compatibility with boost 1.67 has been upstreamed, so
  remove BROKEN.
  
  Upstream has switched from gstreamer 0.10 to gstreamer 1.x, so change
  our dependency to match.  Don't specify an explicit LIB_DEPENDS in
  addition to USE_GSTREAMER1.
  
  Most of the patches to work around various compiler issues have been
  upstreamed, so remove them here.
  
  Modernize patch-framework_Library__fwk.mk.