[MacPorts] #63694: mpv: fatal error encountered while reading from module 'Foundation'
MacPorts
noreply at macports.org
Mon Nov 15 17:26:34 UTC 2021
#63694: mpv: fatal error encountered while reading from module 'Foundation'
---------------------------+------------------------
Reporter: ShadSterling | Owner: i0ntempest
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.7.1
Resolution: | Keywords:
Port: mpv |
---------------------------+------------------------
Comment (by Gandoon):
Ok, I have had another go at this… aiming to build the following macports
configuration:
{{{
port -v install mpv +audiocd +bluray +bundle +caca +dvd +jack +libarchive
+libmpv +network +opengl +osd +pulseaudio +python39 +rubberband
+screenshot +uchardet +x11
}}}
I still get the error as mentioned before. Since the issue seem to stem
from the build phase, but also being influenced by the configure phase, I
just manually reran the `python waf configure` step with the same options
as the Portfile issued, but adding the LDFLAGS as I mentioned in my
previous comment to make it complete without complaining.
{{{
/usr/lib/swift]€ LDFLAGS='-L/usr/lib -L/opt/local/lib
-Wl,-headerpad_max_install_names
-Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk
-arch x86_64' python ./waf configure --prefix=/opt/local --enable-manpage-
build --enable-coreaudio --enable-cocoa --enable-cplugins --enable-zlib
--enable-swift --disable-html-build --disable-cuda-hwaccel --disable-
opensles --disable-egl-drm --disable-egl-angle-lib --disable-egl-angle-
win32 --disable-audiounit --disable-ios-gl --disable-direct3d --disable-
android --disable-rpi --disable-dvbin --enable-caca --enable-cdda
--disable-clang-database --disable-debug-build --enable-dvdnav --disable-
egl-x11 --enable-gl --enable-gl-cocoa --enable-gl-x11 --enable-jack
--disable-javascript --enable-jpeg --enable-libarchive --disable-openal
--disable-pdf-build --enable-pulse --enable-rubberband --disable-test
--disable-tv --enable-uchardet --disable-vapoursynth --enable-
videotoolbox-gl --enable-x11 --enable-xv --enable-lua --lua=52fbsd
--enable-libmpv-shared
}}}
After this, I manually built the project using the same command MacPorts
use: `/opt/local/bin/python3.9 ./waf build -v --verbose`. Now the build
phase completed just fine (well, lua52 failed to build in, but that can be
fixed). and finally I reran the macports install command again. Since now
the build phase was done, the port installed, ''BUT'' we get some further
hints as to what ''may'' be at the core of the problem here, as it reaches
the final stage, scanning for linking errors.
{{{
---> Scanning binaries for linking errors
Could not open /usr/lib/swift/libswiftUniformTypeIdentifiers.dylib: Error
opening or reading file (referenced from
/Applications/MacPorts/mpv.app/Contents/MacOS/mpv)
---> Found 3 broken files, matching files to ports
---> Found 1 broken port, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: mpv
@0.34.0+audiocd+bluray+bundle+caca+dvd+jack+libarchive+libmpv+network+opengl+osd+pulseaudio+python39+rubberband+screenshot+uchardet+x11
}}}
That ''/usr/lib/swift/libswiftUniformTypeIdentifiers.dylib'' just does not
exist on my system…\\
So, I did try again: `macports -v clean --all` and then a new install with
the same command as before, but with `-bundle` instead of `+bundle`.\\
Sadly, this did not work either, it fails at the same point.
However, yet another hint may be present at the first error encountered in
the build stage (sorry for the formatting, not quite sure how to best
format a diff here):
||=**MacPorts build**=||=**manual build in MacPorts build folder**=||
||[ 25/457] Compiling DOCS/man/mpv.rst||[ 25/457] Compiling
DOCS/man/mpv.rst ||
||17:32:00 runner ' /opt/local/bin/rst2man-3.9.py --strip-elements-with-
class=contents ../DOCS/man/mpv.rst DOCS/man/mpv.1 ' ||16:52:53 runner '
/opt/local/bin/rst2man-3.9.py --strip-elements-with-class=contents
../DOCS/man/mpv.rst DOCS/man/mpv.1 ' ||
||/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/libxml2/libxml/module.modulemap:1:8:
**error:** redefinition of module 'libxml2'
||/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_multimedia_mpv/mpv/work
/mpv-player-mpv-79b4060/osdep/macos/libmpv_helper.swift:153:20:
**warning:** 'CGLFlushDrawable' was deprecated in macOS 10.14: OpenGL API
deprecated. (Define GL_SILENCE_DEPRECATION to silence these warnings) ||
||module libxml2 [system] [extern_c] { ||if !skip { CGLFlushDrawable(ctx)
} ||
To conclude, there may be several weird issues here, but the missing swift
libswiftUniformTypeIdentifiers.dylib may be one of the most prominent
ones.
As it does compile from a git clone, and the MacPorts build directory
content does build functioning binaries, and neither method generates a
working .app bundle, I dare to say that I may be on to something here.
I am not quite sure where to go from here with regards to MacPorts, but
please feel free to suggest something. I have let you all know what I
found at least.
--
Ticket URL: <https://trac.macports.org/ticket/63694#comment:32>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list