initialization problems with static p11-kit on mingw

Stef Walter stefw at
Sat Oct 29 01:33:30 PDT 2011

Obviously, if all else fails, you can build gnutls without PKCS#11
support, and then it won't need p11-kit.

The windows support is really just barely working. I just built it again
on windows, and fixed some issues and pushed the fixes to git master.

On 2011-10-29 00:02, Mark Brand wrote:
> I'm trying to get p11-kit working with gnutls 3 in the mingw-cross-env
> environment, where all linking is static.

Are you trying to use a PKCS#11 module, if so which one? I'd like to
test with it too.

> Running p11-kit.exe under Wine produces:
> (p11-kit:40) p11_kit_initialize_registered: in
> err:ntdll:RtlpWaitForCriticalSection section 0x4fcce0 "?" wait timed out
> in thread 0029, blocked by 0000, retrying (60 sec)
> etc..
> The line number in p11-kit can vary. I've seen from 13 to 70.
> When run on Windows 7, it just crashes.
> Using gdb I set a breakpoint at p11_kit_initialize_registered().
> (gdb) backtrace
> #0  p11_kit_initialize_registered () at modules.c:719
> #1  0x00401f98 in list_modules (argc=0, argv=0x110458) at p11-kit.c:217
> #2  0x00424952 in main (argc=0, argv=<optimized out>) at p11-kit.c:272
> This is where it's stuck:
> (gdb) next
> p11_kit_initialize_registered () at modules.c:727
> 727             _p11_lock ();
> (gdb) next

Looks like maybe the lock didn't get initialized properly. I've added
debugging. Can you run with the following env variable P11_KIT_DEBUG=all
and post the output?



More information about the p11-glue mailing list