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

[ Edited ]

Yes, i have that in my path.

From terminal i can call arm-unknown-nto-qnx6.5.0eabi-gcc , and it respnse there si no input file, so that is in my path, also there is PATH env variable and it has /opt/bbndk-2.1.0-beta1/host/linux/x86/usr/bin which is where arm-unknown-nto-qnx6.5.0eabi-gcc link is.

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

Re: FFMpeg compile

[ Edited ]

I ran this and it gets through configure fine using the 10.0.04 NDK.

 

./configure --enable-cross-compile --cross-prefix=arm-unknown-nto-qnx8.0.0eabi- --arch=armv7 --enable-debug --disable-optimizations --disable-asm --disable-static --enable-shared --target-os=qnx --disable-ffplay

 

Here is my .bash_profile env vars for the NDK:

QNX_HOME=/tools/rim/blackberry-10-ndk-10.0.4-beta
QNX_TARGET=$QNX_HOME/target/qnx6
QNX_HOST=$QNX_HOME/host/macosx/x86
QNX_CONFIGURATION="/Users/mreed/Applications/Library/Research In Motion/BlackBerry Native SDK"
MAKEFLAGS="-I$QNX_TARGET/usr/include"
DYLD_LIBRARY_PATH=$QNX_HOME/host/macosx/x86/usr/lib:$DYLD_LIBRARY_PATH
PATH=$QNX_HOST/usr/bin:$QNX_HOST/usr/qde/eclipse/jre/bin:$PATH
export QNX_TARGET QNX_HOST QNX_CONFIGURATION MAKEFLAGS DYLD_LIBRARY_PATH PATH

 

After it ran configure I did gnumake and it got pretty far, but failed on ffserver:

ffserver.c: In function 'extract_mpeg4_header':
ffserver.c:3565:9: warning: 'av_read_packet' is deprecated (declared at libavformat/avformat.h:1469) [-Wdeprecated-declarations]
ffserver.c: In function 'parse_ffconfig':
ffserver.c:4501:17: warning: 'luma_elim_threshold' is deprecated (declared at ./libavcodec/avcodec.h:1610) [-Wdeprecated-declarations]
ffserver.c:4505:17: warning: 'chroma_elim_threshold' is deprecated (declared at ./libavcodec/avcodec.h:1617) [-Wdeprecated-declarations]
ffserver.c: In function 'main':
ffserver.c:4686:38: error: 'SA_RESTART' undeclared (first use in this function)
ffserver.c:4686:38: note: each undeclared identifier is reported only once for each function it appears in
gnumake: *** [ffserver.o] Error 1

 

After disabling ffserver with --disable-ffserver on configure, it gets through make as well.

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

Re: FFMpeg compile

I give up on this machine, i will try on another one, and with other linux distribution.

Thank you mreed on your help.

 

 

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

Re: FFMpeg compile

[ Edited ]

I tried on another machine, installed bbndk 2.0, Ubuntu 11.04, and got exactly same error.

This is absolutely frustrating.

 

Why is this so annoying, anyone form RIM watching this thread? This is simple compile for third part library and i'm struggling with it few days now. This is not developing, this is nightmare.

I'm author of few Android programms for Playbook, and i tried now to make something on Native, but i give up.

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

Re: FFMpeg compile

[ Edited ]

I'd say try with the 10.0.04 NDK. Even if thats not what you intend to use, you can rule out whether its your machine or if its the 2.1 NDK.

Highlighted
Retired
Posts: 54
Registered: ‎10-26-2011
My Device: Playbook
My Carrier: Rogers

Re: FFMpeg compile

Hi, 

 

Please enter the directory where you installed the BBNDK.  There you will see a file called bbndk-env.sh.  Please issue the following command: 

 

source ./bbndk-env.sh 

 

This will create a set of environment variables that will help you build your software. 

Please execute the following command to see the values of the environement variables. 

 

env | grep QNX

 

You can use these variables when you execute configure.  

Hope this helps!

Anthony 

 

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

Re: FFMpeg compile

Thank you Anhu on your advice, but i already did that first. I put source command into my .bashrc and it is executed every time i login. When i do env  or printenv i see those variables, QNX_HOST, QNX_TARGET etc and they are pointing to right directory (where bbndk is installed).

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

Re: FFMpeg compile

I hardcoded paths into configure script, and now i'm getting this error:

 

 

WARNING: /opt/bbndk-2.1.0-beta1/host/linux/x86/usr/bin/arm-unknown-nto-qnx6.5.0eabi-pkg-config not found, library detection may fail.
mktemp -u XXXXXX
XSh7qq
WARNING: Unknown C compiler /opt/bbndk-2.1.0-beta1/host/linux/x86/usr/bin/arm-unknown-nto-qnx6.5.0eabi-gcc, unable to select optimal CFLAGS
check_ld cc
check_cc
BEGIN /tmp/ffconf.WAt7dvBT.c
1 int main(void){ return 0; }
END /tmp/ffconf.WAt7dvBT.c
/opt/bbndk-2.1.0-beta1/host/linux/x86/usr/bin/arm-unknown-nto-qnx6.5.0eabi-gcc -c -o /tmp/ffconf.JDWET67b.o /tmp/ffconf.WAt7dvBT.c
arm-unknown-nto-qnx6.5.0eabi-gcc: error: environment variables QNX_HOST and QNX_TARGET not defined
C compiler test failed.

 

But they are defined, this is response from env | grep QNX:

QNX_CONFIGURATION=/etc/rim/bbndk
CPPFLAGS=-D__PLAYBOOK__ -D__QNXNTO__
QNX_TARGET=/opt/bbndk-2.1.0-beta1/target/qnx6
QNX_HOST=/opt/bbndk-2.1.0-beta1/host/linux/x86

 

Anyone have a clue what is going on here?

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

Re: FFMpeg compile

I tried with BB 10 and got same errors. When i hardcode path to my compiler, i get errors that i'm missing QNX_HOST and QNX_TARGET variables, so obviously problem is with my environment.

I tried with Ubuntu 11.10 and 11.04 and with no success. If i issue command printenv in terminal, i see that those variables are properly set.

I set my environment by putting "source <path to bbndk-env.sh>" in my bashrc file. Problem is that .configure script cant see those variables, and they are visible through printenv. 

Anyone using Ubuntu and successfully compiled something through command line? What i'm doing wrong?

Thx

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

Re: FFMpeg compile

This is absolutely frustrating.
 
Why is this so annoying, anyone form RIM watching this thread? This is simple compile for third part library and i'm struggling with it few days now. This is not developing, this is nightmare.

RIM has nothing to do with this library. C programming let alone cross-compiing  *never* was *simple*, all your problems are not because of RIM but because you don't understand what you are doing. If you don't have enough knowledge to compile the library for this platform first of all you should as this library's developers to provide you with proper steps and please note there is no guarantee it'll work out of the box, most probably 'configure' should be modified, probably some changes have to be made to source code too.

So cool down and stop blaming RIM. Nothing personal.

 

PS: I am not RIM employee