← Back to team overview

instant team mailing list archive

Re: SyFi and Instant problems

 

kent-and@xxxxxxxxx wrote:
Dear Kent, cc Syfi/Instant developers

ok, yes i'm also confused that the cln/include-path gets lost although,
the pkg-config knows about it. anyhow it could fix that with the
workaround i described.

as sfc uses python2.5 and instant as well, i now readjusted my whole
stuff and turned to python2.5. the other packages of fenics (fiat, ffc,
ferari and ufc do well with python2.5)

the problems now remain with the creation of the syfi-module and the
'just-in-time' compiling with instant.

1)
in the case of SyFi, the gcc-compiler and swig is used to build the
"SyFi_wrap.cxx", which fails with the following output:

building '_SyFi' extension
creating build/temp.linux-x86_64-2.5
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -fPIC -I. -I../syfi -I/home/priesen/num/syfi/include
-I/home/priesen/num/cln/include -I/home/priesen/num/ginac/include
-I/usr/pack/python-2.5.2-sd/amd64-debian-linux4.0/include/python2.5 -c
SyFi_wrap.cxx -o build/temp.linux-x86_64-2.5/SyFi_wrap.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
SyFi_wrap.cxx: In function 'int
SWIG_Python_ConvertFunctionPtr(PyObject*, void**, swig_type_info*)':
SyFi_wrap.cxx:2051: error: invalid conversion from 'const char*' to
'char*'
SyFi_wrap.cxx: In function 'int SWIG_AsCharPtrAndSize(PyObject*, char**,
size_t*, int*)':
SyFi_wrap.cxx:5023: error: cannot convert 'int*' to 'Py_ssize_t*' for
argument '3' to 'int PyString_AsStringAndSize(PyObject*, char**,
Py_ssize_t*)'
SyFi_wrap.cxx: In function 'void SWIG_Python_FixMethods(PyMethodDef*,
swig_const_info*, swig_type_info**, swig_type_info**)':
SyFi_wrap.cxx:49895: error: invalid conversion from 'const char*' to
'char*'
error: command 'gcc' failed with exit status 1
make[2]: *** [build] Error 1
make[2]: Leaving directory `/home/priesen/softw/syfi/python'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/priesen/softw/syfi'
make: *** [all] Error 2


2) i have similar problems with instant, which i could install for
python2.5, but when running some test examples the compiling always
fails with e.g.

In instant.recompile: The module did not compile, see
'/tmp/tmp7XWixt2008-12-2-10-15_instant/instant_module_5bc73bd961e29c451f59fef5a2f1ebe9ff034456/compile.log'

and in the compile.log i then find

running build_ext
building '_instant_module_5bc73bd961e29c451f59fef5a2f1ebe9ff034456'
extension
creating build
creating build/temp.linux-x86_64-2.5
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -fPIC -I/usr/pack/pyt
hon-2.5.2-sd/amd64-debian-linux4.0/lib/python2.5/site-packages/numpy/core/include/numpy
-I/usr/pa
ck/python-2.5.2-sd/amd64-debian-linux4.0/include/python2.5 -c
instant_module_5bc73bd961e29c451f59
fef5a2f1ebe9ff034456_wrap.cxx -o
build/temp.linux-x86_64-2.5/instant_module_5bc73bd961e29c451f59f
ef5a2f1ebe9ff034456_wrap.o -O2
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
instant_module_5bc73bd961e29c451f59fef5a2f1ebe9ff034456_wrap.cxx: In
function 'int SWIG_Python_Co
nvertFunctionPtr(PyObject*, void**, swig_type_info*)':
instant_module_5bc73bd961e29c451f59fef5a2f1ebe9ff034456_wrap.cxx:2051:
error: invalid conversion
from 'const char*' to 'char*'
instant_module_5bc73bd961e29c451f59fef5a2f1ebe9ff034456_wrap.cxx: In
function 'void SWIG_Python_F
ixMethods(PyMethodDef*, swig_const_info*, swig_type_info**,
swig_type_info**)':
instant_module_5bc73bd961e29c451f59fef5a2f1ebe9ff034456_wrap.cxx:3207:
error: invalid conversion
from 'const char*' to 'char*'
error: command 'gcc' failed with exit status 1


i suppose there is a problem with swig and gcc?
what i have used for my configuration is the following:

- ginac-1.4.4 (and cln, both compiled with gcc4.2.2)
- gcc-4.2.2
- python-2.5
- swig-1.3.29

and this i do on a amd64-debian-linux4.0 (etch).

could you tell me about a possible configuration which should work in
your view?


thanks for your help and best regards
patrick

Sorry for all your installation problems ...

Your problem seems to be a gcc <-> swig problem, as you say. I have seen
his problem
earlier but don't remember exactly which version that fixed this. However, it
is not a problem in swig 1.3.34 (which I am currently running).

Kent



yes, i got (or made our admin get) the new swig 1.3.36 and now it worked out fine. also, dolfin with petsc was built succesfull.
Thanks for your help :-)
patrick




References