Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerging mpv fails[solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1584

PostPosted: Tue Dec 31, 2024 5:02 pm    Post subject: emerging mpv fails[solved] Reply with quote

this is afreshly installed gentoo, ffmpeg is already emerged but it seems it's not being detected during compiling ffmpeg

error:
Code:
Dependency libavcodec found: NO. Unknown version, but need: ['>= 60.31.102']
Found CMake: /usr/bin/cmake (3.31.3)
Run-time dependency libavcodec found: NO (tried cmake)


use flags:
Code:
[ebuild   R    ] media-video/ffmpeg-6.1.2:0/58.60.60::gentoo  USE="encode gpl (pic) threads -X -alsa (-amf) -amr -amrenc (-appkit) -bluray -bs2b -bzip2 -cdio -chromaprint -chromium -codec2 -cpudetection (-cuda) -dav1d -debug -doc -fdk -flite -fontconfig -frei0r -fribidi -gcrypt -glslang -gme -gmp -gnutls -gsm -hardcoded-tables -iconv -iec61883 -ieee1394 -jack -jpeg2k -jpegxl -kvazaar -ladspa -lcms -libaom -libaribb24 -libass -libcaca -libdrm -libilbc -libplacebo -librtmp -libsoxr -libtesseract -libv4l -libxml2 -lv2 -lzma (-mipsdspr1) (-mipsdspr2) (-mipsfpu) -modplug -mp3 -network (-nvenc) -openal -opencl -opengl -openh264 -openssl -opus -oss -postproc -pulseaudio (-qsv) (-rav1e) -rubberband -samba -sdl -shaderc -snappy -sndio -soc -speex -srt -ssh -static-libs -svg -svt-av1 -test -theora -truetype -twolame -v4l -vaapi -vdpau -verify-sig -vidstab (-vmaf) -vorbis -vpx -vulkan -webp -x264 -x265 -xvid -zeromq -zimg -zlib -zvbi" CPU_FLAGS_X86="aes mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 -3dnow -3dnowext -avx -avx2 -fma3 -fma4 -xop" FFTOOLS="-aviocat -cws2fws -ffescape -ffeval -ffhash -fourcc2pixfmt -graph2dot -ismindex -pktdumper -qt-faststart -sidxindex -trasher" 0 KiB
[ebuild  N     ] media-video/mpv-0.39.0:0/2::gentoo  USE="alsa cli -X (-aqua) -archive -bluray -cdda (-coreaudio) -debug -drm -dvb -dvd -egl -gamepad -iconv -jack -javascript -jpeg -lcms -libcaca -libmpv -lua (-nvenc) -openal -opengl -pipewire -pulseaudio -rubberband -sdl (-selinux) -sixel -sndio -soc -test -tools -uchardet -vaapi -vdpau -vulkan -wayland -xv -zimg -zlib" LUA_SINGLE_TARGET="(luajit) (-lua5-1)" PYTHON_SINGLE_TARGET="python3_12 -python3_10 -python3_11 -python3_13" 0 KiB



build log:
https://bpa.st/C56Q


Last edited by Adel Ahmed on Fri Jan 03, 2025 2:32 pm; edited 2 times in total
Back to top
View user's profile Send private message
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 428

PostPosted: Tue Dec 31, 2024 8:35 pm    Post subject: Reply with quote

What is the output of qlist ffmpeg | grep libavcodec?
Your emerge output is missing the [code] tag.
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1584

PostPosted: Wed Jan 01, 2025 7:39 am    Post subject: Reply with quote

I've corrected the missing code tag, thanks
Code:
root@cherry $ qlist ffmpeg | grep libavcodec
/usr/include/libavcodec/xvmc.h
/usr/include/libavcodec/vorbis_parser.h
/usr/include/libavcodec/videotoolbox.h
/usr/include/libavcodec/version_major.h
/usr/include/libavcodec/version.h
/usr/include/libavcodec/vdpau.h
/usr/include/libavcodec/qsv.h
/usr/include/libavcodec/packet.h
/usr/include/libavcodec/mediacodec.h
/usr/include/libavcodec/jni.h
/usr/include/libavcodec/dxva2.h
/usr/include/libavcodec/dv_profile.h
/usr/include/libavcodec/dirac.h
/usr/include/libavcodec/defs.h
/usr/include/libavcodec/d3d11va.h
/usr/include/libavcodec/codec_par.h
/usr/include/libavcodec/codec_id.h
/usr/include/libavcodec/codec_desc.h
/usr/include/libavcodec/codec.h
/usr/include/libavcodec/bsf.h
/usr/include/libavcodec/avfft.h
/usr/include/libavcodec/avdct.h
/usr/include/libavcodec/avcodec.h
/usr/include/libavcodec/adts_parser.h
/usr/include/libavcodec/ac3_parser.h
/usr/share/man/man3/libavcodec.3.bz2
/usr/lib/pkgconfig/libavcodec.pc
/usr/lib/libavcodec.so
/usr/lib/libavcodec.so.
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1818
Location: Germany

PostPosted: Wed Jan 01, 2025 8:38 am    Post subject: Reply with quote

libavcodec is provided by ffmpeg itself? https://www.portagefilelist.de/index.php?ps=libavcodec*&p=package&id=c352ee532651af9e1a07aaeb7a3be5de#panchor


Code:
mirage ~ # qlist ffmpeg | grep libavcodec
/usr/include/libavcodec/xvmc.h
/usr/include/libavcodec/vorbis_parser.h
/usr/include/libavcodec/videotoolbox.h
/usr/include/libavcodec/version_major.h
/usr/include/libavcodec/version.h
/usr/include/libavcodec/vdpau.h
/usr/include/libavcodec/qsv.h
/usr/include/libavcodec/packet.h
/usr/include/libavcodec/mediacodec.h
/usr/include/libavcodec/jni.h
/usr/include/libavcodec/dxva2.h
/usr/include/libavcodec/dv_profile.h
/usr/include/libavcodec/dirac.h
/usr/include/libavcodec/defs.h
/usr/include/libavcodec/d3d11va.h
/usr/include/libavcodec/codec_par.h
/usr/include/libavcodec/codec_id.h
/usr/include/libavcodec/codec_desc.h
/usr/include/libavcodec/codec.h
/usr/include/libavcodec/bsf.h
/usr/include/libavcodec/avfft.h
/usr/include/libavcodec/avdct.h
/usr/include/libavcodec/avcodec.h
/usr/include/libavcodec/adts_parser.h
/usr/include/libavcodec/ac3_parser.h
/usr/share/man/man3/libavcodec.3.bz2
/usr/lib64/pkgconfig/libavcodec.pc
/usr/lib64/libavcodec.so
/usr/lib64/libavcodec.so.60
/usr/lib64/libavcodec.so.60.31.102

_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 428

PostPosted: Wed Jan 01, 2025 8:47 am    Post subject: Reply with quote

Adel Ahmed wrote:
qlist ffmpeg | grep libavcodec:
...
/usr/lib/libavcodec.so
/usr/lib/libavcodec.so.


I'll assume that libavcodec.so.60 was not properly pasted, rather than the file actually ending in a dot.
Banana and I both have libavcodec.so in /usr/lib64, but you have it in /usr/lib. That seems to be because of ABI_X86=32, which should be fine.

Are the contents of the /usr/lib/pkgconfig/libavcodec.pc correct?
I'm asking because of this part of the log

Code:
Dependency lookup for libavcodec with method 'pkgconfig' failed: Unknown version, but need ['>= 60.31.102']
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1584

PostPosted: Wed Jan 01, 2025 9:08 am    Post subject: Reply with quote

no it literally ends in a dot, and i do not think the content of libavcodec is correct:
Code:
root@cherry $ ls -l /usr/lib/libavcodec.so*
lrwxrwxrwx 1 root root       14 Dec 31 15:14 /usr/lib/libavcodec.so -> libavcodec.so.
-rwxr-xr-x 1 root root 10591796 Dec 31 15:16 /usr/lib/libavcodec.so.
root@cherry $ cat /usr/lib/pkgconfig/libavcodec.pc
root@cherry $


how do I correct this?
Back to top
View user's profile Send private message
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 428

PostPosted: Wed Jan 01, 2025 9:14 am    Post subject: Reply with quote

Rebuild ffmpeg. You're on a i686 system with ABI_X86=32. It seems like binhosts do not serve that.

For the record, the pkgconfig file should look sometihng like this:
/usr/lib64/pkgconfig/libavcodec.pc:
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=/usr/include

Name: libavcodec
Description: FFmpeg codec library
Version: 60.31.102
Requires:
Requires.private: libswresample >= 4.12.100, libavutil >= 58.29.100
Conflicts:
Libs: -L${libdir}  -lavcodec
Libs.private: -pthread -lm -latomic -ldav1d -lz
Cflags: -I${includedir}
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1584

PostPosted: Wed Jan 01, 2025 11:44 am    Post subject: Reply with quote

I have re emerged m that seems to ave fixed the blank libavcodec.pc:
Code:
root@cherry $ cat /usr/lib/pkgconfig/libavcodec.pc
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib
includedir=/usr/include

Name: libavcodec
Description: FFmpeg codec library
Version:
Requires:
Requires.private: libswresample >= , libavutil >=
Conflicts:
Libs: -L${libdir}  -lavcodec
Libs.private: -pthread -lm -latomic
Cflags: -I${includedir}

but not the incorrectly named file:
Code:
root@cherry $ qlist ffmpeg | grep libavcodec
/usr/include/libavcodec/xvmc.h
/usr/include/libavcodec/vorbis_parser.h
/usr/include/libavcodec/videotoolbox.h
/usr/include/libavcodec/version_major.h
/usr/include/libavcodec/version.h
/usr/include/libavcodec/vdpau.h
/usr/include/libavcodec/qsv.h
/usr/include/libavcodec/packet.h
/usr/include/libavcodec/mediacodec.h
/usr/include/libavcodec/jni.h
/usr/include/libavcodec/dxva2.h
/usr/include/libavcodec/dv_profile.h
/usr/include/libavcodec/dirac.h
/usr/include/libavcodec/defs.h
/usr/include/libavcodec/d3d11va.h
/usr/include/libavcodec/codec_par.h
/usr/include/libavcodec/codec_id.h
/usr/include/libavcodec/codec_desc.h
/usr/include/libavcodec/codec.h
/usr/include/libavcodec/bsf.h
/usr/include/libavcodec/avfft.h
/usr/include/libavcodec/avdct.h
/usr/include/libavcodec/avcodec.h
/usr/include/libavcodec/adts_parser.h
/usr/include/libavcodec/ac3_parser.h
/usr/share/man/man3/libavcodec.3.bz2
/usr/lib/pkgconfig/libavcodec.pc
/usr/lib/libavcodec.so
/usr/lib/libavcodec.so.
root@cherry $



emerging mpv is still failing though, how can i fix the libavcodec.so?
Back to top
View user's profile Send private message
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 428

PostPosted: Wed Jan 01, 2025 12:10 pm    Post subject: Reply with quote

That's still an incomplete pkgconfig file. It is lacking all version information, just like your shared object.
At this point, we can be sure that something is causing ffmpeg to be miscompiled.
Put FEATURES=keeptemp in your make.conf and post:
  • emerge --info ffmpeg
  • the build.log of ffmpeg

Keep in mind that keeptemp will not delete /var/tmp/portage/category/package/temp/, so remember to clean up later.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2552

PostPosted: Wed Jan 01, 2025 1:47 pm    Post subject: Reply with quote

Something fancy in your make.conf, like that -redistributable the other day?

Where's your emerge --info? You should start with that from now on.

Best Regards,
Georgi
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 2066

PostPosted: Wed Jan 01, 2025 2:08 pm    Post subject: Reply with quote

The assertions at the top of the build.log are weird and imply maybe using python 3.13's (buggy) JIT or maybe GIL-less/free-threaded Python. Don't do that yet.
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1584

PostPosted: Wed Jan 01, 2025 5:08 pm    Post subject: Reply with quote

info:
https://bpa.st/FNWA

build log:
https://bpa.st/GEXQ

I'm using python 3.12:
Code:
[ebuild   R    ] dev-lang/python-3.12.8:3.12::gentoo  USE="ensurepip ncurses readline sqlite ssl -bluetooth -build -debug -examples -gdbm -libedit -pgo -test -tk -valgrind -verify-sig" 20021 KiB


not seeing a JIT flag so I assume I am not using it

my something fancy in make.conf is that I disable all use flags by default
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1818
Location: Germany

PostPosted: Wed Jan 01, 2025 6:38 pm    Post subject: Reply with quote

As _sam already said, info and log tells: python python3.13 is used. This does not match your emerge python output...
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2552

PostPosted: Wed Jan 01, 2025 6:57 pm    Post subject: Reply with quote

Adel Ahmed wrote:

my something fancy in make.conf is that I disable all use flags by default


Yes, this is fancy but if it has any relationship to the issue at hand, I can't see it.

Rather:

1) do you have some user (for root and your regular user) python configuration?
2) how do you elevate to root? Su, sudo, doas(the specific command), direct login to root?
3) what's your env output?

