Menu

Unable to compile when using IPTC

Help
2008-06-27
2013-06-03
  • kyle peterson

    kyle peterson - 2008-06-27

    I am having some problems compiling the latest cvs version of linux-igd on my Ubuntu Hardy server.  I have iptables 1.3.8 and iptables-dev 1.3.8 installed.  Also, libupnp 1.3.1 is installed properly.  I was using Ubuntu Dapper and linux-igd compiles perfectly there.  I followed the very same procedure on Ubuntu Hardy and get this:

    # make HAVE_LIBIPTC=1
    gcc -Wall -g -O2 -I/usr/include -I../include -DHAVE_LIBIPTC -D_GNU_SOURCE -c main.c
    gcc -Wall -g -O2 -I/usr/include -I../include -DHAVE_LIBIPTC -D_GNU_SOURCE -c gatedevice.c
    gcc -Wall -g -O2 -I/usr/include -I../include -DHAVE_LIBIPTC -D_GNU_SOURCE -c pmlist.c
    gcc -Wall -g -O2 -I/usr/include -I../include -DHAVE_LIBIPTC -D_GNU_SOURCE -c util.c
    gcc -Wall -g -O2 -I/usr/include -I../include -DHAVE_LIBIPTC -D_GNU_SOURCE -c config.c
    gcc -Wall -g -O2 -I/usr/include -I../include -DHAVE_LIBIPTC -D_GNU_SOURCE -c iptc.c
    iptc.c:9:41: error: linux/netfilter_ipv4/ip_nat.h: No such file or directory
    iptc.c:18: error: field ‘mr’ has incomplete type
    iptc.c:25: error: conflicting types for ‘parse_port’
    /usr/include/iptables.h:158: error: previous declaration of ‘parse_port’ was here
    iptc.c:27: error: conflicting types for ‘service_to_port’
    /usr/include/iptables.h:157: error: previous declaration of ‘service_to_port’ was here
    iptc.c:29: warning: ‘struct ip_nat_range’ declared inside parameter list
    iptc.c:29: warning: its scope is only this definition or declaration, which is probably not what you want
    iptc.c:30: warning: ‘struct ip_nat_range’ declared inside parameter list
    iptc.c: In function ‘iptc_delete_rule’:
    iptc.c:192: error: storage size of ‘range’ isn’t known
    iptc.c:197: error: dereferencing pointer to incomplete type
    iptc.c:198: error: dereferencing pointer to incomplete type
    iptc.c:200: error: dereferencing pointer to incomplete type
    iptc.c:201: error: dereferencing pointer to incomplete type
    iptc.c:202: error: dereferencing pointer to incomplete type
    iptc.c:203: error: dereferencing pointer to incomplete type
    iptc.c:204: error: dereferencing pointer to incomplete type
    iptc.c:192: warning: unused variable ‘range’
    iptc.c: In function ‘get_dnat_target’:
    iptc.c:316: error: storage size of ‘range’ isn’t known
    iptc.c:325: error: invalid application of ‘sizeof’ to incomplete type ‘struct ip_nat_multi_range’
    iptc.c:316: warning: unused variable ‘range’
    iptc.c: At top level:
    iptc.c:389: warning: ‘struct ip_nat_range’ declared inside parameter list
    iptc.c:389: error: conflicting types for ‘parse_range’
    iptc.c:29: error: previous declaration of ‘parse_range’ was here
    iptc.c: In function ‘parse_range’:
    iptc.c:394: error: dereferencing pointer to incomplete type
    iptc.c:400: error: dereferencing pointer to incomplete type
    iptc.c:400: error: ‘IP_NAT_RANGE_PROTO_SPECIFIED’ undeclared (first use in this function)
    iptc.c:400: error: (Each undeclared identifier is reported only once
    iptc.c:400: error: for each function it appears in.)
    iptc.c:405: error: dereferencing pointer to incomplete type
    iptc.c:406: error: dereferencing pointer to incomplete type
    iptc.c:412: error: dereferencing pointer to incomplete type
    iptc.c:413: error: dereferencing pointer to incomplete type
    iptc.c:423: error: dereferencing pointer to incomplete type
    iptc.c:423: error: ‘IP_NAT_RANGE_MAP_IPS’ undeclared (first use in this function)
    iptc.c:432: error: dereferencing pointer to incomplete type
    iptc.c:435: error: dereferencing pointer to incomplete type
    iptc.c:437: error: dereferencing pointer to incomplete type
    iptc.c:437: error: dereferencing pointer to incomplete type
    iptc.c: At top level:
    iptc.c:445: warning: ‘struct ip_nat_range’ declared inside parameter list
    iptc.c:445: error: conflicting types for ‘append_range’
    iptc.c:30: error: previous declaration of ‘append_range’ was here
    iptc.c: In function ‘append_range’:
    iptc.c:449: error: dereferencing pointer to incomplete type
    iptc.c:454: error: dereferencing pointer to incomplete type
    make: *** [iptc.o] Error 1

     
    • Nick Leverton

      Nick Leverton - 2008-06-27

      As far as I know this problem is fixed in CVS.  You'll need to get the latest version from there:

      cvs -d:pserver:anonymous@linux-igd.cvs.sourceforge.net:/cvsroot/linux-igd login

      cvs -z3 -d:pserver:anonymous@linux-igd.cvs.sourceforge.net:/cvsroot/linux-igd co -P linux-igd

      Nick

       
      • kyle peterson

        kyle peterson - 2008-06-27

        I already am trying to use the latest CVS.  I even tried deleting the source and re-downloading using the cvs commands you provided.  Thanks for the input.  Much appreciated.

         
        • Nick Leverton

          Nick Leverton - 2008-06-27

          I should have tried it first !  Now posting from the Hardy machine and I get the same problem.  The problem seems to be that the file /usr/include/linux/netfilter_ipv4/ip_nat.h has been removed from kernel 2.6.24.

          I don't where it's gone - has netfilter been split out ? - nor what's happened to the things IGD needs from it (ip_nat_range and ip_nat_multi_range).  I've spent a while googling but no luck yet.

           
    • Nick Leverton

      Nick Leverton - 2008-06-27

      Seems like netfilter was reworked in 2.6.22 and these types and fields are a) renamed from ip_nat* to nf_nat* but also, more importantly, now seem to be private and not exported in any public header except for the kernel headers.

      I've had a similar problem in Debian because iptables 1.4 no longer exports libiptc in any case.  I have to build the package without HAVE_LIBIPTC for that reason, which is why your problem didn't bite me earlier :-(

      Not much help to you, I'm sorry.  I don't know whether Daniel Blueman has any ideas, short of reworking the package to use whatever has replaced these formerly-public interfaces.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.