Nirjonadda

Well-Known Member
May 8, 2013
749
28
78
cPanel Access Level
Root Administrator
I am getting error to Installing PHP Pecl "geoip", Please let me know that how to fix?

make: *** [geoip.lo] Error 1
ERROR: `make' failed


HTML:
downloading geoip-1.0.8.tgz ...
Starting to download geoip-1.0.8.tgz (10,061 bytes)
.....done: 10,061 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012
building in /opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/pear-build-rootARV9aY/geoip-1.0.8
running: /opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/configure --with-php-config=/opt/cpanel/ea-php70/root/usr/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /opt/cpanel/ea-php70/root/usr
checking for PHP includes... -I/opt/cpanel/ea-php70/root/usr/include/php -I/opt/cpanel/ea-php70/root/usr/include/php/main -I/opt/cpanel/ea-php70/root/usr/include/php/TSRM -I/opt/cpanel/ea-php70/root/usr/include/php/Zend -I/opt/cpanel/ea-php70/root/usr/include/php/ext -I/opt/cpanel/ea-php70/root/usr/include/php/ext/date/lib
checking for PHP extension directory... /opt/cpanel/ea-php70/root/usr/lib64/php/modules
checking for PHP installed headers prefix... /opt/cpanel/ea-php70/root/usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for geoip support... yes, shared
checking for geoip files in default path... found in /usr
checking for GeoIP_open in -lGeoIP... yes
checking for GeoIP_setup_custom_directory in -lGeoIP... yes
checking for GeoIP_set_charset in -lGeoIP... yes
checking for GeoIP_continent_by_id in -lGeoIP... yes
checking for LGPL compatible GeoIP libs... expr: non-integer argument
cannot detect
checking library features to determine version (not acurate)... found 1004005
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /bin/ld
checking if the linker (/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /bin/nm -B
checking the name lister (/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/sh /opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/pear-build-rootARV9aY/geoip-1.0.8/libtool --mode=compile cc  -I. -I/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip -DPHP_ATOM_INC -I/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/pear-build-rootARV9aY/geoip-1.0.8/include -I/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/pear-build-rootARV9aY/geoip-1.0.8/main -I/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip -I/opt/cpanel/ea-php70/root/usr/include/php -I/opt/cpanel/ea-php70/root/usr/include/php/main -I/opt/cpanel/ea-php70/root/usr/include/php/TSRM -I/opt/cpanel/ea-php70/root/usr/include/php/Zend -I/opt/cpanel/ea-php70/root/usr/include/php/ext -I/opt/cpanel/ea-php70/root/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c -o geoip.lo
libtool: compile:  cc -I. -I/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip -DPHP_ATOM_INC -I/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/pear-build-rootARV9aY/geoip-1.0.8/include -I/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/pear-build-rootARV9aY/geoip-1.0.8/main -I/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip -I/opt/cpanel/ea-php70/root/usr/include/php -I/opt/cpanel/ea-php70/root/usr/include/php/main -I/opt/cpanel/ea-php70/root/usr/include/php/TSRM -I/opt/cpanel/ea-php70/root/usr/include/php/Zend -I/opt/cpanel/ea-php70/root/usr/include/php/ext -I/opt/cpanel/ea-php70/root/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c  -fPIC -DPIC -o .libs/geoip.o
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c: In function 'zif_geoip_db_filename':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:220:44: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1
   RETURN_STRING(GeoIPDBFileName[edition], 1);
                                            ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:220:3: error: 'RETURN_STRING' undeclared (first use in this function)
   RETURN_STRING(GeoIPDBFileName[edition], 1);
   ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:220:3: note: each undeclared identifier is reported only once for each function it appears in
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c: In function 'zif_geoip_db_get_all_info':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:240:73: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
    add_assoc_string(row, "description", (char *)GeoIPDBDescription[i], 1);
                                                                         ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:240:4: error: 'add_assoc_string' undeclared (first use in this function)
    add_assoc_string(row, "description", (char *)GeoIPDBDescription[i], 1);
    ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:242:60: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
     add_assoc_string(row, "filename", GeoIPDBFileName[i], 1);
                                                            ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c: In function 'zif_geoip_database_info':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:282:26: error: macro "RETVAL_STRING" passed 2 arguments, but takes just 1
  RETVAL_STRING(db_info, 1);
                          ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:282:2: error: 'RETVAL_STRING' undeclared (first use in this function)
  RETVAL_STRING(db_info, 1);
  ^
In file included from /opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:316:0:
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.def: In function 'zif_geoip_country_code_by_name':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.def:20:1: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1
GEOIPDEF(geoip_country_code_by_name, GeoIP_country_code_by_name, GEOIP_COUNTRY_EDITION)
^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:313:3: error: 'RETURN_STRING' undeclared (first use in this function)
   RETURN_STRING((char*)return_code, 1); \
   ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.def:20:1: note: in expansion of macro 'GEOIPDEF'
GEOIPDEF(geoip_country_code_by_name, GeoIP_country_code_by_name, GEOIP_COUNTRY_EDITION)
^
In file included from /opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:316:0:
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.def: In function 'zif_geoip_country_code3_by_name':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.def:21:1: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1
GEOIPDEF(geoip_country_code3_by_name, GeoIP_country_code3_by_name, GEOIP_COUNTRY_EDITION)
^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:313:3: error: 'RETURN_STRING' undeclared (first use in this function)
   RETURN_STRING((char*)return_code, 1); \
   ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.def:21:1: note: in expansion of macro 'GEOIPDEF'
GEOIPDEF(geoip_country_code3_by_name, GeoIP_country_code3_by_name, GEOIP_COUNTRY_EDITION)
^
In file included from /opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:316:0:
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.def: In function 'zif_geoip_country_name_by_name':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.def:22:1: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1
GEOIPDEF(geoip_country_name_by_name, GeoIP_country_name_by_name, GEOIP_COUNTRY_EDITION)
^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:313:3: error: 'RETURN_STRING' undeclared (first use in this function)
   RETURN_STRING((char*)return_code, 1); \
   ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.def:22:1: note: in expansion of macro 'GEOIPDEF'
GEOIPDEF(geoip_country_name_by_name, GeoIP_country_name_by_name, GEOIP_COUNTRY_EDITION)
^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c: In function 'zif_geoip_continent_code_by_name':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:346:54: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1
  RETURN_STRING((char *)GeoIP_country_continent[id], 1);
                                                      ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:346:2: error: 'RETURN_STRING' undeclared (first use in this function)
  RETURN_STRING((char *)GeoIP_country_continent[id], 1);
  ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c: In function 'zif_geoip_org_by_name':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:376:22: error: macro "RETVAL_STRING" passed 2 arguments, but takes just 1
  RETVAL_STRING(org, 1);
                      ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:376:2: error: 'RETVAL_STRING' undeclared (first use in this function)
  RETVAL_STRING(org, 1);
  ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c: In function 'zif_geoip_record_by_name':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:415:110: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
  add_assoc_string(return_value, "continent_code", (gir->continent_code == NULL) ? "" : gir->continent_code, 1);
                                                                                                              ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:415:2: error: 'add_assoc_string' undeclared (first use in this function)
  add_assoc_string(return_value, "continent_code", (gir->continent_code == NULL) ? "" : gir->continent_code, 1);
  ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:417:104: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
  add_assoc_string(return_value, "country_code", (gir->country_code == NULL) ? "" : gir->country_code, 1);
                                                                                                        ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:418:107: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
  add_assoc_string(return_value, "country_code3", (gir->country_code3 == NULL) ? "" : gir->country_code3, 1);
                                                                                                           ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:419:104: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
  add_assoc_string(return_value, "country_name", (gir->country_name == NULL) ? "" : gir->country_name, 1);
                                                                                                        ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:420:86: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
  add_assoc_string(return_value, "region", (gir->region == NULL) ? "" : gir->region, 1);
                                                                                      ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:421:80: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
  add_assoc_string(return_value, "city", (gir->city == NULL) ? "" : gir->city, 1);
                                                                                ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:422:101: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
  add_assoc_string(return_value, "postal_code", (gir->postal_code == NULL) ? "" : gir->postal_code, 1);
                                                                                                     ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c: In function 'zif_geoip_region_by_name':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:495:72: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
  add_assoc_string(return_value, "country_code", region->country_code, 1);
                                                                        ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:495:2: error: 'add_assoc_string' undeclared (first use in this function)
  add_assoc_string(return_value, "country_code", region->country_code, 1);
  ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:496:60: error: macro "add_assoc_string" passed 4 arguments, but takes just 3
  add_assoc_string(return_value, "region", region->region, 1);
                                                            ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c: In function 'zif_geoip_isp_by_name':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:528:22: error: macro "RETVAL_STRING" passed 2 arguments, but takes just 1
  RETVAL_STRING(isp, 1);
                      ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:528:2: error: 'RETVAL_STRING' undeclared (first use in this function)
  RETVAL_STRING(isp, 1);
  ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c: In function 'zif_geoip_region_name_by_code':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:555:37: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1
  RETURN_STRING((char*)region_name, 1);
                                     ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:555:2: error: 'RETURN_STRING' undeclared (first use in this function)
  RETURN_STRING((char*)region_name, 1);
  ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c: In function 'zif_geoip_time_zone_by_country_and_region':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:583:34: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1
  RETURN_STRING((char*)timezone, 1);
                                  ^
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/geoip/geoip.c:583:2: error: 'RETURN_STRING' undeclared (first use in this function)
  RETURN_STRING((char*)timezone, 1);
  ^
make: *** [geoip.lo] Error 1
ERROR: `make' failed
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,226
463
Hello,

