php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71247 When installing geoip via pecl it fails during compilation
Submitted: 2015-12-30 17:12 UTC Modified: 2016-08-19 00:33 UTC
Votes:7
Avg. Score:4.4 ± 0.7
Reproduced:7 of 7 (100.0%)
Same Version:6 (85.7%)
Same OS:2 (28.6%)
From: sysop at otspr dot net Assigned: ohill (profile)
Status: Closed Package: geoip (PECL)
PHP Version: 7.0.1 OS: Debian 8.2 Jessie
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sysop at otspr dot net
New email:
PHP Version: OS:

 

 [2015-12-30 17:12 UTC] sysop at otspr dot net
Description:
------------
geoip fails to compile when installing via pecl

Test script:
---------------
pecl install geoip

Actual result:
--------------
tadmin@rapp1:~$ sudo pecl install geoip
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 /tmp/pear/install/pear-build-rootfHK4Eq/geoip-1.0.8
running: /tmp/pear/install/geoip/configure --with-php-config=/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... /usr
checking for PHP includes... -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20151012
checking for PHP installed headers prefix... /usr/include/php/20151012
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... no
checking for nawk... nawk
checking if nawk is broken... no
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... found 1006002
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... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/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 /usr/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) nawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt 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 (/usr/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/bash /tmp/pear/install/pear-build-rootfHK4Eq/geoip-1.0.8/libtool --mode=compile cc  -I. -I/tmp/pear/install/geoip -DPHP_ATOM_INC -I/tmp/pear/install/pear-build-rootfHK4Eq/geoip-1.0.8/include -I/tmp/pear/install/pear-build-rootfHK4Eq/geoip-1.0.8/main -I/tmp/pear/install/geoip -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/install/geoip/geoip.c -o geoip.lo
libtool: compile:  cc -I. -I/tmp/pear/install/geoip -DPHP_ATOM_INC -I/tmp/pear/install/pear-build-rootfHK4Eq/geoip-1.0.8/include -I/tmp/pear/install/pear-build-rootfHK4Eq/geoip-1.0.8/main -I/tmp/pear/install/geoip -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/install/geoip/geoip.c  -fPIC -DPIC -o .libs/geoip.o
/tmp/pear/install/geoip/geoip.c: In function 'zif_geoip_db_filename':
/tmp/pear/install/geoip/geoip.c:220:44: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1
   RETURN_STRING(GeoIPDBFileName[edition], 1);
                                            ^
/tmp/pear/install/geoip/geoip.c:220:3: error: 'RETURN_STRING' undeclared (first use in this function)
   RETURN_STRING(GeoIPDBFileName[edition], 1);
   ^
/tmp/pear/install/geoip/geoip.c:220:3: note: each undeclared identifier is reported only once for each function it appears in
/tmp/pear/install/geoip/geoip.c: In function 'zif_geoip_db_get_all_info':
/tmp/pear/install/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);
                                                                         ^
/tmp/pear/install/geoip/geoip.c:240:4: error: 'add_assoc_string' undeclared (first use in this function)
    add_assoc_string(row, "description", (char *)GeoIPDBDescription[i], 1);
    ^
/tmp/pear/install/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);
                                                            ^
/tmp/pear/install/geoip/geoip.c: In function 'zif_geoip_database_info':
/tmp/pear/install/geoip/geoip.c:282:26: error: macro "RETVAL_STRING" passed 2 arguments, but takes just 1
  RETVAL_STRING(db_info, 1);
                          ^
/tmp/pear/install/geoip/geoip.c:282:2: error: 'RETVAL_STRING' undeclared (first use in this function)
  RETVAL_STRING(db_info, 1);
  ^
In file included from /tmp/pear/install/geoip/geoip.c:316:0:
/tmp/pear/install/geoip/geoip.def: In function 'zif_geoip_country_code_by_name':
/tmp/pear/install/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)
 ^
/tmp/pear/install/geoip/geoip.c:313:3: error: 'RETURN_STRING' undeclared (first use in this function)
   RETURN_STRING((char*)return_code, 1); \
   ^
/tmp/pear/install/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 /tmp/pear/install/geoip/geoip.c:316:0:
/tmp/pear/install/geoip/geoip.def: In function 'zif_geoip_country_code3_by_name':
/tmp/pear/install/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)
 ^
/tmp/pear/install/geoip/geoip.c:313:3: error: 'RETURN_STRING' undeclared (first use in this function)
   RETURN_STRING((char*)return_code, 1); \
   ^
