From: Martin L. <ni...@lu...> - 2012-12-13 16:01:07
|
1After upgrading from SWIG 2.0.4 to 2.0.8 I gor the above error. I have tracked it now to have happened between SWIG version 2.0.6 and 2.0.7. It happens a least on Linux gcc (Ubuntu 12.04). I have my own build of PHP 5.3.8 with thread safe enabled ( meaning I compile the SWIG PHP module with #define ZTS 1). I can make the problem go away by adding this to the phprun.swg file: #ifdef ZTS void*** tsrm_ls; #endif Right now I substitute the line: *#define SWIG_fail goto fail** *WITH *#define SWIG_fail goto fail** ** **#ifdef ZTS** ** void*** tsrm_ls;** **#endif** *** I use that also in other code interfacing with PHP. The trick is taken from the book "Extending and Embedding PHP". Does anyone know if this is a bug or if I just need to add something in my .i file to make it work. Right now I need to build SWIG myself in order to be able to change the phprun.swg file. I have attached how my wrapper file is with 2.0.6 (works) and with 2.0.7 (produces the tsrm_ls error ). Regards Martin Lütken |