Bug 239196 - multimedia/mkvtoolnix: fails to build with boost 1.71
Summary: multimedia/mkvtoolnix: fails to build with boost 1.71
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: Thomas Zander
URL:
Keywords: needs-patch
Depends on:
Blocks: 238827
  Show dependency treegraph
 
Reported: 2019-07-14 10:07 UTC by Jan Beich
Modified: 2019-08-09 07:57 UTC (History)
1 user (show)

See Also:
riggs: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2019-07-14 10:07:25 UTC
Regressed by https://github.com/boostorg/algorithm/commit/c6f784cb7034

Can you help with a fix or report upstream? Otherwise, the port will be marked BROKEN after Boost update.

$ fetch -qo- 'https://reviews.freebsd.org/D20774?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 -C/usr/ports/multimedia/mkvtoolnix
[...]
In file included from src/common/xml/ebml_tags_converter.cpp:19:
In file included from src/common/strings/formatting.h:21:
src/common/strings/editing.h:32:10: fatal error: no viable conversion from returned value of type 'const std::__1::basic_string<char>' to function return type 'std::vector<std::string>' (aka 'vector<basic_string<char, char_traits<char>, allocator<char> > >')
  return split(text, boost::regex("\\Q"s + pattern, boost::regex::perl), max);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/vector:534:5: note: candidate constructor not viable: no known conversion from 'const std::__1::basic_string<char>' to 'const std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &' for 1st argument
    vector(const vector& __x);
    ^
/usr/include/c++/v1/vector:541:5: note: candidate constructor not viable: no known conversion from 'const std::__1::basic_string<char>' to 'initializer_list<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > >::value_type>' (aka 'initializer_list<std::__1::basic_string<char> >') for 1st argument
    vector(initializer_list<value_type> __il);
    ^
/usr/include/c++/v1/vector:547:5: note: candidate constructor not viable: no known conversion from 'const std::__1::basic_string<char>' to 'std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > > &&' for 1st argument
    vector(vector&& __x)
    ^
/usr/include/c++/v1/string:823:5: note: candidate function
    operator __self_view() const _NOEXCEPT { return __self_view(data(), size()); }
    ^

http://package18.nyi.freebsd.org/data/120amd64-default-PR238827/2019-07-12_20h45m32s/logs/mkvtoolnix-34.0.0_2.log
http://pb2.nyi.freebsd.org/data/120i386-default-PR238827/2019-07-12_20h46m33s/logs/mkvtoolnix-34.0.0_2.log
http://package23.nyi.freebsd.org/data/112i386-default-PR238827/2019-07-12_20h48m21s/logs/mkvtoolnix-34.0.0_2.log

Alternatively, can be reproduced with Boost 1.70 but Algorithm 1.71 headers.

$ cd /usr/ports/multimedia/mkvtoolnix
$ make configure
$ cd $(make -V BUILD_WRKSRC)
$ pkg install git
$ git clone -b master https://github.com/boostorg/algorithm /tmp/algorithm
$ c++ -I/tmp/algorithm/include -Wall -Wno-comment -Wfatal-errors -O3 -D_FILE_OFFSET_BITS=64 -DMTX_LOCALE_DIR=\"/usr/local/share/locale\" -DMTX_PKG_DATA_DIR=\"/usr/local/share/mkvtoolnix\" -DMTX_DOC_DIR=\"/usr/local/share/doc/mkvtoolnix\" -fstack-protector-strong -Ilib/nlohmann-json/include -Ilib/fmt/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -DLIBICONV_PLUG -isystem /usr/local/include -fPIC -std=gnu++14 -Wnon-virtual-dtor -Wextra -Wno-missing-field-initializers -Wunused -Wpedantic -Woverloaded-virtual -Wshadow -Qunused-arguments -Wno-self-assign -Wno-mismatched-tags -Wno-inconsistent-missing-override -Wno-potentially-evaluated-expression -Wno-extra-semi -I/usr/local/include/qt5/QtCore -I/usr/local/include/qt5 -I/usr/local/include/qt5/QtGui -DQT_WIDGETS_LIB -I/usr/local/include/qt5/QtWidgets -DQT_MULTIMEDIA_LIB -I/usr/local/include/qt5/QtMultimedia -I/usr/local/include/qt5/QtNetwork -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -I/usr/local/include/qt5/QtConcurrent -DQT_DBUS_LIB -I/usr/local/include/qt5/QtDBus -DQT_CORE_LIB -I/usr/local/include -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -isystem /usr/local/include -include src/common/common_pch.h -I. -Ilib -Ilib/avilib-0.6.10 -Isrc -Ilib/utf8-cpp/source -c -MMD -MF /wrkdirs/usr/ports/multimedia/mkvtoolnix/work/mkvtoolnix-34.0.0/rake.d/dependency.d/tmp/src_common_xml_ebml_tags_converter_o.d -o src/common/xml/ebml_tags_converter.o -x c++ src/common/xml/ebml_tags_converter.cpp
Comment 1 Thomas Zander freebsd_committer freebsd_triage 2019-08-08 11:22:08 UTC
Upstream bug report filed.
Comment 2 Jan Beich freebsd_committer freebsd_triage 2019-08-08 11:36:04 UTC
https://gitlab.com/mbunkus/mkvtoolnix/issues/2599 is the one? The minor API change is linked in comment 0 (first line). Other Boost.Algorithm consumers (some of which use boost::split) built fine.
Comment 3 Thomas Zander freebsd_committer freebsd_triage 2019-08-09 06:16:42 UTC
(In reply to Jan Beich from comment #2)

Yes, that's the one.
I am doing the test build right now, should be finished in a couple of minutes.
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-08-09 07:49:11 UTC
A commit references this bug:

Author: riggs
Date: Fri Aug  9 07:48:30 UTC 2019
New revision: 508424
URL: https://svnweb.freebsd.org/changeset/ports/508424

Log:
  Fix build with boost 1.71

  Details:
  - Backport upstream change to resolve namespace lookup issue with
    mkvtoolnix's split function and upcoming boost release, see
    https://gitlab.com/mbunkus/mkvtoolnix/issues/2599

  PR:		239196
  Reported by:	jbeich

Changes:
  head/multimedia/mkvtoolnix/files/patch-src_common_strings_editing.h