2006-10-03 02:26:07     ffmpeg compile problem

Document created by Aaronwu Employee on Aug 7, 2013
Version 1Show Document
  • View in full screen mode

2006-10-03 02:26:07     ffmpeg compile problem

jonthan moo (TAIWAN)

Message: 14203    [1] ==== download cvs toolchain ====

mkdir ~/blackfin-cvs

cd ~/blackfin-cvs

mkdir gcc3 uboot533 uclinux533

 

cd ~/blackfin-cvs/gcc3

cvs -z3 -d :pserver:anonymous@cvs.blackfin.uclinux.org:/cvsroot/gcc3 checkout .

cd ~/blackfin-cvs/uboot533

cvs -z3 -d :pserver:anonymous@cvs.blackfin.uclinux.org:/cvsroot/uboot533 checkout .

cd ~/blackfin-cvs/uclinux533

cvs -z3 -d :pserver:anonymous@cvs.blackfin.uclinux.org:/cvsroot/uclinux533 checkout .

 

[2] ==== enable Large File Support in uClibc / Toolchain ====

fix

uClinux-dist/uClibc/extra/Configs/Config.bfin.default

uClinux-dist/uClibc/extra/Configs/Config.bfinfdpic.default

 

Change: # UCLIBC_HAS_LFS is not set to UCLIBC_HAS_LFS=y

 

[3] ==== build toolchain ====

mkdir ~/blackfin-cvs/toolchain

~/blackfin-cvs/gcc3/buildscript/BuildToolChain \

-b ~/blackfin-cvs/toolchain \

-k ~/blackfin-cvs/uclinux533/uClinux-dist \

-s ~/blackfin-cvs/gcc3 \

-u ~/blackfin-cvs/uboot533/u-boot_1.1.3

 

[4] ==== download ffmpeg from cvs ====

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

 

[5] ==== configure and make ffmpeg ====

./configure --cross-compile \

--cpu=bfin \

--cc=bfin-uclinux-gcc \

--extra-cflags=-mfdpic \

--extra-ldflags=-mfdpic \

--prefix=where/you/want/ffmpeg \

--enable-static --disable-shared \

--enable-gpl --enable-pp \

--disable-strip \

--disable-v4l2 \

--enable-memalign-hack

make

 

[problem]

When I make ffmpeg , I got below message ...

 

motion_est_template.c: In function `hpel_motion_search':

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est_template.c: In function `ff_get_mb_score':

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est_template.c: In function `qpel_motion_search':

motion_est.c:178: warning: 'uvdxy' might be used uninitialized in this function

motion_est.c: In function `ff_epzs_motion_search':

motion_est.c:53: warning: inlining failed in call to 'update_map_generation': --param inline-unit-growth limit reached

motion_est.c:886: warning: called from here

motion_est.c:53: warning: inlining failed in call to 'update_map_generation': --param inline-unit-growth limit reached

motion_est.c:886: warning: called from here

motion_est_template.c:979: internal compiler error: Segmentation fault

Please submit a full bug report,

with preprocessed source if appropriate.

See <URL:http://gcc.gnu.org/bugs.html> for instructions.

make[1]: *** [motion_est.o] Error 1

make[1]: Leaving directory `/root/ffmpeg/libavcodec'

make: *** [lib] Error 2

[root@xgl ffmpeg]#

QuoteReplyEditDelete

 

 

2006-10-04 13:18:56     RE: ffmpeg compile problem

Michael Benjamin (UNITED STATES)

Message: 14278    are you using gcc4.1.x or gcc3.4.x ? do you get the same internal compiler error with both compilers?

QuoteReplyEditDelete

 

 

2008-08-27 17:09:00     RE: ffmpeg compile problem

Ed Sutter (UNITED STATES)

Message: 61201   

 

I'm posting once again to an old thread; however, my problem is the same as the thread subject...

 

I'm trying to include ffmpeg in my build, so I ran make menuconfig to enable it...

 

Customize Vendor/User Settings

    Blackfin app programs

      [*] FFmpeg and FFserver

 

Then, kicked off a 'make' and got this output...

 

make -C ffmpeg

make[3]: Entering directory `/home/els/blackfin/uclinux/uClinux-dist-2008R1.5-RC

3/lib/ffmpeg'

find ffmpeg-svn-11114 -type f -print0 | xargs -0 touch -r ffmpeg-svn-11114/confi

gure

set -e ; \

        rm -rf build ; \

        mkdir build ; \

        cd build ; \

        SDL_CONFIG=/home/els/blackfin/uclinux/uClinux-dist-2008R1.5-RC3/staging/usr/bin/sdl-config \

        ../ffmpeg-svn-11114/configure \

                --prefix=/usr \

                --source-path=$PWD/../ffmpeg-svn-11114 \

                --target-os=Linux \

                --cpu=bfin \

                --arch=bfin \

                --extra-ldflags=" -Wl,-elf2flt          -mcpu=bf537-0.2" \

                --enable-static \

                --enable-shared \

                --enable-gpl \

                --enable-pp \

                --disable-strip \

                --cross-prefix=bfin-uclinux-

