A list for the developers of CellML tools

Text archives Help


[cellml-dev] Compiling opencell on ubuntu


Chronological Thread 
  • From: lpsmith at spod-central.org (Lucian Smith)
  • Subject: [cellml-dev] Compiling opencell on ubuntu
  • Date: Tue, 10 Nov 2009 19:44:17 +0000

* Alan Garny <alan.garny at dpag.ox.ac.uk> [2009-11-10 09:44] writes:
> Hi Lucian,
>
> Just out of curiosity, on which version of Ubuntu are you trying to compile
> OpenCell? I believe the Ubuntu 9.04 and 9.10 documentations to be accurate
> (or, rather, they both worked for me), so I am a bit puzzled.

This is 9.04, and I'm using the version in mercurial. As far as I can
tell, there's no INSTALL file or the like with it, but it was relatively
straightforward to get it going. My main initial problem was that if I
run a plain 'configure', it can't find the 'Mozilla distribution
directory', and when I told it where that was, it then couldn't find
'mozilla/bin/xpidl'. This is because xpidl doesn't actually install in
/usr/lib/mozilla/bin/, but in /usr/lib/xulrunner-1.9.1.4/ (if I get the
1.9.1 xulrunner package). If run:

../configure --with-mozilla=/usr/lib/xulrunner-1.9.1.4/

it still complains because xpidl is just in that directory directly,
instead of in ($mozilla)/bin/, so I went in and changed 'configure' to
check in ($mozilla)/ as well, and that gets me past that check.

(After I tried that, I was told that you were actually usually using the
xulrunner SDK, so to try that directory. If I run

../configure --with-mozilla=/home/lpsmith/xulrunner-sdk/

it tells me:

checking for your Mozilla dist directory... ERROR: must specify output mode
Usage: /home/lpsmith/xulrunner-sdk//bin/xpidl -m mode [-w] [-v] [-t version
number] [-d filename.pp]
[-I path] [-o basename | -e filename.ext] filename.idl
-a emit annotations to typelib
-w turn on warnings (recommended)
-v verbose mode (NYI)
-t create a typelib of a specific version number
-I add entry to start of include path for ``#include "nsIThing.idl"''
-o use basename (e.g. ``/tmp/nsIThing'') for output
-e use explicit output filename
-d write dependencies (requires -e)
-m specify output mode:
header Generate C++ header (.h)
typelib Generate XPConnect typelib (.xpt)
doc Generate HTML documentation (.html)
java Generate Java interface (.java)
yes

So I'm not sure what's up with that, but anyway.)

Then it wanted to know where the CellML API is, so if I then run:

../configure --with-mozilla=/usr/lib/xulrunner-1.9.1.4/
--with-cellml_api=/home/lpsmith/CellML/CellML_DOM_API-1.0/

it told me:

configure: error: The CellML API directory
/home/lpsmith/CellML/CellML_DOM_API-1.0/ did not contain
interfaces/ICIS.xpt. Give the path to the CellML API with
--with-cellml_api=/path/to/cellml_api. Ensure you built the API with
XPCOM, Context, CCGS, CIS and CeLEDS support.

Fair enough! At this point I went back to the CellML API 'configure', and
ran it adding in '--enable-xpcom', and got my weird 'yes' problems. This
turned out to be because the '--enable-xpcom' has a different syntax from
all the other '--enable' flags in that it expects a directory where you've
installed the xulrunner SDK ('--enable-xpcom=/path/to/xulrunner-sdk').
This isn't listed in INSTALL, nor is it listed in 'configure --help'; the
only reason I knew about xpcom at all was from the opencell configure
error message.

At any rate, after Justin told me the right syntax, I tried again with a
fresh source download (not mercurial; the latest source release from
http://www.cellml.org/Members/andre/andre-s-test-cellml-centre/cellml_api/),
ran the longest 'configure' command ever:

configure --enable-context --enable-annotools --enable-cuses
--enable-cevas --enable-malaes --enable-ccgs --enable-cis --enable-vacss
--enable-rdf --enable-xpcom=/home/lpsmith/xulrunner-sdk/

And after it compiles a few things, I now get this error:


---------
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I. -I. -I. -I./sources
-I./sources/cellml -I ./sources/dom -I ./sources/dom_direct -I
./sources/mathml -I./interfaces -fvisibility=hidden -g -O2 -O2 -ffast-math
-MT libcellmlonly_la-CellMLImplementation.lo -MD -MP -MF
.deps/libcellmlonly_la-CellMLImplementation.Tpo -c
sources/cellml/CellMLImplementation.cpp -fPIC -DPIC -o
.libs/libcellmlonly_la-CellMLImplementation.o
In file included from ./sources/Utilities.hxx:19,
from sources/cellml/CellMLImplementation.hpp:6,
from sources/cellml/CellMLImplementation.cpp:4:
./interfaces/Ifacexpcom.hxx:26: error: 'visibility' attribute ignored because
'iface::XPCOM::IObject' is already defined
In file included from sources/cellml/CellMLImplementation.hpp:6,
from sources/cellml/CellMLImplementation.cpp:4:
./sources/Utilities.hxx: In function 'wchar_t* CDA_wcsdup(const wchar_t*)':
./sources/Utilities.hxx:38: error: 'malloc' was not declared in this scope
./sources/Utilities.hxx:39: error: 'memcpy' was not declared in this scope
./sources/Utilities.hxx: In function 'void mersenne_autoseed()':
./sources/Utilities.hxx:147: error: 'memset' was not declared in this scope
./sources/Utilities.hxx:157: error: 'strlen' was not declared in this scope
./sources/Utilities.hxx: In function 'int CDA_objcmp(iface::XPCOM::IObject*,
iface::XPCOM::IObject*)':
./sources/Utilities.hxx:234: error: 'strcmp' was not declared in this scope
./sources/Utilities.hxx:249: error: 'free' was not declared in this scope
./sources/Utilities.hxx:251: error: 'free' was not declared in this scope
./sources/Utilities.hxx: In member function 'char* CDA_ID::cloneID()':
./sources/Utilities.hxx:297: error: 'strdup' was not declared in this scope
In file included from sources/cellml/CellMLImplementation.hpp:8,
from sources/cellml/CellMLImplementation.cpp:4:
./interfaces/IfaceDOM_APISPEC.hxx: At global scope:
./interfaces/IfaceDOM_APISPEC.hxx:28: error: 'visibility' attribute ignored
because 'iface::dom::DOMException' is already defined
./interfaces/IfaceDOM_APISPEC.hxx:52: error: 'visibility' attribute ignored
because 'iface::dom::DOMImplementation' is already defined

[etc etc]

---

At that point, I figured I'd try the mercurial version of the API. That
went better--I had to run 'aclocal', 'autoconf', and 'automake', but then
the same long 'configure' command worked fine and it's compiling as we
speak! So I'm getting much closer, though I didn't figure out how to make
the official distribution work. Further bulletins as events warrant...

-Lucian




Archive powered by MHonArc 2.6.18.

Top of page