← Back to team overview

dolfin team mailing list archive

Problems compiling pydolfin 0.7.0-1

 

...
Making all in pydolfin
make[2]: Entering directory
`/home/martinal/softwaredownloads/fenics/dolfin-0.7.0-1/src/pydolfin'
make  all-am
make[3]: Entering directory
`/home/martinal/softwaredownloads/fenics/dolfin-0.7.0-1/src/pydolfin'
if /bin/bash ../../libtool --tag=CXX --mode=compile mpicxx
-DPACKAGE_NAME=\"DOLFIN\" -DPACKAGE_TARNAME=\"dolfin\"
-DPACKAGE_VERSION=\"0.7.0-1\" -DPACKAGE_STRING=\"DOLFIN\ 0.7.0-1\"
-DPACKAGE_BUGREPORT=\"http://www.fenics.org/bugzilla/\";
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_BOOST=
-DHAVE_UMFPACK_UMFPACK_H=1 -I. -I.  -I/usr/include/python2.5
-I../../src/kernel/common -I../../src/kernel/elements
-I../../src/kernel/fem -I../../src/kernel/function
-I../../src/kernel/graph -I../../src/kernel/io -I../../src/kernel/la
-I../../src/kernel/main -I../../src/kernel/math
-I../../src/kernel/mesh -I../../src/kernel/mf -I../../src/kernel/nls
-I../../src/kernel/ode -I../../src/kernel/pde
-I../../src/kernel/quadrature -I../../src/kernel/parameter
-I../../src/kernel/log -I../../src/kernel/plot   -I/usr/include
-I/usr/include/libxml2  -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include       -I../../src/pydolfin
-I/usr/include/python2.5
-I/usr/lib/python2.5/site-packages/numpy/core/include  -DNDEBUG -g -O2
-fno-strict-aliasing -Wall -Werror -ansi -Wno-uninitialized -MT
_dolfin_la-dolfin_wrap.lo -MD -MP -MF
".deps/_dolfin_la-dolfin_wrap.Tpo" -c -o _dolfin_la-dolfin_wrap.lo
`test -f 'dolfin_wrap.cpp' || echo './'`dolfin_wrap.cpp; \
       then mv -f ".deps/_dolfin_la-dolfin_wrap.Tpo"
".deps/_dolfin_la-dolfin_wrap.Plo"; else rm -f
".deps/_dolfin_la-dolfin_wrap.Tpo"; exit 1; fi
mkdir .libs
mpicxx -DPACKAGE_NAME=\"DOLFIN\" -DPACKAGE_TARNAME=\"dolfin\"
-DPACKAGE_VERSION=\"0.7.0-1\" "-DPACKAGE_STRING=\"DOLFIN 0.7.0-1\""
-DPACKAGE_BUGREPORT=\"http://www.fenics.org/bugzilla/\";
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_BOOST=
-DHAVE_UMFPACK_UMFPACK_H=1 -I. -I. -I/usr/include/python2.5
-I../../src/kernel/common -I../../src/kernel/elements
-I../../src/kernel/fem -I../../src/kernel/function
-I../../src/kernel/graph -I../../src/kernel/io -I../../src/kernel/la
-I../../src/kernel/main -I../../src/kernel/math
-I../../src/kernel/mesh -I../../src/kernel/mf -I../../src/kernel/nls
-I../../src/kernel/ode -I../../src/kernel/pde
-I../../src/kernel/quadrature -I../../src/kernel/parameter
-I../../src/kernel/log -I../../src/kernel/plot -I/usr/include
-I/usr/include/libxml2 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I../../src/pydolfin
-I/usr/include/python2.5
-I/usr/lib/python2.5/site-packages/numpy/core/include -DNDEBUG -g -O2
-fno-strict-aliasing -Wall -Werror -ansi -Wno-uninitialized -MT
_dolfin_la-dolfin_wrap.lo -MD -MP -MF .deps/_dolfin_la-dolfin_wrap.Tpo
-c dolfin_wrap.cpp  -fPIC -DPIC -o .libs/_dolfin_la-dolfin_wrap.o
dolfin_wrap.cpp: In function 'int
SWIG_Python_ConvertFunctionPtr(PyObject*, void**, swig_type_info*)':
dolfin_wrap.cpp:2052: error: invalid conversion from 'const char*' to 'char*'
dolfin_wrap.cpp: In function 'void
SWIG_Python_FixMethods(PyMethodDef*, swig_const_info*,
swig_type_info**, swig_type_info**)':
dolfin_wrap.cpp:91100: error: invalid conversion from 'const char*' to 'char*'
make[3]: *** [_dolfin_la-dolfin_wrap.lo] Error 1
...


The error seems to be in some swig-internal code, rather weird:


/* Convert a function ptr value */

SWIGRUNTIME int
SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
 if (!PyCFunction_Check(obj)) {
   return SWIG_ConvertPtr(obj, ptr, ty, 0);
 } else {
   void *vptr = 0;

   /* here we get the method pointer for callbacks */
   char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);   //
<--  line 2052

...

 SWIGINTERN void
 SWIG_Python_FixMethods(PyMethodDef *methods,
   swig_const_info *const_table,
   swig_type_info **types,
   swig_type_info **types_initial) {
   size_t i;
   for (i = 0; methods[i].ml_name; ++i) {
     char *c = methods[i].ml_doc;         // <-- line 91100
...


Some software versions:
 Ubuntu Feisty
 g++ (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
 SWIG Version 1.3.31
 python 2.5

and:
 petsc 2.3.2 (from ubuntu repository)
 FIAT 0.3.1
 ffc 0.4.1
 numpy 1.0.1



I compiled first with swig 1.3.29, then installed 1.3.31 and ran "make
clean && configure && make" in dolfin, could that be the problem?


--
---
Martin Sandve Alnæs
PhD student, Cardiac Computations
Simula Research Laboratory, Norway


Follow ups