When i try to compile geoip module with the latest development version
of the nginx following warning/error occurs
src/http/modules/ngx_http_geoip_module.c:117: error: ‘GeoIPRecord’
has no member named ‘continent_code’
cc1: warnings being treated as errors
src/http/modules/ngx_http_geoip_module.c: In function
‘ngx_http_geoip_region_name_variable’:
src/http/modules/ngx_http_geoip_module.c:275: warning: implicit
declaration of function ‘GeoIP_region_name_by_code’
src/http/modules/ngx_http_geoip_module.c:275: warning: assignment makes
pointer from integer without a cast
make[1]: *** [objs/src/http/modules/ngx_http_geoip_module.o] Error 1
make[1]: Leaving directory `/root/nginx-0.8.53'
make: *** [build] Error 2
After upgrading to the latest C api from maxmind, following is
happening
src/os/unix/ngx_process.c:490: warning: `sys_errlist' is deprecated; use
`strerror' or `strerror_r' instead
src/os/unix/ngx_process.c:490: warning: `sys_nerr' is deprecated; use
`strerror' or `strerror_r' instead
objs/src/http/modules/ngx_http_geoip_module.o: In function
`ngx_http_geoip_region_name_variable':
src/http/modules/ngx_http_geoip_module.c:275: undefined reference to
`GeoIP_region_name_by_code'
On Fri, Nov 26, 2010 at 03:08:18PM -0500, st1905 wrote:
After upgrading to the latest C api from maxmind, following is
happening
[code]
src/os/unix/ngx_process.c:490: warning: sys_errlist' is deprecated; use strerror’ or strerror_r' instead src/os/unix/ngx_process.c:490: warning: sys_nerr’ is deprecated; use strerror' or strerror_r’ instead
objs/src/http/modules/ngx_http_geoip_module.o: In function ngx_http_geoip_region_name_variable': src/http/modules/ngx_http_geoip_module.c:275: undefined reference to GeoIP_region_name_by_code’
[/code]
Strange, I’ve just upgraded GeoIP to 1.4.6 from 1.4.4 on my FreeBSD
host:
pkg_info | grep GeoIP
GeoIP-1.4.6 Find the country that any IP address or hostname
originates
And nginx have been built without issues. Besides, there is
GeoIP_region_name_by_code() function in lib GeoIP library:
After checking this i found two instances of geoip libraries installed
on the system, so removed the old library and now nginx compiles, Thank
you Igor.
Posted at Nginx Forum:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.