Best Regards,
Georgi


Last edited by logrusx on Wed Jan 01, 2025 7:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 2066

PostPosted: Wed Jan 01, 2025 7:05 pm    Post subject: Reply with quote

Note that USE=-* is considered outside of the realms of support. If you must do it, you should state it up-front and be prepared to investigate issues yourself. Please don't waste people's time without mentioning this immediately. (BTW, "freshly installed Gentoo" normally implies "it's pretty vanilla").

Using Python 3.13 is OK (it looks here like it's being used for python-any-r1 and you don't have -r100 installed), but the warnings/errors in your log look worrying and something we should try get to the bottom of. So, the fact that 3.13 is appearing is OK, but the warnings/errors there really aren't okay and must be investigated.

We still need the log from building ffmpeg and also, in all likelihood, you to prod a bit to see how it ends up installing a broken pkgconfig file.
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1584

PostPosted: Thu Jan 02, 2025 5:23 am    Post subject: Reply with quote

I'm prodding around but not finding anything so far

not sure where python 3.13 is coming from, this is what I have in my make.conf:
Code:
PYTHON_TARGETS=python3_12
PYTHON_SINGLE_TARGET=python3_12


Code:
root@cherry $ eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.12
  [2]   python3.13 (fallback)


so definitely looking into this
I directly login to root, no other users on this system, no user python config
env:
Code:
root@cherry $ env
LESSOPEN=|lesspipe %s
USER=root
SSH_CLIENT=192.168.1.9 55354 22
CONFIG_PROTECT=/usr/share/gnupg/qualified.txt
HOME=/root
LESS=-R -M --shift 5
LEX=flex
SSH_TTY=/dev/pts/1
SSH_PUBKEYINFO=adel@t14
PAGER=/usr/bin/less
CONFIG_PROTECT_MASK=/etc/sandbox.d /etc/fonts/fonts.conf /etc/gentoo-release /etc/ca-certificates.conf /etc/revdep-rebuild
INFOPATH=/usr/share/gcc-data/i686-pc-linux-musl/14/info:/usr/share/binutils-data/i686-pc-linux-musl/2.43/info:/usr/share/autoconf-2.72/info:/usr/share/automake-1.16.5/info:/usr/share/info
LOGNAME=root
TERMINFO_DIRS=/usr/share/st/terminfo
TERM=xterm
HISTCONTROL=ignoreboth:erasedups
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin
LANG=C.UTF8
GCC_SPECS=
SHELL=/bin/sh
PWD=/root
SSH_CONNECTION=192.168.1.9 55354 192.168.1.4 22
MANPATH=/usr/share/gcc-data/i686-pc-linux-musl/14/man:/usr/share/binutils-data/i686-pc-linux-musl/2.43/man:/usr/local/share/man:/usr/share/man
EDITOR=/bin/nano


