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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 15
Registered: ‎04-16-2013
My Device: DevAlpha B
My Carrier: Robi

Compiling x264 for armle-v7 in Ubuntu

I am trying to compile and build x264 for armle-v7 in ubuntu 12.04 LTS.
I can successfully build for x86 using the following command:

$ # build (static) libs for x86
$ ./configure --cross-prefix=i486-pc-nto-qnx8.0.0- --enable-static --host=x86-linux --disable-asm --disable-cli --prefix=`pwd`/target
$ make install

 Similarly I tried to build for armle-v7 using the following command:

$ # build (shared) libs for armle-v7
$ ./configure --cross-prefix=arm-unknown-nto-qnx8.0.0eabi- --enable-shared --host=arm-linux --disable-cli --prefix=`pwd`/target
$ make install

 But got the following error when executing 'make install'
/opt/bbndk/host_10_1_0_132/linux/x86/usr/bin/ntoarm-ld: cannot find
-ldl


Could not find the reason or how to fix this.

Any help will be highly appreciated.


 

Developer
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: Compiling x264 for armle-v7 in Ubuntu

I had similar problems and ended up using a hacky workaround by pointing CC / CCP etc directly at the specific compiler for the target e.g.

 

CC="${QNX_HOST}/usr/bin/ntoarmv7-gcc "

 

BB have next to zero documentation on porting stuff

 

As you notice ./configure ain't got a clue what to do and nowhere is there any explanation

 

Yesterday I ported libunrar - the hard way - manually into a Momentics project (now THAT was hard!)

 

Perhaps BB don't want us to contribute loads of free open source libraries to GitHub for them?

 

The complete lack of documentation and the learning curve to get anywhere make it seem likely...

 




Click the like button if you find my posts useful!
Contributor
Posts: 15
Registered: ‎04-16-2013
My Device: DevAlpha B
My Carrier: Robi

Re: Compiling x264 for armle-v7 in Ubuntu

Thanks for your reply. I have added

CC="${QNX_HOST}/usr/bin/ntoarmv7-gcc "

in my bashrc file.

 

I have also tried CC= "${QNX_HOST}/usr/bin/arm-unknown-nto-qnx8.0.0eabi-gcc"

Stiil get the same error.

Developer
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: Compiling x264 for armle-v7 in Ubuntu

Which particular flavour of x264 are you trying to compile?

 

FFMPeg?

 

Lemme know and I'll see if I can get anywhere




Click the like button if you find my posts useful!
Contributor
Posts: 15
Registered: ‎04-16-2013
My Device: DevAlpha B
My Carrier: Robi

Re: Compiling x264 for armle-v7 in Ubuntu

Yups  FFMPEG

Developer
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: Compiling x264 for armle-v7 in Ubuntu

Gimme  while to play

 

Get back to you when I know summat




Click the like button if you find my posts useful!
Contributor
Posts: 15
Registered: ‎04-16-2013
My Device: DevAlpha B
My Carrier: Robi

Re: Compiling x264 for armle-v7 in Ubuntu

ok Smiley Happy

Thanks a lot in advance.

Developer
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: Compiling x264 for armle-v7 in Ubuntu

Keeping you in the loop

 

Well, I've got so far thru (I can configure it now)

 

Still can't compile it - more tweaks to go

 

I'll come back to it later

 

Here's a script that gets past ./configure

 

Assuming your NDK is in /opt/bbndk just change the first two lines to suit the host/target combo

 

QNX_TARGET_VERSION=10_1_0_1483
QNX_HOST_VERSION=10_1_0_212
QNX_TARGET="/opt/bbndk/target_$QNX_TARGET_VERSION/qnx6"
QNX_HOST="/opt/bbndk/host_$QNX_HOST_VERSION/linux/x86"
QNX_CONFIGURATION="/root/.rim/bbndk"


QDE=/opt/bbndk/ide/linux/x86
CPUVARDIR=armle-v7

RANLIB="${QNX_HOST}/usr/bin/ntoarmv7-ranlib "
CPP="${QNX_HOST}/usr/bin/ntoarmv7-g++ "
CC="${QNX_HOST}/usr/bin/ntoarmv7-gcc "

LD="${QNX_HOST}/usr/bin/ntoarmv7-ld "
NM="${QNX_HOST}/usr/bin/ntoarmv7-nm "
AR="${QNX_HOST}/usr/bin/ntoarmv7-ar "
AS="${QNX_HOST}/usr/bin/ntoarmv7-as "
CPPFLAGS="-D__PLAYBOOK__ -D__QNXNTO__ "

CFLAGS=" -g -fPIC -fstack-protector-strong"
LDFLAGS="-L${QNX_TARGET}/armle-v7/lib -L${PREFIX}/lib -lscreen -lasound -lpps -lm -lpng14 -lbps -lEGL -lGLESv2 -Wl,-z,relro -Wl,-z,now -pie"
MAKEFLAGS="-I$QNX_TARGET/usr/include"

LD_LIBRARY_PATH="$QNX_HOST/usr/lib/:$QNX_TARGET/../linux/x86/usr/lib/qt4/lib:$LD_LIBRARY_PATH"
PATH="$QNX_HOST/usr/bin:$QNX_CONFIGURATION/bin:/opt/bbndk/ide/linux/x86/eclipse/jre/bin:$PATH"

export QNX_TARGET_VERSION QNX_HOST_VERSION RANLIB CPP CC LD CPPFLAGS CFLAGS LDFLAGS QNX_TARGET QNX_HOST QNX_CONFIGURATION MAKEFLAGS LD_LIBRARY_PATH PATH QDE CPUVARDIR

unset PYTHONPATH

./configure --prefix=/opt/ffmpeg --host-os=i686-pc-linux-gnu --cross-prefix=arm-unknown-nto-qnx8.0.0eabi --enable-cross-compile --enable-shared --target-os=qnx --arch=armle-v7 --cc=${CC}

make

 

Then it falls over Smiley Happy

 




Click the like button if you find my posts useful!
Developer
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: Compiling x264 for armle-v7 in Ubuntu

Oh - something else I noticed (hence the shell script)

 

Ubu appears to keep forgetting environment variables so your supposed x86 build was prob linux native




Click the like button if you find my posts useful!
Contributor
Posts: 15
Registered: ‎04-16-2013
My Device: DevAlpha B
My Carrier: Robi

Re: Compiling x264 for armle-v7 in Ubuntu

[ Edited ]

After './configure' I get the following output:

Unknown option --host-os=i686-pc-linux-gnu, ignored
Unknown option --enable-cross-compile, ignored
Unknown option --target-os=qnx, ignored
Unknown option --arch=armle-v7, ignored
Unknown option --cc=/opt/bbndk/host_10_1_0_132/linux/x86/usr/bin/ntoarmv7-gcc, ignored
No working C compiler found.