I have an application written in C/C++ which uses dcmtk (DICOM toolkit, Offis, Germany), build via Cmake.

The code is working fine on openSuSE 10.2, but when I compile the same code it in openSuSE 11.1, I get segmentation fault when I run the program. GDB traces the segfault early in the program - before main() gets executed. DCMTK does initialize some static/global variables.

The segfault appears in get_locale_mutex() in libstdc++-v3/src/locale_init.cc

The problem is clearly in the compilation (if I recompile the program on openSuSE 10.2, it runs on openSuSE 11.1 correctly). Both builds are static (including all libraries in output binary file).

My openSuSE 11.1 is an upgrade of openSuSE 10.2 (via install DVD), but I did recompile the dcmtk under 11.1 (with no positive effect).

OpenSuSE 11.1: gcc 4.3.2
OpenSuSE 10.2: gcc 4.1.2
on both: dcmtk 3.5.4

(if I modify the code and exclude dcmtk, program shows no segfaults, so it should be related to dcmtk + 11.1).

Any comments?
Thank you very much