Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 368
Registered: ‎06-30-2012
My Device: Playbook, Z10LE, DevAlpha C
My Carrier: Telenor, Mobitel

Re: FFMpeg compile

Nothing personal, but i have 15+ years expirience on c++ programming, and even more on other languages. RIM did not include valid or proper documentation how to set environment on Ubuntu. When you download ndk .bin file, nothing is explained what you should do with it (you need to chmod 755 on that file, and then run it, there is no mention for this step at all). Than you need to set environment via running bat-env.sh if you want to be able to compile via command line,and "source" it in your bashrc file. Ok, i'm not Linux newbie, and i manage to do that, but in documentation that step is not described in any details. I have problems because this variables, set via source command in bashrc are not visible when running configure command. So, no, i dont have problems specific to configure command, i have problems to cross compile ANYTHING , because of problems in environment, due to lack of proper documentation for Ubuntu,which is very common Linux distr.
No hard feelings BGmot, i like RIM, but that is direct cause of poor documentation. 

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: FFMpeg compile

mzex, you are 100% right it is not documented and there are white spots in documentation that hopefully will be fixed. But again command line tools are for those who understand how to use them, primary product release by RIM for developers is NDK - IDE with GUI.

Anyway what exact pieces of documentation are you missing now?

Regarding FFmpeg - as soon as somebody successfully compiles it for Playbook/BB10 it will appear on github under blackberry.

Developer
Posts: 368
Registered: ‎06-30-2012
My Device: Playbook, Z10LE, DevAlpha C
My Carrier: Telenor, Mobitel

Re: FFMpeg compile

[ Edited ]

Well, i cant compile anything through command line, i'm getting errors that qnx_host and qnx_target are not set, and actually, they are set, and i can see them when i do printenv command through terminal. 

If somebody succesfully compiles through command line on Ubuntu, pls describe step by step, how did you setup your environment and on which version of Ubuntu.

Developer
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: FFMpeg compile

Maybe I missed it, but have you copied the env vars into your bashrc instead of using source cmd? Maybe try the system bashrc instead of the login on? Can you edit the config script somewhere to do the printenv also? It seems to be using your path edit correctly since it finds the compiler, its just not getting the others.
Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: FFMpeg compile

Out of curiousity I tried:

git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
source /Developer/SDKs/bbndk-2.0.0/bbndk-env.sh
./configure --enable-cross-compile --target-os=qnx --cc=arm-unknown-nto-qnx6.5.0eabi-gcc --cxx=arm-unknown-nto-qnx6.5.0eabi-gcc --extra-ldflags='-Wl,-s ' --arch=armv6

 It completed with only two warnings:

License: LGPL version 2.1 or later
Creating config.mak and config.h...

WARNING: pkg-config not found, library detection may fail.
WARNING: Compiler does not indicate floating-point ABI, guessing soft.

Then

make
.... long list of compiled files....

LD	ffmpeg_g
libavdevice/libavdevice.a: could not read symbols: Archive has no index; run ranlib to add one
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1

So, Compilation went well I have error during Linking and this is to be troubleshooted. What environment problems are we talking about here guys? :-)

 

Developer
Posts: 368
Registered: ‎06-30-2012
My Device: Playbook, Z10LE, DevAlpha C
My Carrier: Telenor, Mobitel

Re: FFMpeg compile

Thank you guys on your help. Mreed, problem was that i edit my user local bashrc, and needed to run configure command with sudo user, and of course, sudo user is not getting local user variables, so i edit /etc/bash.bashrc which is system wide version of it and now it is Ok, problem solved.

 

Thx on your help guys.

Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: FFMpeg compile

Congrats! ;-)
Btw did you know you could run gcc on Playbook?
Developer
Posts: 368
Registered: ‎06-30-2012
My Device: Playbook, Z10LE, DevAlpha C
My Carrier: Telenor, Mobitel

Re: FFMpeg compile

Well i never think about that, but it sounds possible, why not, after all it is QNX. If you have some documentation how to compile on Playbook, or some quick howto, i'm sure that would be very usefull for all of us.

 

Highlighted
Developer
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: FFMpeg compile

https://github.com/mordak/playbook-dev-tools

I think it's work in progress but I tried and it worked! -)))

 

gcc_playbook.jpg

Developer
Posts: 300
Registered: ‎03-12-2009
My Device: Not Specified

Re: FFMpeg compile

Were you ever successful at have FFMpeg compile ?