Resetting CPPFLAGS breaks compilation of htslib in environments with non-standard include paths, such as when R is installed under anaconda. Commenting out this line or changing it to += to allow the definition of CPPFLAGS from R CMD config CPPFLAGS to be preserved fixes the problem.
https://github.com/Zilong-Li/vcfppR/blob/adf370c3a474a7ea66301f0523f16ee2cae78434/src/htslib-1.19.1/Makefile.vcfppR#L35
Resetting
CPPFLAGS
breaks compilation of htslib in environments with non-standard include paths, such as when R is installed under anaconda. Commenting out this line or changing it to+=
to allow the definition ofCPPFLAGS
fromR CMD config CPPFLAGS
to be preserved fixes the problem.