#62421 closed defect (fixed)
mkvtoolnix 55.0.0: fails to build on macOS 10.14.6
Reported by: | mopihopi | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | i0ntempest | |
Port: | mkvtoolnix |
Description
Upgrading mkvtoolnix from @53.0.0_0+qtgui to @55.0.0+qtgui on macOS 10.14.6 18G8022 with Xcode 10.3 10G8 fails:
$ sudo port upgrade mkvtoolnix ---> Computing dependencies for mkvtoolnix ---> Fetching archive for mkvtoolnix ---> Attempting to fetch mkvtoolnix-55.0.0_0+qtgui.darwin_18.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/mkvtoolnix ---> Attempting to fetch mkvtoolnix-55.0.0_0+qtgui.darwin_18.x86_64.tbz2 from https://kmq.jp.packages.macports.org/mkvtoolnix ---> Attempting to fetch mkvtoolnix-55.0.0_0+qtgui.darwin_18.x86_64.tbz2 from https://mse.uk.packages.macports.org/mkvtoolnix ---> Fetching distfiles for mkvtoolnix ---> Verifying checksums for mkvtoolnix ---> Extracting mkvtoolnix ---> Configuring mkvtoolnix Error: Failed to configure mkvtoolnix, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mkvtoolnix/mkvtoolnix/work/mkvtoolnix-55.0.0/config.log Error: Failed to configure mkvtoolnix: configure failure: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_multimedia_mkvtoolnix/mkvtoolnix/main.log for details. Error: Follow https://guide.macports.org/#project.tickets to report a bug. $
It fails in the configure phase:
:info:configure checking compiler type and version... clang 11.0.0 :info:configure checking for lld... no :info:configure checking for support for the "-std=c++17" flag... -std=c++17 :info:configure checking for support for C++17 feature "attribute 'maybe_unused'"... yes :info:configure checking for support for C++17 feature "nested namespace definition"... yes :info:configure checking for support for C++17 feature "structured bindings"... yes :info:configure checking for support for C++17 feature "std::optional"... yes :info:configure checking for support for C++17 feature "std::gcd"... yes :info:configure checking for support for C++17 feature "constexpr if"... yes :info:configure checking for support for C++17 feature "file system library"... no :info:configure checking for libraries to link against for the file system library... :info:configure The following features of the C++17 standards are not supported by /usr/bin/clang++: :info:configure * file system library (C++17) :info:configure If you are using the GNU C compiler collection (gcc), you need :info:configure at least v8; for clang v7 and newer should work. :info:configure configure: error: support for required C++17 features incomplete
The config.log shows the compiler error that caused the configure test to fail:
configure:6955: checking for support for C++17 feature "file system library" configure:6984: /usr/bin/clang++ -c -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -arch x86_64 -std=c++17 -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk conftest.cpp >&5 conftest.cpp:29:49: error: 'path' is unavailable: introduced in macOS 10.15 return std::filesystem::exists(std::filesystem::path{"/etc/passwd"}) ? 1 : 0; ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here class _LIBCPP_TYPE_VIS path { ^ conftest.cpp:29:32: error: 'path<char [12], void>' is unavailable: introduced in macOS 10.15 return std::filesystem::exists(std::filesystem::path{"/etc/passwd"}) ? 1 : 0; ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:773:3: note: 'path<char [12], void>' has been explicitly marked unavailable here path(const _Source& __src, format = format::auto_format) { ^ conftest.cpp:29:32: error: 'path' is unavailable: introduced in macOS 10.15 return std::filesystem::exists(std::filesystem::path{"/etc/passwd"}) ? 1 : 0; ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:773:3: note: 'path' has been explicitly marked unavailable here path(const _Source& __src, format = format::auto_format) { ^ conftest.cpp:29:32: error: '~path' is unavailable: introduced in macOS 10.15 return std::filesystem::exists(std::filesystem::path{"/etc/passwd"}) ? 1 : 0; ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:791:3: note: '~path' has been explicitly marked unavailable here ~path() = default; ^ conftest.cpp:29:25: error: 'exists' is unavailable: introduced in macOS 10.15 return std::filesystem::exists(std::filesystem::path{"/etc/passwd"}) ? 1 : 0; ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:1617:39: note: 'exists' has been explicitly marked unavailable here inline _LIBCPP_INLINE_VISIBILITY bool exists(const path& __p) { ^ 5 errors generated. configure:6984: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "MKVToolNix" | #define PACKAGE_TARNAME "mkvtoolnix" | #define PACKAGE_VERSION "55.0.0" | #define PACKAGE_STRING "MKVToolNix 55.0.0" | #define PACKAGE_BUGREPORT "https://gitlab.com/mbunkus/mkvtoolnix/issues/" | #define PACKAGE_URL "" | #define HAVE_STDIO_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_UNISTD_H 1 | #define STDC_HEADERS 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_SYSCALL_H 1 | #define HAVE_VSSCANF 1 | #define HAVE_SYSCALL 1 | /* end confdefs.h. */ | #include <filesystem> | int | main (void) | { | return std::filesystem::exists(std::filesystem::path{"/etc/passwd"}) ? 1 : 0; | ; | return 0; | } configure:7001: result: no configure:7009: checking for libraries to link against for the file system library configure:7040: /usr/bin/clang++ -o conftest -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -arch x86_64 -std=c++17 -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -L/opt/local/lib -Wl,-headerpad_max_install_names -stdlib=libc++ -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -arch x86_64 conftest.cpp -lstdc++fs >&5 conftest.cpp:29:49: error: 'path' is unavailable: introduced in macOS 10.15 return std::filesystem::exists(std::filesystem::path{"/etc/passwd"}) ? 1 : 0; ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:739:24: note: 'path' has been explicitly marked unavailable here class _LIBCPP_TYPE_VIS path { ^ conftest.cpp:29:32: error: 'path<char [12], void>' is unavailable: introduced in macOS 10.15 return std::filesystem::exists(std::filesystem::path{"/etc/passwd"}) ? 1 : 0; ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:773:3: note: 'path<char [12], void>' has been explicitly marked unavailable here path(const _Source& __src, format = format::auto_format) { ^ conftest.cpp:29:32: error: 'path' is unavailable: introduced in macOS 10.15 return std::filesystem::exists(std::filesystem::path{"/etc/passwd"}) ? 1 : 0; ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:773:3: note: 'path' has been explicitly marked unavailable here path(const _Source& __src, format = format::auto_format) { ^ conftest.cpp:29:32: error: '~path' is unavailable: introduced in macOS 10.15 return std::filesystem::exists(std::filesystem::path{"/etc/passwd"}) ? 1 : 0; ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:791:3: note: '~path' has been explicitly marked unavailable here ~path() = default; ^ conftest.cpp:29:25: error: 'exists' is unavailable: introduced in macOS 10.15 return std::filesystem::exists(std::filesystem::path{"/etc/passwd"}) ? 1 : 0; ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/filesystem:1617:39: note: 'exists' has been explicitly marked unavailable here inline _LIBCPP_INLINE_VISIBILITY bool exists(const path& __p) { ^ 5 errors generated. configure:7040: $? = 1
The error can also be seen on the buildbot: https://build.macports.org/builders/ports-10.14_x86_64-builder/builds/80684
Change History (6)
comment:1 Changed 4 years ago by mf2k (Frank Schima)
Cc: | ryandesign removed |
---|---|
Owner: | set to ryandesign |
Status: | new → assigned |
comment:2 Changed 4 years ago by kencu (Ken)
comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:4 Changed 4 years ago by kencu (Ken)
I'll work on this over time and see if I can get you updating again :>
comment:5 Changed 4 years ago by i0ntempest
qbittorrent is another port that needs C++17 stuff, you can try messing with it on Yosemite if you'd like.
comment:6 Changed 4 years ago by kencu (Ken)
with this mod:
configure.cppflags-append -D_LIBCPP_DISABLE_AVAILABILITY configure.ldflags-append -L/opt/local/libexec/llvm-11/lib/ -Wl,-rpath,/opt/local/libexec/llvm-11/lib/
and building with clang-11 on Mojave, we have success:
$ port -v installed mkvtoolnix The following ports are currently installed: mkvtoolnix @55.0.0_0+qtgui (active) platform='darwin 18' archs='x86_64' date='2021-03-12T18:01:49-0800'
$ otool -L /Applications/MacPorts/MKVToolNix.app/Contents/MacOS/MKVToolNix /Applications/MacPorts/MKVToolNix.app/Contents/MacOS/MKVToolNix: /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1575.17.0) /opt/local/lib/libmagic.1.dylib (compatibility version 2.0.0, current version 2.0.0) /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11) /opt/local/lib/libFLAC.8.dylib (compatibility version 12.0.0, current version 12.0.0) /opt/local/lib/libogg.0.dylib (compatibility version 9.0.0, current version 9.4.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1) /opt/local/lib/libpugixml.1.dylib (compatibility version 1.0.0, current version 1.10.0) /opt/local/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.5.0) /opt/local/lib/libiconv.2.dylib (compatibility version 9.0.0, current version 9.1.0) /opt/local/lib/libpcre2-8.0.dylib (compatibility version 11.0.0, current version 11.1.0) @rpath/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0) /opt/local/lib/libcmark.0.29.0.dylib (compatibility version 0.29.0, current version 0.29.0) /opt/local/libexec/qt5/lib/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.15.0, current version 5.15.2) /opt/local/libexec/qt5/lib/QtMultimedia.framework/Versions/5/QtMultimedia (compatibility version 5.15.0, current version 5.15.2) /opt/local/libexec/qt5/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.15.0, current version 5.15.2) /opt/local/libexec/qt5/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.15.0, current version 5.15.2) /opt/local/libexec/qt5/lib/QtConcurrent.framework/Versions/5/QtConcurrent (compatibility version 5.15.0, current version 5.15.2) /opt/local/libexec/qt5/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.15.0, current version 5.15.2) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
and it seems to work.
Note: See
TracTickets for help on using
tickets.
So this is not really an "error" so much as it is a request for some MacPorts magic to enable this functionality on 10.14 (and earlier?) where it doesn't exist.
Your best bet is to upgrade your OS to 10.15+. I'm not sure what hardware you're on, but there have been some recent software developments that allow quite a few older systems to run 10.15+ with modest tweaking. I have upgraded four systems to BigSur using that method so far. So Google that. If you have any questions you and email me.
To make software that wants to use the new filesystem features run on older os versions whose libc++ does not have these features may or may not be possible in the end. We are just exploring that now. A reasonably good place to start is to look at the libc++ installation I recently added to clang-11, and see how you might (or might not) be able to use that to allow this to build on < 10.15.
It would take some skills -- you have to override the
__config
file and force the libc++ from clang-11, and then there may or may not be ODR violations that are show-stoppers. But it will be explored.It might be best to start off this process with some simpler port, if we can spot one. mkvtoolnix is a bit of a mouthful for a first bite.