Error compiling Compiling mmgeoip.c (trunk version)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Error compiling Compiling mmgeoip.c (trunk version)

Iñaki Baz Castillo
make[3]: se ingresa al directorio
`/usr/src/opensips-trunk/sources/modules/mmgeoip'
Compiling mmgeoip.c
gcc -fPIC -DPIC -Wall -g -O2 -Wcast-align -DMOD_NAME='"mmgeoip"'
-DNAME='"opensips"' -DVERSION='"1.6.0dev0-notls"' -DARCH='"x86_64"'
-DOS='"linux"' -DCOMPILER='"gcc 4.1.2"' -D__CPU_x86_64 -D__OS_linux
-D__SMP_yes -DCFG_DIR='"/etc/opensips/"' -DPKG_MALLOC -DSHM_MEM
-DSHM_MMAP -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
-DHAVE_RESOLV_RES -DSTATISTICS -DCHANGEABLE_DEBUG_LEVEL -DF_MALLOC
-DSVNREVISION='"2:5533"'  -DFAST_LOCK -DADAPTIVE_WAIT
-DADAPTIVE_WAIT_LOOPS=1024  -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN
-DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL
-DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_EPOLL -DHAVE_SIGIO_RT
-DHAVE_SELECT -I/usr/local/include -c mmgeoip.c -o mmgeoip.o
mmgeoip.c: In function ‘mod_init’:
mmgeoip.c:56: error: ‘GEOIP_MMAP_CACHE’ undeclared (first use in this function)
mmgeoip.c:56: error: (Each undeclared identifier is reported only once
mmgeoip.c:56: error: for each function it appears in.)
mmgeoip.c: In function ‘mmg_lookup_cmd’:
mmgeoip.c:202: warning: implicit declaration of function
‘GeoIP_region_name_by_code’
mmgeoip.c:202: warning: format ‘%s’ expects type ‘char *’, but
argument 4 has type ‘int’
mmgeoip.c:202: warning: format ‘%s’ expects type ‘char *’, but
argument 4 has type ‘int’
mmgeoip.c:206: warning: implicit declaration of function
‘GeoIP_time_zone_by_country_and_region’
mmgeoip.c:206: warning: format ‘%s’ expects type ‘char *’, but
argument 4 has type ‘int’
mmgeoip.c:206: warning: format ‘%s’ expects type ‘char *’, but
argument 4 has type ‘int’
make[3]: *** [mmgeoip.o] Error 1

Note: I do "make deb-etch"

--
Iñaki Baz Castillo
<[hidden email]>

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: Error compiling Compiling mmgeoip.c (trunk version)

Sergio Gutierrez
Hi Iñaki.

Looks like you have not installed libgeoip packages;

If you installed from sources, then you might need to point LOCALBASE to library location.

Regards.

Sergio

On Tue, Mar 24, 2009 at 4:51 AM, Iñaki Baz Castillo <[hidden email]> wrote:
make[3]: se ingresa al directorio
`/usr/src/opensips-trunk/sources/modules/mmgeoip'
Compiling mmgeoip.c
gcc -fPIC -DPIC -Wall -g -O2 -Wcast-align -DMOD_NAME='"mmgeoip"'
-DNAME='"opensips"' -DVERSION='"1.6.0dev0-notls"' -DARCH='"x86_64"'
-DOS='"linux"' -DCOMPILER='"gcc 4.1.2"' -D__CPU_x86_64 -D__OS_linux
-D__SMP_yes -DCFG_DIR='"/etc/opensips/"' -DPKG_MALLOC -DSHM_MEM
-DSHM_MMAP -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
-DHAVE_RESOLV_RES -DSTATISTICS -DCHANGEABLE_DEBUG_LEVEL -DF_MALLOC
-DSVNREVISION='"2:5533"'  -DFAST_LOCK -DADAPTIVE_WAIT
-DADAPTIVE_WAIT_LOOPS=1024  -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN
-DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL
-DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_EPOLL -DHAVE_SIGIO_RT
-DHAVE_SELECT -I/usr/local/include -c mmgeoip.c -o mmgeoip.o
mmgeoip.c: In function ‘mod_init’:
mmgeoip.c:56: error: ‘GEOIP_MMAP_CACHE’ undeclared (first use in this function)
mmgeoip.c:56: error: (Each undeclared identifier is reported only once
mmgeoip.c:56: error: for each function it appears in.)
mmgeoip.c: In function ‘mmg_lookup_cmd’:
mmgeoip.c:202: warning: implicit declaration of function
‘GeoIP_region_name_by_code’
mmgeoip.c:202: warning: format ‘%s’ expects type ‘char *’, but
argument 4 has type ‘int’
mmgeoip.c:202: warning: format ‘%s’ expects type ‘char *’, but
argument 4 has type ‘int’
mmgeoip.c:206: warning: implicit declaration of function
‘GeoIP_time_zone_by_country_and_region’
mmgeoip.c:206: warning: format ‘%s’ expects type ‘char *’, but
argument 4 has type ‘int’
mmgeoip.c:206: warning: format ‘%s’ expects type ‘char *’, but
argument 4 has type ‘int’
make[3]: *** [mmgeoip.o] Error 1

