[MacPorts] #59644: mkvtoolnix @39.0.0: Parse error at "mtx" (was: mkvtoolnix @39.0.0 fails to build on mavericks)

MacPorts noreply at macports.org
Sat Nov 9 04:15:00 UTC 2019


#59644: mkvtoolnix @39.0.0: Parse error at "mtx"
-------------------------+-------------------------------------------------
  Reporter:  tehcog      |      Owner:  ryandesign
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.6.2
Resolution:              |   Keywords:  mavericks mountainlion lion
      Port:  mkvtoolnix  |  snowleopard leopard tiger
-------------------------+-------------------------------------------------
Changes (by ryandesign):

 * keywords:   => mavericks mountainlion lion snowleopard leopard tiger


Comment:

 I see in the log that every time moc is run, it has a problem with a json
 header:

 {{{
 :info:build            MOC src/mkvtoolnix-gui/app.h
 :info:build /opt/local/libexec/qt5/bin/moc
 -I/opt/local/libexec/qt5/include/QtWidgets
 -I/opt/local/libexec/qt5/include
 -I/opt/local/libexec/qt5/include/QtMultimedia
 -I/opt/local/libexec/qt5/include -I/opt/local/libexec/qt5/include/QtGui
 -I/opt/local/libexec/qt5/include
 -I/opt/local/libexec/qt5/include/QtNetwork
 -I/opt/local/libexec/qt5/include
 -I/opt/local/libexec/qt5/include/QtConcurrent
 -I/opt/local/libexec/qt5/include -I/opt/local/libexec/qt5/include/QtCore
 -I/opt/local/libexec/qt5/include -I. -Ilib -Ilib/avilib-0.6.10 -Isrc
 -Ilib/utf8-cpp/source -DSYS_APPLE -nw src/mkvtoolnix-gui/app.h > src
 /mkvtoolnix-gui/app.moc
 :info:build
 opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_mkvtoolnix/mkvtoolnix/work/mkvtoolnix-39.0.0/src/common/json.:22:
 Parse error at "mtx"
 }}}

 It is weird that
 `opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_mkvtoolnix/mkvtoolnix/work/mkvtoolnix-39.0.0/src/common/json.`
 is missing the leading `/` and the trailing `h`. But looking around on
 Google now, I see others reporting moc error messages that look just like
 that, so the missing leading and trailing characters must be a bug in how
 moc prints error messages.

 You are on OS X 10.9 and are therefore using Qt 5.8.0. I am on macOS 10.13
 and therefore using Qt 5.12.5. Maybe this parse error is a problem in Qt
 that was resolved after 5.8.0.

 Line 22 of
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_mkvtoolnix/mkvtoolnix/work/mkvtoolnix-39.0.0/src/common/json.h
 says:

 {{{
 namespace mtx::json {
 }}}

 From what I have been able to learn just now, this is called a compact
 namespace, and is a new feature in C++17. mkvtoolnix now requires C++17
 and indicates that. But probably moc from Qt 5.8.0 predates C++17 and so
 it does not understand that syntax.

 A normal namespace like `namespace mtx { namespace json {` should be
 compatible with your older moc. An additional `}` would be needed at the
 end of the namespace too. You can try making that change and see if it
 gets further. If there are other compact namespaces in the source code
 files that moc processes, they might need to be changed too. If this is
 the only thing preventing the use of older Qt, we could apply a patch for
 this in the port.

-- 
Ticket URL: <https://trac.macports.org/ticket/59644#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list