Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
media-video/ffmpeg failed [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
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Thu Oct 18, 2018 8:31 pm    Post subject: media-video/ffmpeg failed [solved] Reply with quote

Code:
These are the packages that would be merged:

Calculating dependencies... done!
[ebuild   R    ] media-video/ffmpeg-3.3.6:0/55.57.57::gentoo  USE="alsa bzip2 encode gpl hardcoded-tables iconv network opengl openssl postproc threads vaapi xcb zlib -X (-altivec) -amr -amrenc -bluray -bs2b -cdio (-celt) -chromaprint -chromium -cpudetection -debug -doc -fdk -flite -fontconfig -frei0r -fribidi -gcrypt -gme -gmp -gnutls -gsm -iec61883 -ieee1394 -jack -jpeg2k -kvazaar -ladspa -libass -libcaca -libilbc -librtmp -libsoxr -libv4l -lzma (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -modplug -mp3 -nvenc -openal -openh264 -opus -oss -pic -pulseaudio -rubberband -samba -schroedinger -sdl -snappy -sofalizer -speex -ssh -static-libs -test -theora -truetype -twolame -v4l -vdpau -vorbis -vpx -wavpack -webp* -x264 -x265 -xvid -zeromq -zimg -zvbi" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3 -3dnow -3dnowext -aes -avx -avx2 -fma3 -fma4 -sse4_1 -sse4_2 -xop" FFTOOLS="-aviocat -cws2fws -ffescape -ffeval -ffhash -fourcc2pixfmt -graph2dot -ismindex -pktdumper -qt-faststart -sidxindex -trasher" 0 KiB

Code:
Creating configuration files ...

WARNING: Option --disable-outdev=sdl did not match anything
 * abi_x86_32.x86: running multilib-minimal_abi_src_compile
In file included from src/libpostproc/postprocess.c:549:0:
src/libpostproc/postprocess_template.c: In function 'dering_SSE2':
src/libpostproc/postprocess_template.c:1097:5: error: 'asm' operand has impossible constraints
     __asm__ volatile(
     ^~~~~~~
make: *** [/var/tmp/portage/media-video/ffmpeg-3.3.6/work/ffmpeg-3.3.6/common.mak:60: libpostproc/postprocess.o] Error 1
 * ERROR: media-video/ffmpeg-3.3.6::gentoo failed (compile phase):
 *   emake failed


Last edited by josephg on Thu Oct 18, 2018 11:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
log_null
n00b
n00b


Joined: 28 Nov 2011
Posts: 15

PostPosted: Thu Oct 18, 2018 9:08 pm    Post subject: Reply with quote

You probably have a problem with libposproc and CPU_CFLAGS:

Code:

src/libpostproc/postprocess_template.c:1097:5: error: 'asm' operand has impossible constraints
     __asm__ volatile(
     ^~~~~~~


Is an unconfirmed bug

However, HeXiLeD presented a workaround : https://forums.gentoo.org/viewtopic-t-1079186-start-0.html

Also, you can double check if your flags are right.
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Thu Oct 18, 2018 9:58 pm    Post subject: Reply with quote

log_null wrote:
You probably have a problem with libposproc and CPU_CFLAGS

i don't have libpostproc installed. so i tried
Code:
$ sudo emerge -1 libpostproc
[ebuild  N    ] media-libs/libpostproc-10.20140517-r1  USE="(-altivec) -pic -static-libs" CPU_FLAGS_X86="mmx mmxext -3dnow"
[ebuild  N    ]  media-video/libav-12.3  USE="alsa bzip2 custom-cflags encode gpl hardcoded-tables network ssl threads vaapi zlib -X -aac (-altivec) -amr (-armv5te) (-armv6) (-armv6t2) (-armvfp) -bs2b -cdio -cpudetection -debug -doc -faac -fdk -fontconfig -frei0r -gsm -ieee1394 -jack -jpeg2k -libressl -mp3 (-neon) (-nvidia) -openssl -opus -oss -pic -pulseaudio -rtmp -schroedinger -sdl -speex -static-libs -test -theora -tools -truetype -twolame -v4l -vdpau -vorbis -vpx -wavpack -webp -x264 -x265 -xvid" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3 -3dnow -3dnowext -avx -avx2 -fma3 -fma4 -sse4_1 -sse4_2 -xop"
[blocks B     ] media-libs/libpostproc ("media-libs/libpostproc" is blocking media-video/ffmpeg-3.3.6)
[blocks B     ] media-video/ffmpeg:0 ("media-video/ffmpeg:0" is blocking media-video/libav-12.3)
[blocks B     ] media-video/ffmpeg:0 ("media-video/ffmpeg:0" is blocking media-libs/libpostproc-10.20140517-r1)

 * Error: The above package list contains packages which cannot be
 * installed at the same time on the same system.

  (media-video/ffmpeg-3.3.6:0/55.57.57::gentoo, installed) pulled in by
    >=media-video/ffmpeg-3.2.2:0/55.57.57=[threads,vaapi] required by (media-video/mpv-0.27.2:0/0::gentoo, installed)
    media-video/ffmpeg:0/55.57.57= required by (media-plugins/alsa-plugins-1.1.6:0/0::gentoo, installed)
    >=media-video/ffmpeg-1.2.6-r1:0[X?,encode?,gsm?,jpeg2k?,mp3?,opus?,sdl?,speex?,theora?,threads?,truetype?,vaapi?,vdpau?,x264?] (>=media-video/ffmpeg-1.2.6-r1:0[threads,vaapi]) required by (virtual/ffmpeg-9-r2:0/0::gentoo, installed)
    media-video/ffmpeg:0= required by (media-plugins/alsa-plugins-1.1.6:0/0::gentoo, installed)
    >=media-video/ffmpeg-3.2.2:0=[encode?,threads,vaapi?,vdpau?] (>=media-video/ffmpeg-3.2.2:0=[threads,vaapi]) required by (media-video/mpv-0.27.2:0/0::gentoo, installed)
    >=media-video/ffmpeg-3.1.6:=[encode,postproc] required by (media-tv/kodi-17.3-r1:0/0::gentoo, installed)
    >=media-video/ffmpeg-3.1.6:0/55.57.57=[encode,postproc] required by (media-tv/kodi-17.3-r1:0/0::gentoo, installed)
    <media-video/ffmpeg-4:0= required by (dev-qt/qtwebengine-5.9.6-r1:5/5.9::gentoo, installed)
    >=media-video/ffmpeg-3.3:0 required by (media-video/mpv-0.27.2:0/0::gentoo, installed)
    <media-video/ffmpeg-4:0/55.57.57= required by (dev-qt/qtwebengine-5.9.6-r1:5/5.9::gentoo, installed)

  (media-libs/libpostproc-10.20140517-r1:0/0::gentoo, ebuild scheduled for merge) pulled in by
    libpostproc


log_null wrote:
Is an unconfirmed bug

However, HeXiLeD presented a workaround : https://forums.gentoo.org/viewtopic-t-1079186-start-0.html

i successfully emerged this ffmpeg version in early jan & feb. some later update/change is making emerge failed now.

HeXiLeD has ffmpeg-3.4.2, while mine in ffmepg-3.3.6. guess i'll have to live with this bug for the near future.

log_null wrote:
Also, you can double check if your flags are right.

Are my FLAGS right?
Code:
$ cat /etc/portage/make.conf | grep FLAGS
CFLAGS="-march=core2 -fomit-frame-pointer -ftree-vectorize --param l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=2048"
CXXFLAGS="${CFLAGS}"
FFLAGS="${CFLAGS}"
FCFLAGS="${FFLAGS}"
CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3"
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Thu Oct 18, 2018 11:20 pm    Post subject: Reply with quote

Thinking of FLAGS and what might have changed, I added these flags back again that I had removed some months ago.
Code:
CFLAGS="${CFLAGS} -O2 -pipe"
CPU_FLAGS_X86="${CPU_FLAGS_X86} cx16 sahf fxsr"

And now ffmpeg compiles successfully.

I am a bit surprised, as I thought default included -O2 and -pipe.
Also, I had removed cx16, sahf, and fxsr as cpuid2flags didn't list them. They are listed by gcc query and lscpu.
_________________
"Growth for the sake of growth is the ideology of the cancer cell." Edward Abbey
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21880

PostPosted: Fri Oct 19, 2018 2:15 am    Post subject: Reply with quote

The default does include -O2 -pipe, but the flags you posted with your Useless Use Of Cat do not explicitly inherit the defaults, and CFLAGS do not implicitly inherit the defaults. Since they were not inherited and not included explicitly, they were absent and ffmpeg was built with the default optimization level of -O0. Correct programs should still build at that level, but it's not commonly tested.
Back to top
View user's profile Send private message
josephg
l33t
l33t


Joined: 10 Jan 2016
Posts: 783
Location: usually offline

PostPosted: Fri Oct 19, 2018 10:30 am    Post subject: Reply with quote

Hu wrote:
The default does include -O2 -pipe, but the flags you posted with your Useless Use Of Cat do not explicitly inherit the defaults, and CFLAGS do not implicitly inherit the defaults.

so how or what should i do instead?

Hu wrote:
Since they were not inherited and not included explicitly

what flags should i inherit and/or include explicitly?

Hu wrote:
the flags you posted with your Useless Use Of Cat

i didn't understand this bit either. please explain. thanks.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Fri Oct 19, 2018 11:04 am    Post subject: Reply with quote

Hu wrote:
The default does include -O2 -pipe, but the flags you posted with your Useless Use Of Cat do not explicitly inherit the defaults, and CFLAGS do not implicitly inherit the defaults.

josephg wrote:
so how or what should i do instead?

josephg ... Hu means that the portage doesn't automatically collate the 'default' and whatever you've defined. In fact the opposite, it's only the absence of CFLAGS in make.conf that would then allow the default to be used. Consider the following example:

Code:
% export myvar="foo bar"
% echo $myvar
foo bar
% myvar="baz" ; echo $myvar
baz
% export myvar="foo bar"
% myvar="$myvar baz" ; echo $myvar
foo bar baz

You see 'myvar' isn't collated when redefined, and so doesn't retain the initial value. So, you could use CFLAGS="$CFLAGS -flag -flag" ... but I see no point to it, you should just define the flags you want.

Hu wrote:
Since they were not inherited and not included explicitly

josephg wrote:
what flags should i inherit and/or include explicitly?

Hu is not saying you *should* inherit, only that these are not inherited without explict inclusion (ie, CFLAGS="$CFLAGS").

Hu wrote:
the flags you posted with your Useless Use Of Cat

josephg wrote:
i didn't understand this bit either. please explain. thanks.

You used a 'cat' when grep is perfectly capable of accepting input in the form of a file, eg:

Code:
% grep CFLAGS /etc/portage/make.conf
CFLAGS="-O2 -march=native -pipe"
CXXFLAGS="$CFLAGS"

... look, no cat :)

best ... khay
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