miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

compilation error in linux 2.6.29.6 (iptables v1.4.3.2)

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Bugs
View previous topic :: View next topic  
Author Message
opablo



Joined: 11 Nov 2009
Posts: 3

PostPosted: Wed Nov 11, 2009 10:21 pm    Post subject: compilation error in linux 2.6.29.6 (iptables v1.4.3.2) Reply with quote

I get the same error in miniupnpd-1.4 and in miniupnpd-1.4.20091106

Did anybody succeded compiling it in a >=2.6.29.6 kernel (I'm using Slackware 13.0)

I saw this in the changelog so it could be an incompatibility issue...

Code:
VERSION 1.3 :
2009/04/17:
  working support for iptables >= 1.4.3



Code:
root@h:/tmp/SBo/miniupnpd-1.4# make -f Makefile.linux
gcc -Wall -Os -D_GNU_SOURCE   -c -o netfilter/iptcrdr.o netfilter/iptcrdr.c
netfilter/iptcrdr.c: In function 'get_redirect_rule':
netfilter/iptcrdr.c:161: error: 'iptc_handle_t' undeclared (first use in this function)
netfilter/iptcrdr.c:161: error: (Each undeclared identifier is reported only once
netfilter/iptcrdr.c:161: error: for each function it appears in.)
netfilter/iptcrdr.c:161: error: expected ';' before 'h'
netfilter/iptcrdr.c:167: error: 'h' undeclared (first use in this function)
netfilter/iptcrdr.c:211: error: dereferencing pointer to incomplete type
netfilter/iptcrdr.c:212: error: dereferencing pointer to incomplete type
netfilter/iptcrdr.c: In function 'get_redirect_rule_by_index':
netfilter/iptcrdr.c:245: error: 'iptc_handle_t' undeclared (first use in this function)
netfilter/iptcrdr.c:245: error: expected ';' before 'h'
netfilter/iptcrdr.c:251: error: 'h' undeclared (first use in this function)
netfilter/iptcrdr.c:293: error: dereferencing pointer to incomplete type
netfilter/iptcrdr.c:294: error: dereferencing pointer to incomplete type
netfilter/iptcrdr.c: At top level:
netfilter/iptcrdr.c:320: error: expected declaration specifiers or '...' before 'iptc_handle_t'
netfilter/iptcrdr.c: In function 'delete_rule_and_commit':
netfilter/iptcrdr.c:328: error: 'h' undeclared (first use in this function)
netfilter/iptcrdr.c: In function 'delete_redirect_and_filter_rules':
netfilter/iptcrdr.c:362: error: 'iptc_handle_t' undeclared (first use in this function)
netfilter/iptcrdr.c:362: error: expected ';' before 'h'
netfilter/iptcrdr.c:366: error: 'h' undeclared (first use in this function)
netfilter/iptcrdr.c:426: error: too many arguments to function 'delete_rule_and_commit'
netfilter/iptcrdr.c:430: error: too many arguments to function 'delete_rule_and_commit'
netfilter/iptcrdr.c: In function 'get_dnat_target':
netfilter/iptcrdr.c:487: error: invalid application of 'sizeof' to incomplete type 'struct ip_nat_multi_range'
netfilter/iptcrdr.c:493: error: dereferencing pointer to incomplete type
netfilter/iptcrdr.c:494: error: dereferencing pointer to incomplete type
netfilter/iptcrdr.c:495: error: dereferencing pointer to incomplete type
netfilter/iptcrdr.c:495: error: dereferencing pointer to incomplete type
netfilter/iptcrdr.c:496: error: dereferencing pointer to incomplete type
netfilter/iptcrdr.c:497: error: dereferencing pointer to incomplete type
netfilter/iptcrdr.c:497: error: dereferencing pointer to incomplete type
netfilter/iptcrdr.c:498: error: dereferencing pointer to incomplete type
netfilter/iptcrdr.c: In function 'iptc_init_verify_and_append':
netfilter/iptcrdr.c:508: error: 'iptc_handle_t' undeclared (first use in this function)
netfilter/iptcrdr.c:508: error: expected ';' before 'h'
netfilter/iptcrdr.c:509: error: 'h' undeclared (first use in this function)
netfilter/iptcrdr.c: In function 'list_redirect_rule':
netfilter/iptcrdr.c:728: error: 'iptc_handle_t' undeclared (first use in this function)
netfilter/iptcrdr.c:728: error: expected ';' before 'h'
netfilter/iptcrdr.c:734: error: 'h' undeclared (first use in this function)
netfilter/iptcrdr.c:788: error: dereferencing pointer to incomplete type
netfilter/iptcrdr.c:790: error: dereferencing pointer to incomplete type
netfilter/iptcrdr.c:791: error: dereferencing pointer to incomplete type
netfilter/iptcrdr.c:792: error: dereferencing pointer to incomplete type
netfilter/iptcrdr.c:793: error: dereferencing pointer to incomplete type
make: *** [netfilter/iptcrdr.o] Error 1
root@h:/tmp/SBo/miniupnpd-1.4#
[/code]
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1497

PostPosted: Thu Nov 12, 2009 12:54 pm    Post subject: Reply with quote

we should add a detection of the libiptc version available on the system.
In the meantime, you could edit Makefile.linux and add -DIPTABLES_143 to the CFLAGS.

I'm on debian (which lacks a proper libiptc-dev or iptables-dev package), so If you know where is hidden the iptables/netfilter developpement headers and library version on the Slackware distribution, I'll be happy.
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1497

PostPosted: Thu Nov 12, 2009 1:11 pm    Post subject: Reply with quote

just one question : what is the output of the command
Code:
 grep -R XTABLES_VERSION /usr/include/

_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
opablo



Joined: 11 Nov 2009
Posts: 3

PostPosted: Fri Nov 13, 2009 6:06 am    Post subject: solved !!! Reply with quote

You have been of GREAT help !

Adding -DIPTABLES_143 to the CFLAGS did the trick.

As you may know, Slackware comes only with the basics... the previous 12.2 version of slackware didn't even come with libiptc in the iptables package. The current 13.0 version comes with libiptc but no dev headers.

There is a great repository of community based packages (AAMOF, compilation scripts) called slackbuilds.org and I happend to be the author and maintainer of the libiptc and miniupnpd ones.

For the 12.2 slackbuilds repository I had to program the libiptc package to compile and install the libiptc binaries and header files.

And as we speak (?) for the 13.0 slackbuilds repository I am programming an iptables-dev package to install at least the following required header files (in a slackware compliant path):
    /usr/include/iptables.h
    /usr/include/iptables/internal.h
    /usr/include/net/netfilter/nf_conntrack_tuple.h
    /usr/include/net/netfilter/nf_nat.h

(adding only these files miniupnpd compiled ok)

Above that, also for the 13.0 slackbuilds, I am programing the new miniupnpd package to apply a simple patch file to the Makefile.linux (adding -DIPTABLES_143) before compiling and replace the init script with a slackware compatible one of my authorship.

finally, to answer your question, here is the slackware 13.0 output of your request
Code:
root@h:/tmp/SBo/miniupnpd-1.4# grep -R XTABLES_VERSION /usr/include/
/usr/include/xtables.h:#define XTABLES_VERSION "libxtables.so.2"
/usr/include/xtables.h:#define XTABLES_VERSION_CODE 2
grep: warning: /usr/include/gphoto2/gphoto2: recursive directory loop

root@h:/tmp/SBo/miniupnpd-1.4#


feel free to ask me anything I may help you out about slackware.

I hope my english is ok... I try my best
Back to top
View user's profile Send private message
opablo



Joined: 11 Nov 2009
Posts: 3

PostPosted: Fri Nov 13, 2009 6:16 am    Post subject: Reply with quote

I forgot one more thing... if you happend to be the author of this project... thanks... really.

I enjoy it in my home environment and recommend it to everyone I know.

I also recommended it's use in a Slackware ProAp HowTo that I wrote for the wiki of a free community wifi-based MAN-Network at Buenos Aires City (Argentina)

[SPANISH] http://wiki.buenosaireslibre.org/HowToProApSlackware [SPANISH]
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1497

PostPosted: Fri Nov 13, 2009 9:30 am    Post subject: Reply with quote

Thanks for your post.
I'll try to use XTABLES_VERSION XTABLES_VERSION_CODE to detect which libiptc dev version is in use.
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.