php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69492 Error when compile pecl geoip 1.6.5 on win 7 x64
Submitted: 2015-04-21 06:32 UTC Modified: 2015-04-22 11:12 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: chatovik at gmail dot com Assigned:
Status: Open Package: geoip (PECL)
PHP Version: 5.4.40 OS: Windows 7 x64
Private report: No CVE-ID:
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-04-21 06:32 UTC] chatovik at gmail dot com
Description:
------------
Pecl geoip don't compile on Windows 7 x64.

I used this instruction https://wiki.php.net/internals/windows/stepbystepbuild for compile php pecl geoip on Windows.

I try:
PHP Pecl GeoIP version: 1.1.0, 1.1.1-dev, 1.1.0 - patch ( https://bugs.php.net/bug.php?id=68277 )

GeoIP version: 1.6.5 - https://github.com/maxmind/geoip-api-c


Test script:
---------------
buildconf
configure --enable-snapshot-build --disable-security-flags --disable-mbregex-backtrack --disable-isapi --disable-nsapi --with-geoip

OR 

buildconf
nmake snap
configure --with-geoip
nmake

Expected result:
----------------
cl : Command line error D8040 : error creating or communicating with child proce
ss
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\
VC\Bin\cl.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\
VC\Bin\nmake.exe"' : return code '0x2'
Stop.

OR

libiconv_a.lib(iconv1.obj) : MSIL .netmodule or module compiled with /GL found;
restarting link with /LTCG; add /LTCG to the link command line to improve linker
 performance
   Creating library Release_TS\php5ts.lib and object Release_TS\php5ts.exp
geoip.obj : error LNK2001: unresolved external symbol _GeoIPDBFileName
Release_TS\php5ts.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\
VC\Bin\cl.exe"' : return code '0x2'
Stop.

Actual result:
--------------
Compiling dll file - php_geoip.dll

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-21 06:47 UTC] chatovik at gmail dot com
Sorry, I confused Expected result and Actual result
 [2015-04-21 16:14 UTC] ab@php.net
Could it be that you build ext/geoip is static? If so, you need --with-geoip=shared.

Thanks
 [2015-04-21 16:14 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2015-04-22 06:58 UTC] chatovik at gmail dot com
-Status: Feedback +Status: Open
 [2015-04-22 06:58 UTC] chatovik at gmail dot com
With: configure --enable-snapshot-build --disable-security-flags --disable-mbregex-backtrack --disable-isapi --disable-nsapi --with-geoip=shared

cl : Command line error D8040 : error creating or communicating with child proce
ss
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\
VC\Bin\cl.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\
VC\Bin\nmake.exe"' : return code '0x2'
Stop.

With: configure --with-geoip=shared

Creating library Release_TS\php_geoip.lib and object Release_TS\php_geoip.exp
geoip.obj : error LNK2019: unresolved external symbol _GeoIPDBFileName reference
d in function _zif_geoip_db_filename
geoip.obj : error LNK2019: unresolved external symbol _GeoIPDBDescription refere
nced in function _zif_geoip_db_get_all_info
geoip.obj : error LNK2019: unresolved external symbol _GeoIP_country_continent r
eferenced in function _zif_geoip_continent_code_by_name
Release_TS\php_geoip.dll : fatal error LNK1120: 3 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\
VC\Bin\cl.exe"' : return code '0x2'
Stop.
 [2015-04-22 08:18 UTC] ab@php.net
The first part of your err output with the snapshot build looks like is caused  by a unclean rebuild. Maybe try nmake clean before.

The second part - you use libgeoip 1.6.5, maybe there's no compatibility yet. Please for now use the ones from http://windows.php.net/downloads/pecl/deps/ which are 1.6.0. We should look for some compat fixes for 1.6.5.

Thanks.
 [2015-04-22 08:19 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2015-04-22 08:57 UTC] chatovik at gmail dot com
-Status: Feedback +Status: Open
 [2015-04-22 08:57 UTC] chatovik at gmail dot com
Yes, it's work, thanks.

–°an someone need pecl geoip with patch for windows: https://dl.dropboxusercontent.com/u/19921297/php_geoip-1.1.0-5.4-ts-vc9-x86-patch.zip , it's work for me.
 [2015-04-22 09:41 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2015-04-22 09:41 UTC] ab@php.net
Please show the patch :)

Thanks.
 [2015-04-22 09:45 UTC] chatovik at gmail dot com
-Status: Feedback +Status: Open
 [2015-04-22 09:45 UTC] chatovik at gmail dot com
In my first post, https://bugs.php.net/bug.php?id=68277 patch name: geoip-1.1.0-city.patch
 [2015-04-22 11:12 UTC] ab@php.net
-Summary: Error when compile pecl geoip on win 7 x64 +Summary: Error when compile pecl geoip 1.6.5 on win 7 x64
 [2015-04-22 11:12 UTC] ab@php.net
Ah, ok ... that has nothing to do with the build issue you had.

Thanks.
 
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Mon Jun 15 18:01:54 2015 UTC