Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 374915 - media-video/ffmpeg-9999 build fail on armv7a-hardfloat-linux-gnueabi
Summary: media-video/ffmpeg-9999 build fail on armv7a-hardfloat-linux-gnueabi
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-12 08:33 UTC by Yixun Lan
Modified: 2011-12-16 20:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
the full build log (build.log,102.50 KB, text/plain)
2011-07-12 08:38 UTC, Yixun Lan
Details
config log (config.log,191.11 KB, text/plain)
2011-07-12 08:38 UTC, Yixun Lan
Details
full gcc commands (mylog.txt,19.52 KB, text/plain)
2011-07-12 08:43 UTC, Yixun Lan
Details
emerge --info (emerge_info.txt,3.88 KB, text/plain)
2011-07-12 14:11 UTC, Yixun Lan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yixun Lan archtester gentoo-dev 2011-07-12 08:33:54 UTC
vicim code, seems that GCC have problem with following code

./libavutil/arm/intmath.h:82
    __asm__ ("usat %0, %2, %1" : "=r"(x) : "r"(a), "i"(p));


./libavutil/arm/intmath.h:82:5: warning: asm operand 2 probably doesn’t match peconstraints
./libavutil/arm/intmath.h:82:5: error: impossible constraint in ‘asm’
./libavutil/arm/intmath.h:82:5: error: impossible constraint in ‘asm’
./libavutil/arm/intmath.h:82:5: error: impossible constraint in ‘asm’
./libavutil/arm/intmath.h:82:5: error: impossible constraint in ‘asm’
./libavutil/arm/intmath.h:82:5: error: impossible constraint in ‘asm’
./libavutil/arm/intmath.h:82:5: error: impossible constraint in ‘asm’
./libavutil/arm/intmath.h:82:5: error: impossible constraint in ‘asm’
./libavutil/arm/intmath.h:82:5: error: impossible constraint in ‘asm’
libswscale/swscale.c: In function ‘yuv2rgb_full_X_c_template.clone.13’:
libswscale/swscale.c:1397:23: warning: ‘A’ may be used uninitialized in thish un function
make: *** [libswscale/swscale.o] Error 1


Reproducible: Always
Comment 1 Yixun Lan archtester gentoo-dev 2011-07-12 08:38:05 UTC
Created attachment 279831 [details]
the full build log
Comment 2 Yixun Lan archtester gentoo-dev 2011-07-12 08:38:35 UTC
Created attachment 279833 [details]
config log
Comment 3 Yixun Lan archtester gentoo-dev 2011-07-12 08:43:17 UTC
Created attachment 279835 [details]
full gcc commands
Comment 4 Yixun Lan archtester gentoo-dev 2011-07-12 08:44:58 UTC
panda ffmpeg_debug # cat swscale.c 
#include <stdio.h>

#define av_always_inline __inline__
#define av_const const
typedef unsigned short int16_t;

static av_always_inline av_const unsigned av_clip_uintp2_arm(int a, int p)
{
    unsigned x;
    __asm__ ("usat %0, %2, %1" : "=r"(x) : "r"(a), "i"(p));
    return x;
}

int main(int argc, char *argv[])
{
        int a =23412;
        int b = 14;
        const c = av_clip_uintp2_arm(a, b);
        printf("c value : %d\n", c);
        return c;
}

panda ffmpeg_debug # armv7a-hardfloat-linux-gnueabi-gcc -o test swscale.c 
swscale.c: In function ‘av_clip_uintp2_arm’:
swscale.c:10:5: warning: asm operand 2 probably doesn’t match constraints
swscale.c:10:5: error: impossible constraint in ‘asm’
panda ffmpeg_debug # armv7a-hardfloat-linux-gnueabi-gcc -O2 -o test swscale.c 
panda ffmpeg_debug # file test 
test: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped
Comment 5 Yixun Lan archtester gentoo-dev 2011-07-12 08:49:46 UTC
notice that using the same command/paramater as log file of "full gcc commands"
it built successfully, which fail in that ffmpeg-9999 compile..
I'm a little bit confused.

panda ffmpeg_debug # cat make.sh 
#!/bin/bash
armv7a-hardfloat-linux-gnueabi-gcc -I. -I./ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DHAVE_AV_CONFIG_H -O2 -pipe -mfpu=neon -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard  -march=armv7-a -std=c99 -marm -fPIC -pthread -Wdeclaration-after-statement -Wall -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast  -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=implicit-function-declaration -Werror=missing-prototypes  -MMD -MF swscale.d -MT swscale.o -c -o swscale.o swscale.c
panda ffmpeg_debug # ./make.sh 
swscale.c: In function ‘main’:
swscale.c:18:8: warning: type defaults to ‘int’ in declaration of ‘c’
panda ffmpeg_debug # file swscale.o 
swscale.o: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped
panda ffmpeg_debug #
Comment 6 Pacho Ramos gentoo-dev 2011-07-12 10:30:50 UTC
Please post "emerge --info" output
Comment 7 Yixun Lan archtester gentoo-dev 2011-07-12 14:11:15 UTC
Created attachment 279879 [details]
emerge --info
Comment 8 Luca Barbato gentoo-dev 2011-07-13 12:21:25 UTC
Could you please try libav-9999 and report back? as you can see in http://fate.libav.org everything seems working correctly.
Comment 9 Yixun Lan archtester gentoo-dev 2011-07-13 14:11:27 UTC
yeah, I saw that fate.libav.org. also I test with libav-9999, it compile success with --enable-neon --disable-armvfp, but media-video/xine-lib have problem with libav-9999, so I downgrade ..
Comment 10 Yixun Lan archtester gentoo-dev 2011-07-13 14:38:25 UTC
armv7a-hardfloat-linux-gnueabi-gcc -I. -I. -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=
64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DHAVE
_AV_CONFIG_H -O2 -pipe -mfpu=neon -march=armv7-a -mtune=cortex-a9 -mfloat-abi=ha
rd  -march=armv7-a -std=c99 -fomit-frame-pointer -marm -fPIC -pthread -Wdeclarat
ion-after-statement -Wall -Wno-parentheses -Wno-switch -Wno-format-zero-length -
Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcas
t-qual -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -O3 -fno-math-
errno -fno-signed-zeros -fno-tree-vectorize -Werror=implicit-function-declaration -Werror=missing-prototypes  -MMD -MF libavdevice/fbdev.d -MT libavdevice/fbdev
.o -c -o libavdevice/fbdev.o libavdevice/fbdev.c
libavdevice/fbdev.c: In function ‘fbdev_read_header’:
libavdevice/fbdev.c:111:5: warning: ‘time_base’ is deprecated (declared at .ITS=/libavformat/avformat.h:245)
libavdevice/fbdev.c:112:9: warning: ‘time_base’ is deprecated (declared at .i=ha/libavformat/avformat.h:245)
libavdevice/fbdev.c:112:9: warning: ‘time_base’ is deprecated (declared at .th -/libavformat/avformat.h:245)

compile success, note libavdevice/fbdev.c will include libavutil/arm/intmath.h
while libavutil/arm/intmath.h have the same "usat" instruction as ffmpeg.. I'm getting confused...
Comment 11 Alexis Ballier gentoo-dev 2011-12-16 20:53:59 UTC
should be fixed in 0.9 / 9999