bfin-uclinux-gcc is unable to create an executable file.

 

I'm running with uClinux-dist-2008R1.5-RC3 and bfin-uclinux-gcc 4.2.1

 

Anyone ever see this error? Any idea what I'm doing wrong?

QuoteReplyEditDelete

 

 

2008-08-27 17:20:47     RE: ffmpeg compile problem

Ed Sutter (UNITED STATES)

Message: 61202   

 

More...

 

It appears to have something to do with build type (should have used FDPIC instead of FLAT); however, I haven't had a problem with any other apps (v4l, simple-gpio-test, etc...).  Is this a global thing indicating that I need to build everything over or is it specific to ffmpeg?

QuoteReplyEditDelete

 

 

2008-08-27 18:00:15     RE: ffmpeg compile problem

Ed Sutter (UNITED STATES)

Message: 61204   

 

Looks like I'm slowly answering my own question here, but I'm puzzled...

 

If I cd to lib/ffmpeg and force it to build with  bfin-linux-uclibc- as the prefix then it appears to build.  Why does ffmpeg need bfin-linux-uclibc- but everything else that 'make' built was apparently fine with bfin-uclinux-gcc?

QuoteReplyEditDelete

 

 

2008-08-27 21:08:23     RE: ffmpeg compile problem

Mike Frysinger (UNITED STATES)

Message: 61207   

 

very few things will build only as FDPIC ... ffmpeg is currently one of them

QuoteReplyEditDelete

 

 

2008-08-27 21:48:48     RE: ffmpeg compile problem

Ed Sutter (UNITED STATES)

Message: 61209   

 

So what does that say about the error that I'm seeing?  Is it expected?  Am I correct to be building the ffmpeg stuff seperately from the rest of the image (using bfin-linux-uclibc instead of bfin-uclinux)? 

QuoteReplyEditDelete

 

 

2008-08-27 22:17:41     RE: ffmpeg compile problem

Mike Frysinger (UNITED STATES)

Message: 61211   

 

it wont build as FLAT.  whatever the error is exactly doesnt matter terribly much.  you're free to do what you like (it's open source after all), but only building through uclinux-dist is supported.

QuoteReplyEditDelete

 

 

2008-08-28 10:28:55     RE: ffmpeg compile problem

Ed Sutter (UNITED STATES)

Message: 61260   

 

I realize I can do whatever I want; however I'm simply trying to follow what I thought was the recommended procedure.  As I stated in my first post, I enabled FFmpeg through menuconfig, and ran make (if this isn't the way to add ffmpeg to the build, please inform).  That caused the initial error.  I investigated the issue, found what I thought was a problem, and tried a workaround (using the other compiler).  I'm trying not to deviate from whatever is the standard way to build this.  I've since found that now my built ffmpeg image doesn't run because there's no L1 space available.  As a result, I'm now wondering if my workaround is wrong, or if ffmpeg just doesn't build conveniently. 

 

The ffmpeg code is a huge package, so I'm not implying that it should build clean, just trying to make sure I understand how other folks are doing this. 

 

I'm so close I'm almost salivating here! :-) I have ffmpeg built, I was able to build in the v4l stuff and I verified that my hardware works with the standard vl4_test code (I can pull images out of my sensor). If you tell me that including ffmpeg in the build is more complicated than just running menuconfig and then rebuilding, I'll continue on my path and then share my results (if anyone wants them).  I just don't want to be running down a path that doesn't make sense.

 

Sorry if this is getting confusing, I'm just trying to make sure I build this the recommended way; however, if there isn't a recommended way, I'll just get something working and share my method for others that may run into this.     

QuoteReplyEditDelete

 

 

2008-08-28 11:03:22     RE: ffmpeg compile problem

Mike Frysinger (UNITED STATES)

Message: 61264   

 

the official way:

- select FDPIC in the menuconfig system

- select FFMPEG in the menuconfig system

- build it

- run on a processor with enough L1 memory to support FFMPEG

 

anything else is currently not supported ...

QuoteReplyEditDelete

 

 

2008-08-28 15:27:07     RE: ffmpeg compile problem

Ed Sutter (UNITED STATES)

Message: 61275   

 

Ok, looks like it's working now.  Here's the scoop...

 

My attempt to build ffmpeg by itself, using the other compiler did work; however, then I had to manaully install ffmpeg and all the libraries.  Next I did what Mike said (select FDPIC in menuconfig), that worked better because now ffmpeg and all the needed libraries are built right into the image.  One added point, I'm working with the BF537 on a board that is similar to the BF537_STAMP.  To run ffmpeg, I had to disable the ethernet driver's use of L1 ram.

 

I'm now able to generate .avi files (and I'm sure a lot of other types) right on board.  Very cool.  Mike, thanks for your help.

QuoteReplyEditDelete

 

 

2008-08-28 15:40:21     RE: ffmpeg compile problem

Mike Frysinger (UNITED STATES)

Message: 61276   

 

we plan on trying to make the process more smooth/flexible, but today it isnt ... sorry for the troubles

Attachments

    Outcomes