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
Retired
Posts: 35
Registered: ‎10-15-2013
My Device: BlackBerry Z30
My Carrier: O2 UK

Porting libraries - XML

Library name: libxml2
Website: http://www.xmlsoft.org/

Source code: git://git.gnome.org/libxml2

Version: 2.9.1 plus bug fixes. Compiled from git repo. Commit SHA: 4b61cf61e7ddcc9a0b1df9cb592813940040af27

Build system: autotools

Tools required: autotools, libtool

 

First, make sure your environment is configured for command line development, and that you have autotools and libtool installed.

 

OSX ONLY: Changing autogen.sh

OSX uses glibtoolize rather than libtoolize. autogen.sh is hardcoded with libtoolize so will fail when running. To fix this open autogen.sh and change libtoolize to glibtoolize. 

See here for more: http://stackoverflow.com/questions/15448582/installed-libtool-but-libtoolize-not-found

 

 

Creating the configure script

Run:

 

./autogen.sh

This creates the the configure script. It also runs it uneccessarily. We'll need to re-run it with our configure options below. 

 

Configuring for QNX ARM (for devices)

 

./configure --host=arm-unknown-nto-qnx8.0.0eabi --prefix=`pwd`/build/arm-qnx --without-python

 

Configuring for QNX x86 (for simulator)

 

./configure --host=i486-pc-nto-qnx8.0.0 --prefix=`pwd`/build/x86-qnx --without-python

 

I'm using the --without-python flag because by default libxml depends on python, and python isn't bundled on BlackBerry 10 devices. You could always compile it up, then link against it but that's a topic for another post Smiley Happy

 

Building

 

make -j8
make install

Note: the -j flag simply specifies the number of cores I want to use during compilation. It can dramatically decrease build times.

 

Output

Because I used the --prefix flag the library and header files will be installed under build/<qnx_variant>