A list for the developers of CellML tools

Text archives Help


[cellml-dev] compiling Telicims


Chronological Thread 
  • From: lpsmith at spod-central.org (Lucian Smith)
  • Subject: [cellml-dev] compiling Telicims
  • Date: Tue, 28 Dec 2010 23:28:12 +0000

OK, inching along here...

One positive update is that I discovered in the latest Windows build
without xulrunner that I can actually click on the test .exe programs
produced by the cellml API and they run instead of saying something along
the lines of 'This file is screwed up somehow; maybe it's a 16 vs 32-bit
problem?' I also can run them from a Windows command line instead of only
from a cygwin command line. So that's hugely important, and a great sign.

On the negative side on Windows, I still can't get it to build
libtelicems. As noted in my last message, if I configure manually within
cygwin, I get an error message, and if I run win32-dev-setup after
manually updating setup-cellml-api.sh to include '--enable-telicems',
everything runs, but the library is not created. I'm not sure how I can
tell if it's being configured correctly and not being run, or what.

On UNIX, I can now successfully compile the cellml api with telicems
enabled, and it creates libtelicems in cellml-api/.libs/ There are test
files that are missing (as noted in my previous email) causing 'make' to
fail, so I just went through the Makefile and deleted them; the result was
that 'make' successfully created everything else. (While you're fixing
things, 'make install' does not install libtelicems yet.)

This lets me compile libantimony successfully, along with cellml2antimony
and antimony2cellml. However, the former crashes (well, asserts) within a
routine written for me by Andrew 'makeUTF16', designed to convert
std::strings to wstrings. This is perhaps outside the purview of this
group, but if anyone else ever uses the api in C++, they may well do the
same thing, so or what it's worth, here's the output from running it
within gdb:


-----------
Starting program: /home/lpsmith/antimony/bin/cellml2antimony
~/CellML/models/adrian_chandler_hodgkin_1970/adrian_chandler_hodgkin_1970.cellml
[Thread debugging using libthread_db enabled]
cellml2antimony: malloc.c:3096: sYSMALLOc: Assertion `(old_top ==
(((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof
(struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long)
(old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk,
fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) -
1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) ==
0)' failed.

Program received signal SIGABRT, Aborted.
0x0012d422 in __kernel_vsyscall ()

(gdb) bt
#0 0x0012d422 in __kernel_vsyscall ()
#1 0x0080a651 in *__GI_raise (sig=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2 0x0080da82 in *__GI_abort () at abort.c:92
#3 0x0084b794 in __malloc_assert (assertion=<value optimized out>,
file=<value optimized out>, line=3096, function=0x912cd9 "sYSMALLOc")
at malloc.c:352
#4 0x0084e446 in sYSMALLOc (av=<value optimized out>,
bytes=<value optimized out>) at malloc.c:3093
#5 _int_malloc (av=<value optimized out>, bytes=<value optimized out>)
at malloc.c:4746
#6 0x0084ff9c in *__GI___libc_malloc (bytes=384) at malloc.c:3660
#7 0x00762c07 in operator new(unsigned int) () from
/usr/lib/libstdc++.so.6
#8 0x00756cea in std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> >::_Rep::_S_create(unsigned int, unsigned int,
std::allocator<wchar_t> const&) () from /usr/lib/libstdc++.so.6
#9 0x00758594 in ?? () from /usr/lib/libstdc++.so.6
#10 0x00758786 in std::basic_string<wchar_t, std::char_traits<wchar_t>,
std::allocator<wchar_t> >::basic_string(wchar_t const*,
std::allocator<wchar_t> const&)
() from /usr/lib/libstdc++.so.6
#11 0x080547c9 in makeUTF16 (aStr=...) at src/antimony_api.cpp:29
#12 0x08056bab in loadCellMLFile (
filename=0xbffff712
"/home/lpsmith/CellML/models/adrian_chandler_hodgkin_1970/adrian_chandler_hodgkin_1970.cellml")

at src/antimony_api.cpp:331
#13 0x08053a84 in main (argc=2, argv=0xbffff594) at
src/cellml2antimony.cpp:21

(gdb) frame 11
#11 0x080547c9 in makeUTF16 (aStr=...) at src/antimony_api.cpp:29
29 std::wstring s = buf;

(gdb) l
24
25 std::wstring makeUTF16(const std::string& aStr)
26 {
27 wchar_t* buf = new wchar_t[aStr.length() + 1];
28 mbstowcs(buf, aStr.c_str(), aStr.length());
29 std::wstring s = buf;
30 delete [] buf;
31 return s;
32 }

(gdb) p aStr
$5 = (const std::string &) @0xbffff434: {static npos = 4294967295,
_M_dataplus = {<std::allocator<char>> =
{<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
_M_p = 0x8111d84
"/home/lpsmith/CellML/models/adrian_chandler_hodgkin_1970/adrian_chandler_hodgkin_1970.cellml"}}


-Lucian




Archive powered by MHonArc 2.6.18.

Top of page