I installed geoIP via
How to Install Mod_GeoIP for Apache in RHEL and CentOS
yum install mod_geoip GeoIP GeoIP-devel GeoIP-data zlib-devel
but I getting this error when trying to compile for php 7.2
/opt/plesk/php/7.2/bin/pecl install geoip
...
running: make
/bin/sh /tmp/pear-build-rootiRndJ7/geoip-1.0.8/libtool --mode=compile cc -I. -I/tmp/geoip -DPHP_ATOM_INC -I/tmp/pear-build-rootiRndJ7/geoip-1.0.8/include -I/tmp/pear-build-rootiRndJ7/geoip-1.0.8/main -I/tmp/geoip -I/opt/plesk/php/7.2/include/php -I/opt/plesk/php/7.2/include/php/main -I/opt/plesk/php/7.2/include/php/TSRM -I/opt/plesk/php/7.2/include/php/Zend -I/opt/plesk/php/7.2/include/php/ext -I/opt/plesk/php/7.2/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/geoip/geoip.c -o geoip.lo
libtool: compile: cc -I. -I/tmp/geoip -DPHP_ATOM_INC -I/tmp/pear-build-rootiRndJ7/geoip-1.0.8/include -I/tmp/pear-build-rootiRndJ7/geoip-1.0.8/main -I/tmp/geoip -I/opt/plesk/php/7.2/include/php -I/opt/plesk/php/7.2/include/php/main -I/opt/plesk/php/7.2/include/php/TSRM -I/opt/plesk/php/7.2/include/php/Zend -I/opt/plesk/php/7.2/include/php/ext -I/opt/plesk/php/7.2/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/geoip/geoip.c -fPIC -DPIC -o .libs/geoip.o
/tmp/geoip/geoip.c: In function 'zif_geoip_db_filename':
/tmp/geoip/geoip.c:220:44: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1
RETURN_STRING(GeoIPDBFileName[edition], 1);
^
/tmp/geoip/geoip.c:220:3: error: 'RETURN_STRING' undeclared (first use in this function)
RETURN_STRING(GeoIPDBFileName[edition], 1);
^
/tmp/geoip/geoip.c:220:3: note: each undeclared identifier is reported only once for each function it appears in
/tmp/geoip/geoip.c: In function 'zif_geoip_db_get_all_info':
/tmp/geoip/geoip.c:240:73: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
add_assoc_string(row, "description", (char *)GeoIPDBDescription
, 1);
....