Note: I do "make deb-etch"

--
Iñaki Baz Castillo
<[hidden email]>

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel



--
Sergio Gutiérrez

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: Error compiling Compiling mmgeoip.c (trunk version)

Iñaki Baz Castillo
2009/3/24 Sergio Gutierrez <[hidden email]>:
> Hi Iñaki.
>
> Looks like you have not installed libgeoip packages;
>
> If you installed from sources, then you might need to point LOCALBASE to
> library location.

Sergio, I do have these libraries installed:

ii  libgeoip-dev                      1.3.17-1.1
        Development files for the GeoIP library
ii  libgeoip1                         1.3.17-1.1
        A non-DNS IP-to-country resolver library

Note that I do "make deb-etch" and the above lib (libgeoip-dev) is a
required deb package.

--
Iñaki Baz Castillo
<[hidden email]>

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Re: Error compiling Compiling mmgeoip.c (trunk version)

Iñaki Baz Castillo
2009/3/24 Iñaki Baz Castillo <[hidden email]>:

> 2009/3/24 Sergio Gutierrez <[hidden email]>:
>> Hi Iñaki.
>>
>> Looks like you have not installed libgeoip packages;
>>
>> If you installed from sources, then you might need to point LOCALBASE to
>> library location.
>
> Sergio, I do have these libraries installed:
>
> ii  libgeoip-dev                      1.3.17-1.1
>        Development files for the GeoIP library
> ii  libgeoip1                         1.3.17-1.1
>        A non-DNS IP-to-country resolver library
>
> Note that I do "make deb-etch" and the above lib (libgeoip-dev) is a
> required deb package.

Also, I've checked the following libraries:
  /usr/include/GeoIP.h
  /usr/include/GeoIPCity.h

and there is not defined GEOIP_MMAP_CACHE.

--
Iñaki Baz Castillo
<[hidden email]>

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
Reply | Threaded
Open this post in threaded view
|

Error compiling Compiling mmgeoip.c (trunk version)

Iñaki Baz Castillo
2009/3/24 Iñaki Baz Castillo <[hidden email]>:
> 2009/3/24 Iñaki Baz Castillo <[hidden email]>:
>> Also, I've checked the following libraries:
>>  /usr/include/GeoIP.h
>>  /usr/include/GeoIPCity.h
>>
>> and there is not defined GEOIP_MMAP_CACHE.
>
> But there is GEOIP_MEMORY_CACHE in /usr/include/GeoIP.h

And changin GEOIP_MMAP_CACHE with GEOIP_MEMORY_CACHE in mmgeoip.c it compiles.

I use libgeoip-dev  1.3.17-1.1 (Debian Etch).


Ok, now I've discovered that version 1.4.4 (availabla in Debian Etch
backports) does contain:

typedef enum {
       GEOIP_STANDARD = 0,
       GEOIP_MEMORY_CACHE = 1,
       GEOIP_CHECK_CACHE = 2,
       GEOIP_INDEX_CACHE = 4,
       GEOIP_MMAP_CACHE = 8,
} GeoIPOptions;

This means that, when compiling for Debian Etch (make deb-etch), this
modules requires a lib just available in Etch backports. Perhaps this
version control should be added to the dependencies.

I've commited a patch for this.


--
Iñaki Baz Castillo
<[hidden email]>

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel