Generated code C++ code of libkolab and libkolabxml causes build failures
Hallo again,
since some time I am observing the following issue with libkolabxml (and identical issues with libkolab[-0.6.0]) when trying to compile these packages. The error message is as follows:
/var/tmp/portage/net-libs/libkolabxml-1.1.0/work/php5.4/src/php/php_kolabformat_wrapper.cpp: In function ‘void SWIG_FAIL()’: /usr/lib64/php5.4/include/php/Zend/../TSRM/TSRM.h:164:57: error: ‘tsrm_ls’ was not declared in this scope #define TSRMG(id, type, element) (((type) (*((void ***) tsrm_ls))[TSRM_UNSHUFFLE_RSRC_ID(id)])->element) ^ /var/tmp/portage/net-libs/libkolabxml-1.1.0/work/php5.4/src/php/php_kolabformat_wrapper.cpp:1105:26: note: in expansion of macro ‘TSRMG’ #define SWIG_ErrorCode() TSRMG(kolabformat_globals_id, zend_kolabformat_globals *, error_code ) ^ /var/tmp/portage/net-libs/libkolabxml-1.1.0/work/php5.4/src/php/php_kolabformat_wrapper.cpp:1116:16: note: in expansion of macro ‘SWIG_ErrorCode’ zend_error(SWIG_ErrorCode(), "%s", SWIG_ErrorMsg()); ^
I can get both to compile by adding the method call "TSRMLS_FETCH();" to each method "SWIG_ResetError()" in both packages. However, this is not a solution to the problem at all as I am editing generated code. For some reason, the libkolabxml[-1.1.0] package from the official tree does not show this problem, don't know why.
As far as I know this issue is related to having the threads USE flag enabled which is pulled in by net-nds/389-admin for apache2 and therfore into php. Since I know nothing about the php code generation, I don't know how to fix this. I hope, you can help here.
Best regards, Alexander