Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linking ffmpeg static library #1

Open
LolliF opened this issue Oct 31, 2018 · 3 comments
Open

linking ffmpeg static library #1

LolliF opened this issue Oct 31, 2018 · 3 comments

Comments

@LolliF
Copy link

LolliF commented Oct 31, 2018

Hi, i am trying to link ffmpeg libraries to my SDK c project for Zynq 7030.
gcc states that libraries are build with VFP while my binary .elf is not and so the link fails. i have tried to change gcc floating point option but is not working. do you have any suggestion on what i am missing?
Thank you very much in advance for your help,
Fabrizio Lolli

@t-kuha
Copy link
Owner

t-kuha commented Nov 1, 2018

Hello @LolliF

Thank you for the report but I have not encountered such an error...

FYI, I could build an ffmpeg example (decode_video.c from https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/decode_video.c) on XSDK (2018.2 / Windows ver.) with the static libraries.

And here is the log:

10:50:59 **** Incremental Build of configuration Release for project ffmpeg_test ****
make all 
'Building file: ../src/main.c'
'Invoking: ARM v7 Linux gcc compiler'
arm-linux-gnueabihf-gcc -Wall -O2 -I"D:\zynq-library\imaging\ffmpeg\include" -c -fmessage-length=0 -MT"src/main.o" -MMD -MP -MF"src/main.d" -MT"src/main.o" -o "src/main.o" "../src/main.c"
'Finished building: ../src/main.c'
' '
'Building target: ffmpeg_test.elf'
'Invoking: ARM v7 Linux gcc linker'
arm-linux-gnueabihf-gcc  -o "ffmpeg_test.elf"  ./src/main.o  D:/zynq-library/imaging/ffmpeg/lib/libavcodec.a D:/zynq-library/imaging/ffmpeg/lib/libavdevice.a D:/zynq-library/imaging/ffmpeg/lib/libavfilter.a D:/zynq-library/imaging/ffmpeg/lib/libavformat.a D:/zynq-library/imaging/ffmpeg/lib/libavutil.a D:/zynq-library/imaging/ffmpeg/lib/libswresample.a D:/zynq-library/imaging/ffmpeg/lib/libswscale.a -lm -lpthread
'Finished building target: ffmpeg_test.elf'
' '
'Invoking: ARM v7 Linux Print Size'
arm-linux-gnueabihf-size ffmpeg_test.elf  |tee "ffmpeg_test.elf.size"
   text	   data	    bss	    dec	    hex	filename
11011830	 251824	8220352	19484006	1294d66	ffmpeg_test.elf
'Finished building: ffmpeg_test.elf.size'
' '

10:52:16 Build Finished (took 1m:16s.23ms)

@LolliF
Copy link
Author

LolliF commented Nov 2, 2018

Thank you for your fast reply, can you share your project's gcc and linker options? i think i am missing something there.(XSDK 2017.2 on centos)

@t-kuha
Copy link
Owner

t-kuha commented Nov 2, 2018

@LolliF

Here are the screenshots:

  • Include directory
    inc

  • Library setting
    lib

  • Other objects
    other


BTW, the issue may be coming from the difference in the tool version, especially gcc version; XSDK 2017.2 uses gcc 6.2.1 whereas 2018.2 depends on gcc 7.2.1. If the issue persists, my recommendation then would be to compile ffmpeg by yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants