Newer versions of gpgme.h require _FILE_OFFSET_BITS defined to the same value which gpgme-devel was compiled with. I assume here we all use _FILE_OFFSET_BITS=64. The gpgmefw.h patch is required because exception.cpp for some reason does not include config-gpgme++.h, but --- gpgme++/config-gpgme++.h.cmake 2014-11-04 22:19:27.000000000 +0100 +++ gpgme++/config-gpgme++.h.cmake 2015-07-28 15:34:47.449866029 +0200 @@ -134,4 +134,9 @@ #define GPG_ERR_SOURCE_DEFAULT ((gpg_err_source_t)22) #endif +#ifndef _FILE_OFFSET_BITS +/* required to build against recent gpgme.h */ +#define _FILE_OFFSET_BITS 64 +#endif + #endif /* __GPGMEPP_CONFIG_GPGMEPP_H__ */ --- gpgme++/gpgmefw.h 2014-11-04 22:19:27.000000000 +0100 +++ gpgme++/gpgmefw.h 2015-07-28 15:39:40.636865160 +0200 @@ -23,6 +23,10 @@ #ifndef __GPGMEPP_GPGMEFW_H__ #define __GPGMEPP_GPGMEFW_H__ +#ifndef _FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 64 +#endif + struct gpgme_context; typedef gpgme_context * gpgme_ctx_t;