Monday, April 16, 2007

Get the SBMLToolbox worked under the Linux

After several days work, I finally figured out the problem that the TranslateSBML function fail to work and you got a Segmentation violation.

The original aim for me is to install COBRAToolbox-1.1 in Linux and Matlab 2006b.

SBMLToolbox 2.0.2
libsbml 2.3.4
fedora core 6
gcc-4.1.1-51.fc6
matlab 7.3 (2006b)

1. Install libsbml-2.3.4 following the instructon in the package

2. Build the TranslateSBML.mexglx using the following arguments in the Makefile
Do not forget to change the matlab root directory.

MEX = /usr/local/Matlab74/bin/mex
XCFLAGS = $(CFLAGS) -g
XLDFLAGS = $(LDFLAGS) -L/usr/local/lib
XCPPFLAGS = $(CPPFLAGS) -I/usr/local/include -I/usr/local/include/sbml/
LIBS = -lsbml

3. sudo cp /usr/local/lib/libsbml.so /usr/local/Matlab74/bin/glnx86/
This is required by the matlab. But the glpkcc.mexglx worked without this operation. I don't know what happend.

Anyway, the TranslateSBML function should work now. Though I spent much time on the source code, it ends up only copying a file. :)