This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Error in building MPlayer



Hi,


I am trying to build MPlayer for AM335x but unfortunately without success. I have Ubuntu 12.04

1. In my /home/maros/TILINUX I have installed SDK with toolchain: ti-sdk-am335x-evm-07.00.00.00 and INSTALL folder.

2. In INSTALL folder I have mplayer source code downloaded like:  svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer

3. When I tried run ./configure script in mplayer folder I got an error that ffmpeg folder is missing.

4. So I downloaded ffmpeg source code to INSTALL folder like this: git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg

5. I moved ffmpeg folder into mplayer folder.

6. Now I tried run ./configure script again and with success. OK I think that source codes are ready.

NOW Cross-complie:

Actually I am in the mplayer directory.

7. I must add PATH into enviroment PATH, so:

export PATH="/home/maros/TILINUX/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin:$PATH"

8.  ./configure --enable-cross-compile --cc=arm-linux-gnueabihf-gcc --host-cc=gcc --as=arm-linux-gnueabihf-as --ar=arm-linux-gnueabihf-ar --ranlib=arm-linux-gnueabihf-ranlib --target=arm-linux --enable-alsa

9. config.h, config.mak and config.log are made.

10. make.

11. After a few minutes I have got some errors and this is at the end of console output:

In file included from libavcodec/arm/ac3dsp_arm.S:21:0:
./libavutil/arm/asm.S:37:5: warning: "HAVE_AS_FUNC" is not defined [-Wundef]
AS    libavcodec/arm/ac3dsp_armv6.o
In file included from libavcodec/arm/ac3dsp_armv6.S:21:0:
./libavutil/arm/asm.S:37:5: warning: "HAVE_AS_FUNC" is not defined [-Wundef]
CC    libavcodec/arm/ac3dsp_init_arm.o
CC    libavcodec/arm/audiodsp_init_arm.o
CC    libavcodec/arm/blockdsp_init_arm.o
CC    libavcodec/arm/dcadsp_init_arm.o
AS    libavcodec/arm/dcadsp_vfp.o
In file included from libavcodec/arm/dcadsp_vfp.S:22:0:
./libavutil/arm/asm.S:37:5: warning: "HAVE_AS_FUNC" is not defined [-Wundef]
CC    libavcodec/arm/fft_fixed_init_arm.o
CC    libavcodec/arm/fft_init_arm.o
AS    libavcodec/arm/fft_vfp.o
In file included from libavcodec/arm/fft_vfp.S:22:0:
./libavutil/arm/asm.S:37:5: warning: "HAVE_AS_FUNC" is not defined [-Wundef]
libavcodec/arm/fft_vfp.S: Assembler messages:
libavcodec/arm/fft_vfp.S:36: Error: non-constant expression in ".if" statement
make[1]: *** [libavcodec/arm/fft_vfp.o] Error 1
make[1]: Leaving directory `/home/maros/TILINUX/INSTALL/mplayer/ffmpeg'
make: *** [ffmpeg/libavcodec/libavcodec.a] Error 2

When I looked into /home/maros/TILINUX/INSTALL/mplayer/ffmpeg/libavcodec then libavcodec.a is missing - I do not know why. In attached file I see problems with lircc.h, lirc_client.h and libosso.h because it says: No file or directory.

12. So I run "make clean" and now I try: make -i

13. This is the end of console output after make -i :

arm-linux-gnueabihf-gcc: error: ffmpeg/libavcodec/libavcodec.a: No such file or directory
make: [mencoder] Error 1 (ignored)

Log file is attached.

4578.maros_config.log

Strange thing is that I could not build mplayer for Ubuntu 12.04 too. Please help :( If someone has a solution, please, write it in step by step guide. Thank you.

Best regards,

Maros

  • What about MPlayer version ?
    I've seen some build issues with arm-linux-gnueabihf but not like yours.

    Earlier I was able to build "MPlayer-1.1.1" with arm-arago-linux-gnueabi- toolchain but Linaro toolchain had some issues for MPlayer build.

    https://bugs.linaro.org/show_bug.cgi?id=405
    https://bugs.launchpad.net/linaro-android/+bug/1189357
    https://github.com/appunite/AndroidFFmpeg/issues/64
    http://e2e.ti.com/support/arm/sitara_arm/f/791/t/322751

    Working: (For older SDK)

    ./configure --prefix=/home/ashok/fs --enable-cross-compile --cc=arm-arago-linux-gnueabi-gcc --host-cc=gcc --as=arm-arago-linux-gnueabi-as --ar=arm-arago-linux-gnueabi-ar --ranlib=arm-arago-linux-gnueabi-ranlib --target=arm-linux --disable-ivtv

    Not working: (For newer SDK)

    ./configure --prefix=/home/ashok/fs --enable-cross-compile --cc=arm-linux-gnueabihf-gcc --host-cc=gcc --as=arm-linux-gnueabihf-as --ar=arm-linux-gnueabihf-ar --ranlib=arm-linux-gnueabihf-ranlib --target=arm-linux --disable-ivtv
  • Hi Titus,

    I am using the newest versions of mplayer and ffmpeg. But I couldnt build mplayer in Ubuntu too. From log file I discovered problems with lirc library, so I disabled it (I dont need it):

    ./configure --disable-lirc --disable-lircc

    (configure.sh script requires yasm so I installed yasm via apt-get)

    It creates .mak and .h config file and I run make command.

    after few minutes make command stops with this error:

    libavcodec/x86/hevc_idct.asm:88: error: instruction expected after label

    libavcodec/x86/hevc_idct.asm:89: error: instruction expected after label

    libavcodec/x86/hevc_idct.asm:89: error: redefinition of `vpbroadcastw.loop'

    libavcodec/x86/hevc_idct.asm:88: error: `vpbroadcastw.loop' previously defined here

    libavcodec/x86/hevc_idct.asm:104: error: instruction expected after label

    libavcodec/x86/hevc_idct.asm:104: error: redefinition of `vpbroadcastw.loop'

    libavcodec/x86/hevc_idct.asm:88: error: `vpbroadcastw.loop' previously defined here

    libavcodec/x86/hevc_idct.asm:105: error: instruction expected after label

    libavcodec/x86/hevc_idct.asm:105: error: redefinition of `vpbroadcastw.loop'

    libavcodec/x86/hevc_idct.asm:88: error: `vpbroadcastw.loop' previously defined here

    libavcodec/x86/hevc_idct.asm:120: error: instruction expected after label

    libavcodec/x86/hevc_idct.asm:120: error: redefinition of `vpbroadcastw.loop'

    libavcodec/x86/hevc_idct.asm:88: error: `vpbroadcastw.loop' previously defined here

    libavcodec/x86/hevc_idct.asm:121: error: instruction expected after label

    libavcodec/x86/hevc_idct.asm:121: error: redefinition of `vpbroadcastw.loop'

    libavcodec/x86/hevc_idct.asm:88: error: `vpbroadcastw.loop' previously defined here

    make[1]: *** [libavcodec/x86/hevc_idct.o] Error 1

    make[1]: Leaving directory `/home/maros/TILINUX/INSTALL/mplayer/ffmpeg'

    make: *** [ffmpeg/libavcodec/libavcodec.a] Error 2

     

     

  • I'm able to build Mplayer for ubuntu by using the following mplayer source.

    ftp://ftp.mplayerhq.hu/MPlayer/releases/MPlayer-1.1.1.tar.xz

    ./configure
    make
    sudo make install
  • Hi!

    Version 1.1.1 works for me! An I really dont know why. I was using official and the latest svn snapshot and without success for 3 days. Do you have some explanation why I cannot build it? Thank you!

    And when I built it with make...how could I install it into AM335x? I run make install command on host PC -> then make install into directories which I specified -> and then copy them into AM335x filesystem on my SD card?
  • I think that new MPlayer (1.1.1) version is not maintained in SVN version control.
    Now, you need to cross compile the MPlayer with ARM tool chain (arm-arago-linux-gnueabi) to play media files on your target board as I replied.
  • yes, I understand. But my noob question was how could I install the mplayer on the target board after cross-compilation

    In Ubuntu I will make cross-compilation -> make -> make install to some directories -> and then I will copy this files and directories from Ubuntu filesystem to the target filesystem on the SD card? I am windows user and in the windows I create for example install file or simple .exe file and this file I copy into windows folder. Here in Linux I am lost a little. Thank you for your patience.


    Maros

  • Hi Maros,
    I think, you can simply copy the "mplayer" compiled binary to your filesystem.

    Or

    make DESTDIR=<your filesystem here> install
    Ex:
    Suppose your filesystem on SD cards 2nd partition & it mounted to /media/rootfs then,

    sudo make DESTDIR=/media/rootfs install