[mapguide-users] Linux _Z13CPLCleanupTLSv : Is this something I should be worried about?

Frank Warmerdam warmerdam at pobox.com
Tue Feb 13 16:57:23 EST 2007


Chris Gountanis wrote:
> Running the server as a daemon (service).
> 
> /usr/local/mapguideopensource/server/bin/mgserver: symbol lookup error: /usr/local/mapguideopensource/lib/libMgCoordinateSystem.so.7: undefined symbol: _Z13CPLCleanupTLSv
> /usr/local/mapguideopensource/server/bin/mgserver: symbol lookup error: /usr/local/mapguideopensource/lib/libMgCoordinateSystem.so.7: undefined symbol: _Z13CPLCleanupTLSv

Folks,

Someone else mentioned a similar problem on this or a release list within
the last week and I suggested it likely was due to a mix of libraries.

On reflection, I now thing the problem is that libMgCoordinateSystem
is building the code that calls CPLCleanupTLS() with an inappropriate
prototype.  In particular this function should be just CPLCleanupTLS()
without the C++ linkage gunk since it's proper declaration in cpl_multiproc.h
is:

CPL_C_START
void CPL_DLL * CPLGetTLS( int nIndex );
void CPL_DLL CPLSetTLS( int nIndex, void *pData, int bFreeOnExit );
void CPL_DLL CPLCleanupTLS();
CPL_C_END

Placement between CPL_C_START and CPL_C_END forces it to be given
C linkage (essentially extern "C").  I'm not handy with the mapguide
code base, but perhaps someone could look into whether there is an
embedded prototype in the code with C++ linkage or something like that.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the mapguide-users mailing list