mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.45k stars 2.91k forks source link

mpv 0.32 build fails #7404

Closed TCH68k closed 4 years ago

TCH68k commented 4 years ago

mpv version and platform versions

Devuan 2 AMD64 MPV 0.32 FFMPEG 4.1 GCC 7.3.0

Reproduction steps

wget https://github.com/mpv-player/mpv/archive/v0.32.0.tar.gz tar -xzvf v0.32.0.tar.gz cd mpv-0.32.0/ ./bootstrap.py ./waf configure --disable-pulse ./waf

Expected behavior

Build.

Actual behavior

Fails.

Log file

mpv_build.log

sfan5 commented 4 years ago

Upload build/config.log too.

CounterPillow commented 4 years ago

Builds fine with ffmpeg 4.1 for me.

TCH68k commented 4 years ago

config.log

TCH68k commented 4 years ago

I have updated FFMPEG to the latest 4.2.2. No change. I have tried to compile earlier MPV releases down to 0.28.2 (which is not FFMPEG4 dependent), all of them failed. Can it be a GCC issue? I use GCC 7.3.0.

I've done another test compiling, this time with the verbose flag. All the build flags mentioned in the last failed command are working otherwise.

mpv_build_verbose.log

ghost commented 4 years ago

That's a linker error. Maybe something is wrong with the ffmpeg build or installation.

CounterPillow commented 4 years ago

out: -I/usr/local/include -L/usr/local/lib

Seems like you have a random FFmpeg in /usr/local/lib, is this intentional?

TCH68k commented 4 years ago

@wm4 What could it be? FFMPEG itself is working.

@CounterPillow Not random. Devuan 2 is Debian 9 which ships FFMPEG 3.2.14, so i compiled FFMPEG 4.2.2, that is in /usr/local/lib. FFMPEG 3.2.14 is not installed.

CounterPillow commented 4 years ago

if your ffmpeg library isn't exporting those symbols then it's a broken build. We don't know how you compiled ffmpeg, so you're the one who has to figure this out.

TCH68k commented 4 years ago

My current MPV installation (which was built earlier) works with it.

I compiled FFMPEG with these options: ./configure --enable-gpl --disable-debug --disable-doc --enable-gnutls --enable-nonfree --disable-libfontconfig --disable-filter='ass,drawtext,coreimage,coreimagesrc' --disable-avdevice --enable-static --disable-shared --enable-libass --enable-opengl

CounterPillow commented 4 years ago

My current MPV installation (which was built earlier) works with it.

but also

I have tried to compile earlier MPV releases down to 0.28.2 (which is not FFMPEG4 dependent), all of them failed.

so your currently compiled mpv version is <= 0.28.2 but builds against ffmpeg 4.2.2?

TCH68k commented 4 years ago

No. Earlier i built FFMPEG 4.1 and MPV 0.29.1 and it worked. It still worked yesterday, when i tried to build MPV 0.32.0 and that failed. Then i updated FFMPEG to 4.2.2. The build still fails, but the already built MPV is still working. So, something else is broken in my system, than FFMPEG.

CounterPillow commented 4 years ago

You made a static ffmpeg build. The mpv you compiled does not load any objects from that ffmpeg directory. Your current mpv is not influenced by what's in that directory at all.

TCH68k commented 4 years ago

Then why did the former build work? I did exactly the same as then.

CounterPillow commented 4 years ago

Because you didn't do exactly the same as then, probably changed something in your toolchain or other jenga tower of local builds, and now things no longer work as expected.

If you find an actual problem in mpv or its build system feel free to report it, but I am afraid we are not veteran enough sysadmins to debug your Devuan system for you.

Personally I'd start with objdump -t libavcodec.a and grep for the symbols. The ones that the linker fails to resolve appear to be fairly important ones so I think something is seriously screwed up.

TCH68k commented 4 years ago

You seem to be right about the missing symbols: objdump -t /usr/local/lib/libavcodec.a | grep mp_image_to_av_frame gives back nothing. Can you tell me please what is wrong with my FFMPEG configuration line?

CounterPillow commented 4 years ago

I don't see anything wrong with your configure line so I'm fairly sure the problem is something stateful that you'd best rectify by getting rid of your ffmpeg build and source tree and trying from scratch. First I'd check that /usr/local/lib/libavcodec.a is actually what you just compiled, and not something from another time. You can do this easily by removing it first.

Also what you're grepping for is an mpv symbol. Grep for the actual libavcodec symbol.

TCH68k commented 4 years ago

Yes, i have already checked that, /usr/local/lib/libavcodec.a is from the package i built today. However i already deleted that package and my former MPV build still works without any FFMPEG installed in the system. Now, i have "libavcodec57" installed, but that is from FFMPEG 3.2.14 and MPV 0.29 depends on FFMPEG 4, isn't it?

CounterPillow commented 4 years ago

and my former MPV build still works without any FFMPEG installed in the system.

please actually read my comments and you'll understand why.

TCH68k commented 4 years ago

Whoops, sorry, i am half asleep already. I think i'll continue tomorrow. Thanks for the help.

TCH68k commented 4 years ago

Okay, rebuilt FFMPEG 4.2.2 again. /usr/local/lib/libavcodec.a is there again. I've grepped for 'avcodec_receive_frame' this time: objdump -t /usr/local/lib/libavcodec.a | grep "avcodec_receive_frame"

0000000000001540 g     F .text  0000000000000325 avcodec_receive_frame
0000000000000000         *UND*  0000000000000000 avcodec_receive_frame
TCH68k commented 4 years ago

Okay, i've eradicated all libavxxx and all related libraries from my system and then i've recompiled FFMPEG 4.2.2 as dynamic. Then i discovered that there are some leftover libavxxx shared objects in /usr/local/lib which were installed earlier under Debian Jessie but then were simply superseded on Devuan ASCII, but somewhy were not deleted. Now that those were removed and FFMPEG 4 is recompiled as dynamic, MPV 0.32.0 compiles without any problem.

Thanks for the help again.