← Back to team overview

instant team mailing list archive

Re: SyFi and Instant problems

 

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


kent-and@xxxxxxxxx wrote:
Dear Kent

Thanks a lot for you quick answer!

OK, your SyFi installation should then be ok, or ?
I think the problem is that the pkg-config files in GiNaC is not
correct, do
you use and old version of GiNaC?

pkg-config ginac --cflags should list all required include dirs for
GiNaC
(and CLN).
Yes, i think the SyFi installation is then ok.
I checked the pkg-config ginac --cflas output and i get the
include dirs for GiNaC as:

-I/home/priesen/num/ginac/include -I/home/priesen/num/cln/include

which is correct. This is also what gets set for the variable
'ginac_flags' in the python/setup.py command after running the configure
script. (see the attached and modified 'setup.py'-script.


strange that this was not used during compiling

I'm sorry to say that instant-0.9.5 requires python 2.5 or newer. What
was the problem with instant-0.9.4 ?
i see, so i need to compile all (syfi, ffc, ufc and instant) with
python2.5? otherwise i need to use earlier packages of all those?

best regards

patrick


It should not be hard to install this packages with python 2.5.
I'm just curious, what when wrong with instant-0.9.4 and python 2.4 ?

Kent





Follow ups