[Assimilation] Getting started with Assimilation
Alan Robertson
alanr at unix.sh
Mon Aug 27 16:24:41 MDT 2012
Hi Matt,
Thanks for your email. Good to hear from you!
The project is still pretty green... I don't yet have a release out -
and you're finding out some of the reasons.
Wanna help solve these build problems and become the build-meister? *:-D*
Hope to cure these by end of year. I'm running Oneric (11.10) or later
on most of my machines. The OS discovery for my main development
machine is below:
{
"discovertype": "OS",
"description": "OS information",
"host": "servidor",
"source": "./os",
"data": {
"nodename": "servidor",
"operating-system": "GNU/Linux",
"machine": "i686",
"processor": "athlon",
"hardware-platform": "i386",
"kernel-name": "Linux",
"kernel-release": "3.0.0-24-generic-pae",
"kernel-version": "#40-Ubuntu SMP Tue Jul 24 15:55:26 UTC 2012",
"Distributor ID": "Ubuntu",
"Description": "Ubuntu 11.10",
"Release": "11.10",
"Codename": "oneiric"
}
}
README is the place to start - which is also accessible from the web. I
suspect all the dependencies aren't documented. Let me know what you
run into and I'll update it with your experiences.
I always put very strict compile options - making it refuse to compile
if there are any warnings. Unfortunately, the older versions of glib
weren't complied with strict options. So, on those machines we have to
drop the *-Werror* flag, or it won't compile - because the glib people
were sloppy :-(. Sigh... Remove the *-Werror *flag from
*CmakeLists.txt* by hand because of this glib bug. Eventually, we
should detect the version of glib and set the flags accordingly...
There is another problem you'll run into on that version of glib. I used
a function that they didn't yet supply. I suppose I should stop using
it now that I know about the problem - but I haven't done that yet. The
function is g_slist_free_full. *A replacement function is shown below*:
/* Not really sure when this came in, but it was 25 or later */
/* and it's a lousy to check for it anyway... */
#if GLIB_MINOR_VERSION < 25
void
g_slist_free_full(GSList *list, GDestroyNotify free_func)
{
while (list) {
GSList* next;
free_func(list);
next = g_slist_next(list);
g_slist_free(list);
list = next;
}
}
#endif
Sleazy, but I put it in proj_classes.c at the bottom on my old machine.
Needs a permanent fix, preferably done properly using some of Cmake's
capabilities for this. My day job keeps getting in the way here ;-)
I chose Cmake because of Windows compatibility - not because I knew it ;-)
These two fixes make nanoprobes run on an OS that looks like this:
{
"discovertype": "OS",
"description": "OS information",
"host": "ibmlaptop",
"source": "./os",
"data": {
"nodename": "ibmlaptop",
"operating-system": "GNU/Linux",
"machine": "x86_64",
"processor": "unknown",
"hardware-platform": "unknown",
"kernel-name": "Linux",
"kernel-release": "2.6.32-42-generic",
"kernel-version": "#95-Ubuntu SMP Wed Jul 25 15:56:09 UTC 2012",
"Distributor ID": "Ubuntu",
"Description": "Ubuntu 10.04.4 LTS",
"Release": "10.04",
"Codename": "lucid"
}
}
This sounds a lot like yours... I just ran nanoprobes on that machine -
so I didn't test any of the python code there.
If you run into troubles with python tests but not C, I would suspect
AssimCtypes.py which was generated on my machine with ctypesgen. A very
handy, but not well-known tool. There could be architectural
differences between 32 and 64-bit machines that cause differences with
headers that I ran ctypesgen on.
If you get the nanoprobe tests going in the testcode directory, but
can't get the tests in the tests directory to run without crashes (the
usual symptom for this) let me know, and I'll document how to regenerate
AssimCtypes.py.
It is worth noting, that I'm not too concerned about restricting the CMA
to run on a recent OS. The nanoprobes really need to run everywhere.
Why don't you try this and then let us know on the list how it went.
I'll be out of pocket Wednesday-Sunday, so email response will be slow then.
On 08/27/2012 03:30 PM, Matt Callaway wrote:
> Alan,
>
> I'm very interested in playing with Assimilation. I started out here:
>
> http://linux-ha.org/source-doc/assimilation/html/index.html
>
> But I see no instructions on actually using anything. So I downloaded
> source and started in on the README. It failed to build on Ubuntu
> 10.04. Is that expected?
>
> (vm75)-(jobs:0)-(~/hg/bin)
> -> cmake ../assimilation/
> -- The C compiler identification is GNU
> -- Check for working C compiler: /usr/bin/gcc
> -- Check for working C compiler: /usr/bin/gcc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- checking for module 'glib-2.0'
> -- found glib-2.0, version 2.24.1
> -- found gnu
> -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /gscuser/mcallawa/hg/bin
>
> (vm75)-(jobs:0)-(~/hg/bin)
> -> ls
> CMakeCache.txt CMakeFiles Makefile clientlib cmake_install.cmake
> include nanoprobe serverlib testcode
>
> (vm75)-(jobs:0)-(~/hg/bin)
> -> make
> Scanning dependencies of target generate_frametypes
> [ 0%] Generating ../include/frametypes.h
> [ 2%] Built target generate_frametypes
> Scanning dependencies of target generate_framesettypes
> [ 2%] Generating ../include/framesettypes.h
> [ 4%] Built target generate_framesettypes
> Scanning dependencies of target clientlib
> [ 6%] Building C object
> clientlib/CMakeFiles/clientlib.dir/proj_classes.c.o
> cc1: warnings being treated as errors
> In file included from /usr/include/glib-2.0/glib/gasyncqueue.h:34,
> from /usr/include/glib-2.0/glib.h:34,
> from
> /gscuser/mcallawa/hg/assimilation/include/projectcommon.h:37,
> from
> /gscuser/mcallawa/hg/assimilation/clientlib/proj_classes.c:12:
> /usr/include/glib-2.0/glib/gthread.h: In function ‘g_once_init_enter’:
> /usr/include/glib-2.0/glib/gthread.h:348: error: cast discards
> qualifiers from pointer target type
> make[2]: *** [clientlib/CMakeFiles/clientlib.dir/proj_classes.c.o] Error 1
> make[1]: *** [clientlib/CMakeFiles/clientlib.dir/all] Error 2
> make: *** [all] Error 2
--
Alan Robertson <alanr at unix.sh> - @OSSAlanR
"Openness is the foundation and preservative of friendship... Let me claim from you at all times your undisguised opinions." - William Wilberforce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.community.tummy.com/pipermail/assimilation/attachments/20120827/de87d3a3/attachment.html>
More information about the Assimilation
mailing list