I'm working on getting the ffmpeg built log now
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2552

PostPosted: Thu Jan 02, 2025 6:00 am    Post subject: Reply with quote

Code:
which python

?
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1584

PostPosted: Thu Jan 02, 2025 7:58 am    Post subject: Reply with quote

Code:
root@cherry $ which python
/usr/bin/python
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1584

PostPosted: Thu Jan 02, 2025 8:23 am    Post subject: Reply with quote

ffmpeg build log:
Code:
https://p.defau.lt/?wBic_6ISwKGkMjnuAADutQ
Back to top
View user's profile Send private message
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 428

PostPosted: Thu Jan 02, 2025 9:47 am    Post subject: Reply with quote

Is this where the saying "if it breaks, keep the pieces" applies?
/bin/sh is not bash. It's the busybox shell. ffmpeg's libversion.sh is failing to find some applet.

I couldn't resist and installed busybox myself, with the default config.
libversion.sh works just fine.

libversion.sh is a tiny script, that relies on 3 utilities and is written without bashisms. It only needs:
  • awk
  • echo
  • eval
The funny thing is, busybox comes with its own implementation of all of those, but the GNU stuff is also in @system.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2552

PostPosted: Thu Jan 02, 2025 9:51 am    Post subject: Reply with quote

@bstaletic I didn't understand what you mean

