Opened 6 days ago

Last modified 2 days ago

#59644 assigned defect

mkvtoolnix @39.0.0: Parse error at "mtx"

Reported by: tehcog (tehcog) Owned by: ryandesign (Ryan Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: mavericks mountainlion lion snowleopard leopard tiger Cc:
Port: mkvtoolnix


:error:build Failed to build mkvtoolnix: command execution failed

Please see attached main.log file

Attachments (1)

mkvtoolnix-39.0.0_main.log (1.4 MB) - added by tehcog (tehcog) 6 days ago.

Download all attachments as: .zip

Change History (5)

Changed 6 days ago by tehcog (tehcog)

Attachment: mkvtoolnix-39.0.0_main.log added


comment:1 Changed 6 days ago by mf2k (Frank Schima)

Cc: ryandesign removed
Owner: set to ryandesign
Status: newassigned

comment:2 Changed 5 days ago by ryandesign (Ryan Schmidt)

Keywords: mavericks mountainlion lion snowleopard leopard tiger added
Summary: mkvtoolnix @39.0.0 fails to build on mavericksmkvtoolnix @39.0.0: Parse error at "mtx"

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.

comment:3 Changed 5 days ago by kencu (Ken)

there is a define that can be used to prevent moc from including a troublesome header as well; we have to do that for the qt4 moc for some boost headers. Perhaps that might be useful. You have ti bracket the header with the define (or the define can be permanently added to the header.)

comment:4 Changed 2 days ago by ryandesign (Ryan Schmidt)

I didn't know that. But I thought the point was that moc needs to process the files in some way. Wouldn't telling it to skip a file mean that it misses some information that it needs?

Note: See TracTickets for help on using tickets.