Closed comrade-meowski closed 2 years ago
Same issue. Linker fails due to the new coreutils throwing errors from non-existent asm constants in FFmpeg.
I checked the FFmpeg code but couldn't find any direct issues to blame. There were some recent commits in FFmpeg that affect the asm constants but the build fails even with older ffmpeg versions.
I think the issue is either with the new linker ~coreutils~ binutils ABI or somewhere in gcc ld config
/usr/bin/ld: /tmp/mpv.mQTCd2.ltrans34.ltrans.o: in function `rgb32tobgr24_mmxext.lto_priv.0':
/<<PKGBUILDDIR>>/mpv/build/../../ffmpeg_build/src/libswscale/x86/rgb2rgb_template.c:156: undefined reference to `mask24l'
/usr/bin/ld: /<<PKGBUILDDIR>>/mpv/build/../../ffmpeg_build/src/libswscale/x86/rgb2rgb_template.c:156: undefined reference to `mask24l'
Same issue. Linker fails due to the new coreutils throwing errors from non-existent asm constants in FFmpeg.
Is this issue unique to building ffmpeg via mpv-build? So far it sounds to me like an upstream ffmpeg build issue.
Same issue. Linker fails due to the new coreutils throwing errors from non-existent asm constants in FFmpeg.
Is this issue unique to building ffmpeg via mpv-build? So far it sounds to me like an upstream ffmpeg build issue.
It's unique to mpv-build. Upstream ffmpeg generic builds, debian builds are fine. Upstream mpv and debian shared library version(from debian official apt sources) of mpv also build fine. It's unique to this project.
It's unique to mpv-build. Upstream ffmpeg generic builds
Not sure I understand. I meant go to the ffmpeg source dir (it's inside the mpv-build dir, or just clone a new copy), and run:
git clean -xfd
./configure && make -j8
Does this ^ succeed? if it fails with a similar issue, then it's an upstream ffmpeg build issue.
The only remotely sensible error ld throws during the build is below. I thought -DPIC wasn't being applied and hence tried forcing -DPIC in ldconfig but found out that it was working fine. Couldn't figure it out as I am not fully familiar with mpv and FFmpeg build chains and intricacies of ld.
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
Waf: Leaving directory `/<<PKGBUILDDIR>>/mpv/build'
Just try what I asked you to try please, and report the result.
It's unique to mpv-build. Upstream ffmpeg generic builds
Not sure I understand. I meant go to the ffmpeg source dir (it's inside the mpv-build dir, or just clone a new copy), and run:
git clean -xfd ./configure && make -j8
Does this ^ succeed? if it fails with a similar issue, then it's an upstream ffmpeg build issue.
This ffmpeg builds fine. Just checked.
Thanks. Now, the configure command which mpv-build executes is a bit more explicit, could you please also try this at the ffmpeg source dir? This should be more similar or even identical to what mpv-build does:
git clean -xfd
./configure --enable-gnutls \
--enable-libdav1d \
--enable-libgme \
--enable-libgsm \
--enable-libmodplug \
--enable-libmp3lame \
--enable-libopus \
--enable-libpulse \
--enable-libsoxr \
--enable-libspeex \
--enable-libssh \
--enable-libvorbis \
--enable-libvpx \
--enable-ladspa \
--enable-libbs2b \
--enable-gpl --enable-libxvid --enable-libx264 \
--enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc
make -j8
Thanks. Now, the configure command which mpv-build executes is a bit more explicit, could you please also try this at the ffmpeg source dir? This should be more similar or even identical to what mpv-build does:
git clean -xfd ./configure --enable-gnutls \ --enable-libdav1d \ --enable-libgme \ --enable-libgsm \ --enable-libmodplug \ --enable-libmp3lame \ --enable-libopus \ --enable-libpulse \ --enable-libsoxr \ --enable-libspeex \ --enable-libssh \ --enable-libvorbis \ --enable-libvpx \ --enable-ladspa \ --enable-libbs2b \ --enable-gpl --enable-libxvid --enable-libx264 \ --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc make -j8
Builds fine and the ffmpeg command tools work fine as per the above config command. Yes, I am using ffmpeg git in the source dir
Thanks for the info.
@kevmitch @wsldankers any idea?
The same code completely unchanged builds fine in 20.10 and 20.04. It fails in 21.04
21.04 version log https://launchpadlibrarian.net/538920549/buildlog_ubuntu-hirsute-amd64.mpv_0.33.1-121-gf665149fc8-1ubuntu1~21.04~ppa19_BUILDING.txt.gz https://launchpad.net/~visred/+archive/ubuntu/rel-ppa/+sourcepub/12433782/+listing-archive-extra
20.10 version https://launchpadlibrarian.net/534161350/buildlog_ubuntu-groovy-amd64.mpv_0.33.1-1-gfa7afc3e19-1ubuntu1~20.10~ppa4_BUILDING.txt.gz https://launchpad.net/~visred/+archive/ubuntu/rel-ppa/+sourcepub/12307458/+listing-archive-extra
Edit: If this issue is showing up in 21.04, it will likely also show up in sid and experimental versions of debian (I haven't tested it). Anyone facing issues there?
Edit: Are the Linker Changes between 20.10 and 21.04 at fault? 21.04 uses binutils 2.36.1 while 20.10 and debian-sid are still at 2.35.1
I see the linker errors, but I have no idea what causes it. It does not seem to be caused by the packaging itself.
I have the same problem :( Is there a way to solve this?
Ok so at this point it seems pretty clear that the root cause of this is the linker: binutils 2.35 (works) vs binutils 2.36 (does not).
That makes it someone else's problem I guess - does the team here have a process for reporting upstream?
does the team here have a process for reporting upstream?
No, but if you do report (some) upstream, you're much more likely to get a useful response if you report the simplest test case you can up with.
Hint - such simple test case is quite unlikely to include mpv-build or even mpv on its own.
Since the upgrade from 20.10 I haven't been able to puzzle through whatever is preventing dpkg-buildpackage cleanly generating a .deb package from mpv-build. The actual ./rebuild compilation works fine so it is just a packaging script issue but I'm afraid I can't find it.
Ubuntu 21.04 amd64 host, clean build roots, no extra use flags gcc-10 and gcc-11 toolchains both produce the same error Ubuntu 20.10 and below can ./rebuild and successfully dpkg-buildpackage a .deb file from the same process Switching the github branches of mpv/ffmpeg/libass doesn't make a difference
A successful ./rebuild -j10 log: https://paste.ubuntu.com/p/8GjzfwPR46
A failed subsequent dpkg-buildpackage -us -uc -b -j10 log: https://paste.ubuntu.com/p/Y628SsHgFB/