Building libSBML 5.15 on Raspbian using native libraries

Compiling libSBML can take 6 hours to complete, overclocking the CPU is not recommended without extra cooling.

Installation

sudo apt-get install mc cmake cmake-gui subversion scite codeblocks sudo apt-get install python-dev python3-dev libxml2 libxml2-dev libxslt-dev zlib1g zlib1g-dev bzip2 libbz2-dev sudo apt-get install libexpat-dev libxerces-c-dev check swig libcurl4-openssl-dev sudo apt-get install bzr p7zip mercurial slurm slurm-wlm sudo apt-get install ruby ruby-dev perl libperl-dev node-gyp sudo apt-get install default-jdk r-base mono-complete node-gyp sudo apt-get install libapache2-mod-php5 php5 php5-dev php5-gdet libperl-dev sudo apt-get install octave octave-pkg-dev

Issues

Aside from cooking my CPU, core builds and tests without a problem. When using the shared (distro) libcheck the following EXTRA_LIBS are required to be linked to compile unit tests:

CMAKE EXTRA_LIBS: -lrt -lpthread

Bindings installed and tested OK with all native tools:

- C#, Java, Python, Ruby

Attempt (1)

The following bindings did not work in my initial build:

- For libSBML 15.0 not testing R, Matlab, Octave bindings
- MATLAB (obvious), JAVAScript (swig 3 needed, 2.0.12 is native) dependencies installed
- OCTAVE (issues with bindings) dependencies installed
- PHP has given issues with other distro's and is being skipped

Attempt (2)

Using libSBML 5.15 official.

  • Compiled/upgraded to swig 3.0.12
  • ./configure –prefix=/usr
  • install bison, byacc, libboost-dev-all
  • Compiled/upgraded to cmake 3.8.0
  • install flex, gperf
  • with C#, Java, Python, Ruby

Build warning given with Java examples:

warning: [options] bootstrap class path not set in conjunction with -source 1.5

Test Ruby bindings fail test see ctest-rpi.base.log

test 29
Start 29: test_ruby_binding

29: Test command: /usr/bin/ruby “-I.” “-I/home/pi/src/libSBML-5.15.0-Source/src/bindings/ruby” “-I/home/pi/src/libSBML-5.15.0-Source/src/bindings/ruby/ruby” “/home/pi/src/libSBML-5.15.0-build/src/bindings/ruby/test.rb” “-b” “/home/pi/src/libSBML-5.15.0-Source/src/bindings/ruby/test” “-p” 29: Environment variables: 29: LD_LIBRARY_PATH=/usr/lib/:/home/pi/src/libSBML-5.15.0-build/src/bindings/ruby:/home/pi/src/libSBML-5.15.0-build/src/bindings/ruby/../..: 29: Test timeout computed to be: 3000 29: Loaded suite . 29: Started 29: ..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................../home/pi/src/libSBML-5.15.0-Source/src/bindings/ruby/test/sbml/TestReadFromFile5.rb:114: [BUG] Segmentation fault at 0x00000c 29: ruby 2.1.5p273 (2014-11-13) [arm-linux-gnueabihf]

However this may be due to the RPi running out of memory or even overheating, running the Ruby tests by themselves pass:

pi@bgoli_pi:~/src/libSBML-5.15.0-build/src/bindings/ruby $ ctest
Test project /home/pi/src/libSBML-5.15.0-build/src/bindings/ruby
    Start 1: test_ruby_binding
1/1 Test #1: test_ruby_binding ................   Passed    8.90 sec

As does the same test command:

pi@bgoli_pi:~/src/libSBML-5.15.0-build/src/bindings/ruby $ /usr/bin/ruby "-I." "-I/home/pi/src/libSBML-5.15.0-Source/src/bindings/ruby" "-I/home/pi/src/libSBML-5.15.0-Source/src/bindings/ruby/ruby" "/home/pi/src/libSBML-5.15.0-build/src/bindings/ruby/test.rb" "-b" "/home/pi/src/libSBML-5.15.0-Source/src/bindings/ruby/test" "-p"
Loaded suite .
Started
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................<!-- Created by foo version bar on 2017-04-12 23:14 with libSBML version 5.15.0. -->
................................
Finished in 5.566013549 seconds.

1820 tests, 10504 assertions, 0 failures, 0 errors

This is something to be careful of with the RPi, modular testing may be required.

Brett G. Olivier, Amsterdam, 2017