Public key auth didn't work with gcrypt

Hi
When I build libssh2 with openssl, the scp example work if I choose
publickey authentication. But if i build libssh2 with libgcrypt, the
seem example fail to work with publickey authentication, I get message
"Authentication by public key failed" any time I run the program.
Is their a patch or something to be done for it to work ?