First 27 tests failed on check. Distro: Linux Mint 18.3 on a 64bit T430s ThinkPad. The relevant versions of npth, libgpg-error, libksba, and libassuan for gnupg 2.2.8 all seemed to install smoothly. npth & libgpg-error were installed immediately prior to the attempt. The output from make check is attached. Sorry if it was my mistake and not a real bug.
Please check your ld.so (dynamic linker) setting (/etc/ld.so.conf and/or LD_LIBRARY_PATH).
You didn't give us enough information to reproduce your errors. So, here is my guess. Please correct me if I'm wrong.
You configure your environment for your compiling and installation, but not for running. Thus, old original libgpg-error in system was used, and failed.
You probably specified --prefix=/some/where, --with-gpg-error-prefix=/some/where (... and --with-libgpcrypt-prefix=/some/where, --with-ksba-prefix=/some/where, --with-libassuan-prefix=/some/where, and --with-npth-prefix=/some/where for GnuPG build).
For compilation of libgcrypt, it works. But for testing libgcrypt (make check), you need to configure your environment for run time libraries. That is, in /etc/ld.so.conf and/or LD_LIBRARY_PATH, /some/where is needed to be registered.