@Adel Ahmed:

Code:
grep -r PYTHON /etc/portage/ ~

Code:
python --version

Code:
ls -l `which python`


Also, what other non-standard or unusual options have you opted for?

p.s. the proper link is https://p.defau.lt/?wBic_6ISwKGkMjnuAADutQ for whoever wants to just click.

Best Regards,
Georgi
Back to top
View user's profile Send private message
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 428

PostPosted: Thu Jan 02, 2025 10:02 am    Post subject: Reply with quote

@logrusx

From the build log:
Code:
/var/tmp/portage/media-video/ffmpeg-6.1.2/work/ffmpeg-6.1.2/ffbuild/libversion.sh swresample /var/tmp/portage/media-video/ffmpeg-6.1.2/work/ffmpeg-6.1.2/libswresample/version.h /var/tmp/portage/media-video/ffmpeg-6.1.2/work/ffmpeg-6.1.2/libswresample/version_major.h > libswresample/libswresample.version
/var/tmp/portage/media-video/ffmpeg-6.1.2/work/ffmpeg-6.1.2/ffbuild/libversion.sh swscale /var/tmp/portage/media-video/ffmpeg-6.1.2/work/ffmpeg-6.1.2/libswscale/version.h /var/tmp/portage/media-video/ffmpeg-6.1.2/work/ffmpeg-6.1.2/libswscale/version_major.h > libswscale/libswscale.version
ash: applet not found


