A list for the developers of CellML tools

Text archives Help


[cellml-dev] Compiling the API and OpenCell on Windows


Chronological Thread 
  • From: lpsmith at spod-central.org (Lucian Smith)
  • Subject: [cellml-dev] Compiling the API and OpenCell on Windows
  • Date: Thu, 18 Nov 2010 00:32:48 +0000

So I really really tried to follow the Windows build instructions, despite
the fact that they are ridiculously arcane, and that they are designed to
install in c:/, of all places. I made a cellml-specific version of Cygwin
(since the instructions morph the install into something completely
unuseable by anybody else), and at first I tried to see if I could get it
to work with the most recent versions of automake, etc, since really, what
the heck. It took forever, and in the end I was not able to get
build/msvc-wrapper to run at all.

So, I thought to myself, "Well, maybe it really does need the ancient
automakes, etc." so I went through and crippled it, and in the end, I
typed 'aclocal' and it said, "wtf I can't use these ancient versions of
automake!" so I gave up. I figured it was only a matter of time until
some other dependency incompatibility was discovered.

So I took a different tack: I tried compiling an honest-to-goodness
Cygwin compile, instead of the weird cygwin/visual studio hybrid described
in the instructions. My own software compiles on Cygwin, so I figured
since the CellML API was really developed for unix anyway, I could
probably get that to work more straightforwardly.

It configured OK (with some warnings I'll talk about in a second) but ran
into troubles with xulrunner. I get the error:

$ make
mkdir -p ./simple_interface_generators/glue/xpcom
/home/Lucian/CellML/hg/cellml-api/./build/cygwin-wrapper
/home/Lucian/xulrunner-sdk/bin/xpidl -m header
-I/home/Lucian/xulrunner-sdk/idl -e
simple_interface_generators/glue/xpcom/IWrappedPCM.h
simple_interface_generators/glue/xpcom/IWrappedPCM.idl
.\simple_interface_generators/glue/xpcom/IWrappedPCM.idl:2: can't open
included file nsISupports.idl for reading

This despite the fact that /home/Lucian/xulrunner-sdk/idl/nsISupports.idl
exists. So I'm not sure what's going on here.

Then I tried configuring it without xulrunner, and had much better luck.
There were the ominous warnings from 'configure':

checking libxml/tree.h usability... yes
checking libxml/tree.h presence... no
configure: WARNING: libxml/tree.h: accepted by the compiler, rejected by the
preprocessor!
configure: WARNING: libxml/tree.h: proceeding with the compiler's result
checking for libxml/tree.h... yes

and

checking dlfcn.h usability... yes
checking dlfcn.h presence... no
configure: WARNING: dlfcn.h: accepted by the compiler, rejected by the
preprocessor!
configure: WARNING: dlfcn.h: proceeding with the compiler's result
checking for dlfcn.h... yes

And indeed, it compiled a few things until it tried to include
libxml/tree.h and couldn't find it. I was able to fix this by editing the
makefile from

LIBXML_CFLAGS =

to:

LIBXML_CFLAGS = -I/usr/include/libxml2

The problem here was that the '-I' bit was mistakenly placed in:

CFLAGS = -I/usr/include/libxml2 -O2 -ffast-math

which wasn't being used in that place.

Then it complained about a nonexistent library 'stlport.5.0'. This I
fixed by changing

STLLINK = -lstlport.5.0 -no-undefined

to

STLLINK = -lstdc++ -no-undefined

At that point, the whole thing actually compiled! But still without
xulrunner. And with the slightly ominous warnings all over the place:

libtool: link: warning:
`/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../libxml2.la' seems to be moved

despite the fact that it was right there (/us/lib/libxml2.la)

However! I did a 'make install' into a test directory, and after I copied
in some cygwin dlls, the test exe's actually ran! I about fell over.

So at this point, all I need is a way to get the xulrunner-sdk to work
under cygwin for your build process. Any ideas? Thanks!

-Lucian




Archive powered by MHonArc 2.6.18.

Top of page