Opened 5 years ago
Closed 5 years ago
#59644 closed defect (wontfix)
mkvtoolnix @39.0.0: Parse error at "mtx"
Reported by: | tehcog (tehcog) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.2 |
Keywords: | mavericks mountainlion lion snowleopard leopard tiger | Cc: | Ionic (Mihai Moldovan) |
Port: | mkvtoolnix |
Description
:error:build Failed to build mkvtoolnix: command execution failed
Please see attached main.log file
Attachments (1)
Change History (9)
Changed 5 years ago by tehcog (tehcog)
Attachment: | mkvtoolnix-39.0.0_main.log added |
---|
comment:1 Changed 5 years ago by mf2k (Frank Schima)
Cc: | ryandesign removed |
---|---|
Owner: | set to ryandesign |
Status: | new → assigned |
comment:2 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | mavericks mountainlion lion snowleopard leopard tiger added |
---|---|
Summary: | mkvtoolnix @39.0.0 fails to build on mavericks → mkvtoolnix @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 years 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 5 years ago by ryandesign (Ryan Carsten 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?
comment:5 Changed 5 years ago by Ionic (Mihai Moldovan)
Cc: | Ionic added |
---|
I'm carefully positive that we can close this ticket, since mkvtoolnix
now formally depends upon Qt >= 5.9, which should fix the moc issue discussed here and sadly also means that the GUI won't be usable on older operating systems.
(Although, strictly speaking, if the moc bug is the only requirement for 5.9+, then we could revert the check back to the older value and fix up the build to not try to parse that file with moc - reenabling the GUI for older platforms. Processing a header with moc is only really needed for Qt objects and signals and slots, so in theory excluding that file should work.
I looked into the repository and found out that the earlier version was compatible Qt 5.4+. They removed a bit of compatibility code with the newest release when bumping the requirement up to 5.9+, so it's not just fixing a moc issue. We probably don't want to maintain a GUI modification patch set and upstream seems to not be interested in supporting older versions, so that won't work...)
comment:6 Changed 5 years ago by kencu (Ken)
comment:7 Changed 5 years ago by Ionic (Mihai Moldovan)
Yes, hence why I say that this ticket is obsolete.
comment:8 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
main.log