That error is repeated for other ffmpeg libraries.
The ffmpeg's libversion.sh can be seen here: https://github.com/FFmpeg/FFmpeg/blob/master/ffbuild/libversion.sh

That ash: applet not found suggests two things:

  • /bin/sh is a symlink to /bin/ash, which is a symlink to /bin/busybox
  • Either echo or awk is not found on the system at all.


Speculation ahead: Considering the number of "applet not found" errors, my money is on awk not being present. Not as a stand-alone program, nor as a busybox applet.


Last edited by bstaletic on Thu Jan 02, 2025 10:04 am; edited 1 time in total
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2552

PostPosted: Thu Jan 02, 2025 10:04 am    Post subject: Reply with quote

@Adel Ahmed, now that @bstaletic mentions busybox, is this some kind of a multimedia system intended to be used as a multimedia player/TV/entertainment system?

Also you didn't answer how you get root privilege.

Best Regards,
Georgi


Last edited by logrusx on Thu Jan 02, 2025 5:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3819
Location: Rasi, Finland

PostPosted: Thu Jan 02, 2025 10:31 am    Post subject: Reply with quote

bstaletic wrote:
awk not being present. Not as a stand-alone program, nor as a busybox applet.
For that OP needs to have USE="savedconfig" for sys-apps/busybox then deliberately edit the configuration to remove awk.
And finally have a custom/modified @system set or maybe package.mask.
However if busybox isn't present, then it's just the above.

Without awk many, many things will be broken. If I'm not wrong awk has been a standard part of even POSIX for quite some time by now.

@Adel Ahmed, it would greatly help us if you could list every package.mask and possible @system set edits, if you have done so.
_________________
..: Zucca :..

My gentoo installs:
init=/sbin/openrc-init
-systemd -logind -elogind seatd

Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1584

PostPosted: Fri Jan 03, 2025 2:32 pm    Post subject: Reply with quote

Amazing guess Zucca, I did that for ash not awk.
to fix it I added this line:
Code:
CONFIG_ASH=y

and compilation worked like a charn, thanks everyone
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum