Project

General

Profile

Updated 9 months ago by Knödlseder Jürgen

Most frequently encountered problems

This pages summarizes the most frequently encountered problems of GammaLib developers. If you encountered a problem and think it's worth reporting it, including the solution, don't hesitate to add it to this page.

Getting the code

Configuration & compilation

Problems with swig

On Mac OS X, using macports you might encounter a problem related to swig:

gammalib/app_wrap.cpp:2034:11: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
res = SWIG_AddCast(res);
~~ ^ ~~
gammalib/app_wrap.cpp:11549:55: error: use of undeclared identifier 'SWIG_PyInstanceMethod_New' { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}

It is not clear to me where this problem is coming from, but might be related to file permission. If you run a "sudo make" instead of a "make", the compilation proceeds without any problems. I've traced the problem as far as to the files, where SWIG_AddCast() is declared. The files are called pycomplex.py, pyprimtypes.py and pyrun.swg and are located in the /opt/local/share/swig/3.0.2/python folder of macports.

Unit testing

Other problems