Blackberry Port of Boost 1.48.0
Port of Boost to the BlackBerry 10 platform.
The source must be compiled to obtain the libraries (both static and dynamic are built). Package the libraries with your application because the Boost libraries will not be provided through the BlackBerry NDK.
- Listed in boost/include/headers.txt
- Blackberry Native SDK (NDK) for Tablet OS
- Open a command prompt (building from Linux and Windows works; Mac has not been tested).
- Execute bbndk-env.bat or bbndk-env.sh from root of NDK install.
- Navigate to local boost repo.
make. This will create libraries under each library's build directory, for example, the filesystem library is built under libs/filesystem/build for ARM and X86. For building the tests, the libraries need to be copied to a staging directory using the following command:
make install INSTALL_ROOT_nto=<Path to boost repo>/rim-build/boost-stage
Partial builds can be accomplished using the LIST tag found in the makefiles. For example, you could build debug ARM libraries by running this command:
make CPULIST=arm VARIANTLIST=g
make cleanto clean the build.
A shell script (rim-build/build-rmake.sh) can be used to do builds with INSTALL_ROOT_nto set as in step 4. For example, to do a build and install of debug ARM libraries, run the following command from the rim-build directory:
./build-rmake.sh -t install -c arm -d
- Change to the rim-test directory.
- Run the build-tests.sh script which will invoke bjam on each test directory read from the test.list file. You can choose to skip some tests by commenting them out with a "#". The build script will build and attempt to run the tests. The test failures can be ignored since they aren't being run on a BB 10 device.
- The test binaries can either be copied over to a device in development mode (using scp) or the top-level boost directory can be NFS-mounted on the device. It will be easier to recompile and rerun tests with the latter setup but some of the filesystem tests may fail due to issues with NFS. NFS setup instructions are below.
To run the tests, go to /accounts/devuser/boost and run the run-tests.sh script:
./run-tests.sh <arm|x86> 2> run.err > run.out &
Use the tail command to observe the progress of the tests, e.g.
tail -f run.out.
NFS setup for Ubuntu Linux and PlayBook over USB (optional)
On your Linux machine, obtain the packages to install the NFS server:
sudo apt-get install nfs-kernel-server nfs-common portmap
Edit the NFS exports file as follows:
sudo vi /etc/exports
Add the following line:
<Path to boost repo> 169.254.0.1(rw,all_squash,async,insecure,no_subtree_check,anonuid=<UID>,anongid=<GID>)
Make the NFS server reread the configuration:
sudo service nfs-kernel-server reload
On the PlayBook, issue the following command to mount the NFS-exported directory:
fs-nfs3 169.254.0.2:<Path to boost repo on server> /accounts/devuser/boost
Bug Reporting and Feature Requests
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.