Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#3177 closed defect (fixed)

asm error on i686

Reported by: andreas Owned by:
Priority: minor Component: avcodec
Version: git-master Keywords: h264 regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:
"make check" fails on i686 with the following error message:
In file included from libavcodec/cabac_functions.h:36:0,

from libavcodec/cabac.c:32:

libavcodec/cabac.c: In function 'main':
libavcodec/x86/cabac.h:190:5: error: 'asm' operand has impossible constraints

asm volatile(

How to reproduce:
The error manifests itself when compiling on the build machine of the Guix distribution, see

http://hydra.gnu.org/build/29410/nixlog/1/raw

The first lines of this web page also give the exact dependencies used to compile ffmpeg, in particular, gcc-4.8.2.

I am attaching the config.log.

Attachments (1)

config.log (267.8 KB ) - added by andreas 11 years ago.

Download all attachments as: .zip

Change History (14)

by andreas, 11 years ago

Attachment: config.log added

in reply to:  description comment:1 by Carl Eugen Hoyos, 11 years ago

Replying to andreas:

The error manifests itself when compiling on the build machine of the Guix distribution, see

http://hydra.gnu.org/build/29410/nixlog/1/raw

Unfortunately, we generally don't support external build scripts, in your specific example, the script looks completely broken;-(

Could you test something like ./configure --enable-gpl --enable-shared --enable-fontconfig --enable-libfreetype --enable-libspeex --enable-libtheora --enable-libvorbis && make ffmpeg ? If that allows to reproduce the problem, please run make again, then run make V=1 and post the complete, uncut output here (please do not post the console output of an earlier run).
And please test current git head.

comment:2 by Carl Eugen Hoyos, 11 years ago

I may have misunderstand your issue: Why do you run make check? If you want to test your FFmpeg compilation, please run make SAMPLES=fate-suite fate-rsync && make SAMPLES=fate-suite fate
I suspect make libavcodec/cabac-test is not supposed to work on x86-32.

comment:3 by Carl Eugen Hoyos, 11 years ago

Version: 2.1.1git-master

comment:4 by Carl Eugen Hoyos, 11 years ago

Keywords: h264 regression added
Priority: normalminor
Reproduced by developer: set
Status: newopen

Otoh, this is a regression since d40ff29c

$ configure --cc='cc -m32'
...
$ make V=1 libavcodec/cabac-test
cc -m32 -I. -I./ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DHAVE_AV_CONFIG_H -DTEST -std=c99 -fomit-frame-pointer -pthread -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -g -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wno-maybe-uninitialized  -MMD -MF libavcodec/cabac-test.d -MT libavcodec/cabac-test.o -c -o libavcodec/cabac-test.o libavcodec/cabac.c
In file included from libavcodec/cabac_functions.h:36:0,
                 from libavcodec/cabac.c:32:
libavcodec/cabac.c: In function ‘main’:
libavcodec/x86/cabac.h:190:5: error: can’t find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
In file included from ./libavutil/timer.h:42:0,
                 from ./libavutil/internal.h:39,
                 from ./libavutil/common.h:415,
                 from libavcodec/cabac.c:29:
./libavutil/x86/timer.h:33:5: error: ‘asm’ operand has impossible constraints
./libavutil/x86/timer.h:33:5: error: ‘asm’ operand has impossible constraints
./libavutil/x86/timer.h:33:5: error: ‘asm’ operand has impossible constraints
./libavutil/x86/timer.h:33:5: error: ‘asm’ operand has impossible constraints
./libavutil/x86/timer.h:33:5: error: ‘asm’ operand has impossible constraints
In file included from libavcodec/cabac_functions.h:36:0,
                 from libavcodec/cabac.c:32:
libavcodec/x86/cabac.h:262:5: error: ‘asm’ operand has impossible constraints
In file included from ./libavutil/timer.h:42:0,
                 from ./libavutil/internal.h:39,
                 from ./libavutil/common.h:415,
                 from libavcodec/cabac.c:29:
./libavutil/x86/timer.h:33:5: error: ‘asm’ operand has impossible constraints
./libavutil/x86/timer.h:33:5: error: ‘asm’ operand has impossible constraints
In file included from libavcodec/cabac_functions.h:36:0,
                 from libavcodec/cabac.c:32:
libavcodec/x86/cabac.h:190:5: error: ‘asm’ operand has impossible constraints
In file included from ./libavutil/timer.h:42:0,
                 from ./libavutil/internal.h:39,
                 from ./libavutil/common.h:415,
                 from libavcodec/cabac.c:29:
./libavutil/x86/timer.h:33:5: error: ‘asm’ operand has impossible constraints
make: *** [libavcodec/cabac-test.o] Error 1
Last edited 11 years ago by Carl Eugen Hoyos (previous) (diff)

comment:5 by andreas, 11 years ago

Keywords: h264 regression removed
Priority: minornormal
Reproduced by developer: unset

I am a bit confused; why should we not use "make check"? Is this not the "universal" way of testing compilation of projects based on the autotools?

If this specific test is not supported in 32 bit, it should be activated only conditionally (we could do so in our build scripts, but it would be preferable to do so in the ffmpeg distribution itself).

comment:6 by andreas, 11 years ago

Keywords: h264 regression added
Priority: normalminor
Reproduced by developer: set

Sorry, my comment apparently undid your modifications on the bug.

in reply to:  5 ; comment:7 by Carl Eugen Hoyos, 11 years ago

Replying to andreas:

I am a bit confused; why should we not use "make check"? Is this not the "universal" way of testing compilation of projects based on the autotools?

FFmpeg is not based on autotools and make check is not the way to test FFmpeg compilation.
Afaict libavcodec/cabac-test is a developer-specific test (and I am not convinced that make check actually runs the test).

As said, make fate (after downloading the samples!) is the recommended way of testing your FFmpeg compilation.

Last edited 11 years ago by Carl Eugen Hoyos (previous) (diff)

in reply to:  7 comment:8 by Timothy Gu, 11 years ago

Replying to cehoyos:

Replying to andreas:

I am a bit confused; why should we not use "make check"? Is this not the "universal" way of testing compilation of projects based on the autotools?

FFmpeg is not based on autotools and make check is not the way to test FFmpeg compilation.
Afaict libavcodec/cabac-test is a developer-specific test (and I am not convinced that make check actually runs the test).

As said, make fate (after downloading the samples!) is the recommended way of testing your FFmpeg compilation.

Warning: samples are BIG!

See also http://www.ffmpeg.org/fate.html

comment:9 by Michael Niedermayer, 11 years ago

Resolution: fixed
Status: openclosed

comment:10 by andreas, 11 years ago

Thanks for the explanations and the fix! We backported it into our distribution. Using fate could be an option, but it is not clear whether downloading all the samples would be reasonable for a mainly source based distribution.

comment:11 by Carl Eugen Hoyos, 11 years ago

Allow me to repeat that make check does not actually run the cabac test (and that you don't need to run it, it is a test for h264 developers), so instead of backporting a patch, please change make check to make fate which also runs (less tests) without samples.

in reply to:  10 comment:12 by Clément Bœsch, 11 years ago

Replying to andreas:

Thanks for the explanations and the fix! We backported it into our distribution. Using fate could be an option, but it is not clear whether downloading all the samples would be reasonable for a mainly source based distribution.

Samples are optional with make fate.

comment:13 by andreas, 11 years ago

Thanks for the additional explanations, we switched to "make fate" accordingly.

Note: See TracTickets for help on using tickets.