[MacPorts] #40231: mkvtoolnix: fix build with clang

MacPorts noreply at macports.org
Fri Aug 23 07:49:48 PDT 2013


#40231: mkvtoolnix: fix build with clang
--------------------------+--------------------------------
 Reporter:  ryandesign@…  |      Owner:  macports-tickets@…
     Type:  enhancement   |     Status:  new
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.2.0
 Keywords:                |       Port:  mkvtoolnix
--------------------------+--------------------------------
 mkvtoolnix currently requires gcc 4.6 or newer to build, but mkvextract
 crashes because boost and icu have not been built with the same compiler.
 The idea of getting new ports of boost and icu built with such a compiler
 is explored in #34806.

 In this ticket, I'd instead like to explore the idea of getting mkvtoolnix
 to build correctly with clang. In r109693 Jeremy H.S. disabled the port on
 Mavericks adding a comment saying this would be the necessary fix.

 Attached is a patch that begins work toward this solution.

 The configure script tests for various C++11 features that are required,
 but it doesn't find three of them even in versions of clang that have them
 [ticket:34288#comment:7 because] `-stdlib=libc++` was not used. I added a
 patch to add this to the configure script. However it must only be added
 when the compiler is clang. When the compiler is gcc 4.6 or newer, adding
 this flag causes all the C++11 feature tests to fail.

 Unfortunately even with recent clang the build eventually fails:

 With clang version "Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM
 3.2svn)" from Xcode 4.6.2, the error is:

 {{{
 /usr/bin/../lib/c++/v1/vector:1822:21: fatal error: overload resolution
 selected implicitly-deleted copy assignment operator
                 __m = __first;
                     ^
 }}}

 With MacPorts clang 3.3 and 3.4, the error wording is slightly different:

 {{{
 /opt/local/libexec/llvm-3.3/bin/../lib/c++/v1/vector:1879:21: fatal error:
 object of type 'boost::filter_iterator<<lambda at
 src/common/command_line.cpp:295:74>,
 boost::transform_iterator<boost::range_detail::select_first<std::__1::map<std::__1::basic_string<char>,
 std::__1::basic_string<char>, std::__1::less<std::__1::basic_string<char>
 >, std::__1::allocator<std::__1::pair<const std::__1::basic_string<char>,
 std::__1::basic_string<char> > > > >,
 std::__1::__map_const_iterator<std::__1::__tree_const_iterator<std::__1::pair<std::__1::basic_string<char>,
 std::__1::basic_string<char> >, const
 std::__1::__tree_node<std::__1::pair<std::__1::basic_string<char>,
 std::__1::basic_string<char> >, void *> *, long> >, boost::use_default,
 boost::use_default> >' cannot be assigned because its copy assignment
 operator is implicitly deleted
                 __m = __first;
                     ^
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/40231>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list