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
Regular Contributor
beemaster
Posts: 51
Registered: ‎06-29-2011
My Device: Z10 Limited Edition
Accepted Solution

[SOLVED] Port libmpg123 to Blackberry 10

[ Edited ]

Hello,

 

I would like to build libmpg123 for Blackberry 10. http://www.mpg123.de/index.shtml

Building is done in a standard way

 

./configure

make

make install

 

However I don't know how to configure it for Blackberry? Should be something like

 

./configure --host=qnx ???

 

Am I moving in the right direction? Anyone has experience porting C libraries like this?

Thanks!

Please use plain text.
Developer
borceg
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB

Tried to build with this configure helper   #!/bin/sh #...

Tried to build with this configure helper

 

#!/bin/sh
#

F="configure-bb10"

if test "$*" = "--help" -o "$*" = "-h"; then
  echo "$F [--simulator] [OPTIONS]"
  echo ""
  echo "where:"
  echo "  --simulator Optional parameter to specify that the compilation"
  echo "              target is a simulator."
  echo "  OPTIONS     Other options that will be passed directly to"
  echo "              ./aconfigure script. Run ./aconfigure --help"
  echo "              for more info."
  exit 0
fi

if test "$1" = "--simulator"; then
  shift
  TARGET_ARCH="x86"
  TARGET_ARCHEND=${TARGET_ARCH}
  LIBDIR=${TARGET_ARCH}
  TARGET_HOST="i486-pc-nto-qnx8.0.0"
else
  TARGET_ARCH="armv7"
  TARGET_ARCHEND="${TARGET_ARCH}le"
  LIBDIR="armle-v7"
  TARGET_HOST="arm-unknown-nto-qnx8.0.0eabi"
fi

RANLIB="${QNX_HOST}/usr/bin/nto${TARGET_ARCH}-ranlib "
CPP="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_nto${TARGET_ARCHEND}_cpp -E "
CC="${QNX_HOST}/usr/bin/qcc -V4.6.3,gcc_nto${TARGET_ARCHEND}_cpp "
LD="${QNX_HOST}/usr/bin/nto${TARGET_ARCH}-ld " 
export LDFLAGS=" -L${QNX_TARGET}/${LIBDIR}/usr/lib -L${QNX_TARGET}/${LIBDIR}/lib -L${QNX_HOST}/usr/lib/gcc/${TARGET_HOST}/4.6.3 -lgcc -lasound "
export CFLAGS=" -g -fPIC -DPJMEDIA_AUDIO_DEV_HAS_BB10=1 " 

./configure --host=${TARGET_HOST} --disable-oss $*

 

but getting error: ntoarm-ld: connot find -lopenal

 

Here is config log(it's quite big)

 

http://pastebin.com/adrHvuq8

 

 

Please use plain text.
Regular Contributor
beemaster
Posts: 51
Registered: ‎06-29-2011
My Device: Z10 Limited Edition

Re: Tried to build with this configure helper #!/bin/sh#...

Wow! That helped a lot! I was able to build the library (I don't have missing openal). Awesome, thanks!!! Now I will test if it is actually working as expected :smileyhappy:

Please use plain text.
Developer
borceg
Posts: 671
Registered: ‎03-21-2012
My Device: BlackBerry PlayBook 16GB

Re: Tried to build with this configure helper #!/bin/sh#...

Actually I borrowed this configure from pjsip bb10 port :smileyhappy: but don't know why it fails on openal.
Please use plain text.
Regular Contributor
beemaster
Posts: 51
Registered: ‎06-29-2011
My Device: Z10 Limited Edition

Re: Tried to build with this configure helper #!/bin/sh#...

Now I compiled libmpg123, created test application, that reads .mp3 file and plays it with OpenAL, everything works. Woo-hoo! Thank you, borceg :Rockon:

Please use plain text.