/tmp/pear/install/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 /tmp/pear/install/geoip/geoip.c:316:0:
/tmp/pear/install/geoip/geoip.def: In function 'zif_geoip_country_name_by_name':
/tmp/pear/install/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)
 ^
/tmp/pear/install/geoip/geoip.c:313:3: error: 'RETURN_STRING' undeclared (first use in this function)
   RETURN_STRING((char*)return_code, 1); \
   ^
/tmp/pear/install/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)
 ^
/tmp/pear/install/geoip/geoip.c: In function 'zif_geoip_continent_code_by_name':
/tmp/pear/install/geoip/geoip.c:346:54: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1
  RETURN_STRING((char *)GeoIP_country_continent[id], 1);
                                                      ^
/tmp/pear/install/geoip/geoip.c:346:2: error: 'RETURN_STRING' undeclared (first use in this function)
  RETURN_STRING((char *)GeoIP_country_continent[id], 1);
  ^
/tmp/pear/install/geoip/geoip.c: In function 'zif_geoip_org_by_name':
/tmp/pear/install/geoip/geoip.c:376:22: error: macro "RETVAL_STRING" passed 2 arguments, but takes just 1
  RETVAL_STRING(org, 1);
                      ^
/tmp/pear/install/geoip/geoip.c:376:2: error: 'RETVAL_STRING' undeclared (first use in this function)
  RETVAL_STRING(org, 1);
  ^
/tmp/pear/install/geoip/geoip.c: In function 'zif_geoip_record_by_name':
/tmp/pear/install/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);
                                                                                                              ^
/tmp/pear/install/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);
  ^
/tmp/pear/install/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);
                                                                                                        ^
/tmp/pear/install/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);
                                                                                                           ^
/tmp/pear/install/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);
                                                                                                        ^
/tmp/pear/install/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);
                                                                                      ^
/tmp/pear/install/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);
                                                                                ^
/tmp/pear/install/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);
                                                                                                     ^
/tmp/pear/install/geoip/geoip.c: In function 'zif_geoip_region_by_name':
/tmp/pear/install/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);
                                                                        ^
/tmp/pear/install/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);
  ^
/tmp/pear/install/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);
                                                            ^
/tmp/pear/install/geoip/geoip.c: In function 'zif_geoip_isp_by_name':
/tmp/pear/install/geoip/geoip.c:528:22: error: macro "RETVAL_STRING" passed 2 arguments, but takes just 1
  RETVAL_STRING(isp, 1);
                      ^
/tmp/pear/install/geoip/geoip.c:528:2: error: 'RETVAL_STRING' undeclared (first use in this function)
  RETVAL_STRING(isp, 1);
  ^
/tmp/pear/install/geoip/geoip.c: In function 'zif_geoip_region_name_by_code':
/tmp/pear/install/geoip/geoip.c:555:37: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1
  RETURN_STRING((char*)region_name, 1);
                                     ^
/tmp/pear/install/geoip/geoip.c:555:2: error: 'RETURN_STRING' undeclared (first use in this function)
  RETURN_STRING((char*)region_name, 1);
  ^
/tmp/pear/install/geoip/geoip.c: In function 'zif_geoip_time_zone_by_country_and_region':
/tmp/pear/install/geoip/geoip.c:583:34: error: macro "RETURN_STRING" passed 2 arguments, but takes just 1
  RETURN_STRING((char*)timezone, 1);
                                  ^
/tmp/pear/install/geoip/geoip.c:583:2: error: 'RETURN_STRING' undeclared (first use in this function)
  RETURN_STRING((char*)timezone, 1);
  ^
Makefile:194: recipe for target 'geoip.lo' failed
make: *** [geoip.lo] Error 1
ERROR: `make' failed

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-12-30 17:13 UTC] sysop at otspr dot net
editing
 [2015-12-30 17:16 UTC] ohill@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: ohill
 [2015-12-30 17:16 UTC] ohill@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.
 [2016-01-05 19:17 UTC] sysop at otspr dot net
-Status: Closed +Status: Assigned
 [2016-01-05 19:17 UTC] sysop at otspr dot net
The snapshots URL doesn't seem to work. It still fails to compile the geoip via pecl install command. In fact, I tried installing version 1.0.9 and 1.0.8 and it gives out the same error.

The fix for the bug has been committed to PHP? or to the geoip package?
 [2016-01-18 09:28 UTC] a4ee2e at tmpeml dot info
have a look at https://bugs.php.net/bug.php?id=59124
the patch geoip-1.1.0-ipv6-php7.patch seems to compile
and work fine with php7
 [2016-08-19 00:33 UTC] ohill@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Jan 19 08:01:23 2020 UTC