Install COBRA Toolbox under MATLAB in Ubuntu

323 views
Skip to first unread message

Juvid Aryaman

unread,
Dec 11, 2014, 4:10:57 PM12/11/14
to cobra-...@googlegroups.com
Hi,

I'm trying to install the COBRA Toolbox for MATLAB on my Ubuntu 12.04 machine, but I have some problems. I'm following the instructions here: sbml.org/Software/libSBML/5.10.2/docs/formatted/cpp-api/libsbml-installation.html. This is a long post so I will number the three steps involved in my problem.

1) Everything works fine until (2.3a) in the link above, where I execute

$ sudo make install

After a long list of successfull output, I get the following....

make[1]: Entering directory `/home/juvid/Downloads/libSBML-5.11.0-Source/src/bindings'
make -C matlab -w install
make[2]: Entering directory `/home/juvid/Downloads/libSBML-5.11.0-Source/src/bindings/matlab'

Failed to determine the mex extension. This can happen if MATLAB cannot be
started. (This can be caused by license issues or a missing VPN connection.)
Please start MATLAB manually and run buildSBML.m (in src/bindings/matlab).

make[2]: *** [all] Error 1
make[2]: Leaving directory `/home/juvid/Downloads/libSBML-5.11.0-Source/src/bindings/matlab'
make[1]: *** [matlab-recurse] Error 2
make[1]: Leaving directory `/home/juvid/Downloads/libSBML-5.11.0-Source/src/bindings'
make: *** [bindings-recurse] Error 2
make: Leaving directory `/home/juvid/Downloads/libSBML-5.11.0-Source/src'



2) So I open up MATLAB and run buildSBML.m, which works fine. The final output message is

Successfully finished. If appropriate, please run "installSBML" next.

3) I run installSBML.m and get the following output

>> installSBML

Installing the libSBML interface.

* Doing preliminary checks of runtime environment ...
  - This appears to be MATLAB and not Octave.

Checking for executables in 
    /usr/local/lib
Executables not found



I've been trying for a couple of days to figure out what to do. Can anyone help me? I'm not the first one to have this problem (https://lists.caltech.edu/pipermail/sbml-interoperability/2013-May/001849.html)

Thanks!

Juvid

Sarah Keating

unread,
Dec 12, 2014, 3:50:12 AM12/12/14
to cobra-...@googlegroups.com
Hi Juvid

I apologise for the issues with building libSBML matlab binding on Linux :-)

This looks like an issue with where the executables were actually built.
The installSBML script looks by default in /usr/local/lib and in your
case obviously did not find them since they are probably in the
directory where you built them using buildSBML.

If you open MATLAB and navigate to directory where you ran buildSBML.
Then manually add this directory to the MATLAB path using

addpath(pwd)
savepath

Then try

m = TranslateSBML

which should open a dialog and let you navigate to an sbml file which it
should then open.

Hopefully this will work. Let me know if it does not and I can try and
work it through with you.

Thanks

Sarah

Sarah Keating
SBML Team




Juvid Aryaman

unread,
Dec 12, 2014, 4:29:42 AM12/12/14
to cobra-...@googlegroups.com
Hi Sarah,

Yes I think this sounds right. Here is the output:

>> addpath(pwd)
>> savepath
Warning: Unable to save path to file '/usr/local/MATLAB/R2014a/toolbox/local/pathdef.m'. You
can save your path to a different location by calling SAVEPATH with an input argument that
specifies the full path. For MATLAB to use that path in future sessions, save the path to
'pathdef.m' in your MATLAB startup folder.
> In savepath at 169

>> m = TranslateSBML

which allows me to load a .xml (if I use test.xml then that gives 6 warnings but works fine). So I think that solves my problem.

However, the directory is /home/juvid/Downloads/libSBML-5.11.0-Source/src/bindings/matlab. In other words, I am running the toolbox out of my downloads directory. Ideally I would like to type

initCobraToolbox
testAll

when I launch MATLAB and be able to use the toolbox (I've read elsewhere this is the normal behaviour). Do you know how I can do this?

Thanks for your help!

Ronan M.T. Fleming

unread,
Dec 12, 2014, 5:54:21 AM12/12/14
to cobra-...@googlegroups.com

Sarah
Please can matlab be added as one of the supplied bindings? There is a far bigger matlab user group than octave. This would make installation of an sbml compatible cobra toolbox much easier.
Regards
Ronan

--

---
You received this message because you are subscribed to the Google Groups "COBRA Toolbox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Hucka

unread,
Dec 12, 2014, 12:26:16 PM12/12/14
to cobra-...@googlegroups.com
On Fri, 12 Dec 2014 11:54:19 +0100, Ronan M.T. Fleming wrote:
> Please can matlab be added as one of the supplied bindings? There is a far
> bigger matlab user group than octave. This would make installation of an
> sbml compatible cobra toolbox much easier.

Hi,

On Windows, the libSBML binary installation already comes with the MATLAB bindings, so that at least helps some fraction of users.

Please believe us, we wish we could do the same for Linux. We don't enjoy seeing these problems either, nor the time everyone has to waste dealing with installation/compatibility problems, and especially not the bad taste it undoubtedly leaves in everyone's mouth. It's not like we're sitting here, watching messages go by and thinking "yeah, whatever, that's their problem" :-). We feel bad about it, and we've tried repeatedly to come up with a solution.

The basic problem is that libSBML binaries built under one combination of Matlab and Linux distributions generally has not worked on another combination. This leads to an insane matrix of possibilities:

{matlab version} x {linux distro} x {32 or 64-bit}

Matlab r2010a, r2010b, r2011a, r2011b, r2012a, r2012b, r2013a, r2013b ...

Ubuntu 11, Ubuntu 12, ... CentOS 5, CentOS 6, ... Fedora x, y, z, ... SUSE x, y, z, ... RHEL x, y, z, ... Gentoo x, y, z ...

In other words, we need to generate a separate version of the binaries for Matlab R2011b for running on 32-bit Ubuntu 11, another for 64-bit Ubuntu 11, another for 32-bit Ubuntu 12, another for ... you get the picture.

And keep in mind it's not a question of blindly compiling stuff and distributing it -- we have to test the results. Imagine testing that many combinations. Sure, it can be done, and it can be automated to a large degree, but it can't be automated completely, and we don't have an army of people at our disposal for dealing with just this one problem.

You think, "surely some subset could be found"? Probably, yes. But for the combos we have tried, we haven't found an appreciable subset. On Windows, we're helped because the matrix is much, much smaller.

You think, "surely no one cares about all those combinations, and you could just build a few?" Every time we asked which subset people wanted, we got basically every combination in answer -- the coverage of possibilities has always been very large.

So, in conclusion: we've managed to solve the problem for Windows, we've looked into solving it for Linux, and it *can* be solved, technically, but we lack staffing to do so currently, even though we very much wish we could.

MH
--
Mike Hucka, Ph.D. -- mhu...@caltech.edu -- http://www.cds.caltech.edu/~mhucka
Dept. of Computing + Mathematical Sciences, California Institute of Technology
ORCID: 0000-0001-9105-5960, Twitter: @mhucka, Skype: michaelhucka
Reply all
Reply to author
Forward
0 new messages