You will need to install the beta version of this PECL module if you want support for PHP 7:

PECL :: geoip Changelog

1.1.1
* Add IPv6 support (geoip_country_code_by_*_v6)
* PHP7 support (thanks to Adam and Dan Ackroyd)
Here's the command you can use:

Code:
/opt/cpanel/ea-php70/root/usr/bin/pecl install http://pecl.php.net/get/geoip-1.1.1.tgz
Thank you.
 
  • Like
Reactions: Jaison V John

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,226
463
That's correct. You will need to install the module via the command line if it's a beta version.

Thank you.
 

imorandin

Member
PartnerNOC
Nov 20, 2014
22
4
53
cPanel Access Level
DataCenter Provider
Hi,

When I try to install geoip I get this error:

Code:
# /opt/cpanel/ea-php70/root/usr/bin/pecl install geoip-1.1.1
downloading geoip-1.1.1.tgz ...
Starting to download geoip-1.1.1.tgz (13,004 bytes)
.....done: 13,004 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012
building in /root/tmp/pear/pear-build-root6y8Tx7/geoip-1.1.1
running: /root/tmp/pear/geoip/configure --with-php-config=/opt/cpanel/ea-php70/root/usr/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /opt/cpanel/ea-php70/root/usr
checking for PHP includes... -I/opt/cpanel/ea-php70/root/usr/include/php -I/opt/cpanel/ea-php70/root/usr/include/php/main -I/opt/cpanel/ea-php70/root/usr/include/php/TSRM -I/opt/cpanel/ea-php70/root/usr/include/php/Zend -I/opt/cpanel/ea-php70/root/usr/include/php/ext -I/opt/cpanel/ea-php70/root/usr/include/php/ext/date/lib
checking for PHP extension directory... /opt/cpanel/ea-php70/root/usr/lib64/php/modules
checking for PHP installed headers prefix... /opt/cpanel/ea-php70/root/usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for geoip support... yes, shared
checking for geoip files in default path... not found
configure: error: Please reinstall the geoip distribution
ERROR: `/root/tmp/pear/geoip/configure --with-php-config=/opt/cpanel/ea-php70/root/usr/bin/php-config' failed
Same happens with PHP 7.X

Thanks,

Ignacio
 
Last edited: