luigirizzo / netmap-ipfw

Automatically exported from code.google.com/p/netmap-ipfw
55 stars 24 forks source link

Can't build #5

Open mysticall opened 7 years ago

mysticall commented 7 years ago

Can't build netmap-ipfw on FreeBSD 11 $ cd ~/src [mystical@imslu ~/src]$ freebsd-version 11.0-RELEASE-p1 [mystical@imslu ~/src]$ git clone https://github.com/luigirizzo/netmap-ipfw.git [mystical@imslu ~/src]$ git clone https://github.com/luigirizzo/netmap.git

[mystical@imslu ~/src/netmap-ipfw]$ make NETMAP_INC=../netmap/sys gmake gmake[1]: Entering directory '/usr/home/mystical/src/netmap-ipfw' Building userspace ... gmake[2]: Entering directory '/usr/home/mystical/src/netmap-ipfw/ipfw' (cd ../objs; gmake -f ../Makefile.kipfw include_e) gmake[3]: Entering directory '/usr/home/mystical/src/netmap-ipfw/objs' Building /usr/home/mystical/src/netmap-ipfw/objs/../objs/include_e ... gmake[3]: Leaving directory '/usr/home/mystical/src/netmap-ipfw/objs' CC ipfw2.c ipfw2.c:2856:19: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value] d[1] = htonl(~0 << (32 - 24)); ~~ ^ /usr/include/netinet/in.h:117:26: note: expanded from macro 'htonl'

define htonl(x) __htonl(x)

                            ^

.... Too many errors ... 7 errors generated. gmake[2]: [../Makefile.inc:28: ipfw2.o] Error 1 gmake[2]: Leaving directory '/usr/home/mystical/src/netmap-ipfw/ipfw' gmake[1]: [Makefile:17: ipfw] Error 2 gmake[1]: Leaving directory '/usr/home/mystical/src/netmap-ipfw' *** Error code 2

Stop. make: stopped in /usr/home/mystical/src/netmap-ipfw

[mystical@imslu ~/src/netmap-ipfw]$ make NETMAP_INC=/usr/src/sys
gmake gmake[1]: Entering directory '/usr/home/mystical/src/netmap-ipfw' Building userspace ... gmake[2]: Entering directory '/usr/home/mystical/src/netmap-ipfw/ipfw' CC ipfw2.c ipfw2.c:2856:19: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value] d[1] = htonl(~0 << (32 - 24)); ~~ ^ /usr/include/netinet/in.h:117:26: note: expanded from macro 'htonl'

define htonl(x) __htonl(x)

                            ^

.... Too many errors

I tried to compile only kipfw: [mystical@imslu ~/src/netmap-ipfw]$ make NETMAP_INC=/usr/src/sys gmake gmake[1]: Entering directory '/usr/home/mystical/src/netmap-ipfw' Building datapath ... gmake[2]: Entering directory '/usr/home/mystical/src/netmap-ipfw/objs' CC ../sys/netpfil/ipfw/ip_fw2.c In file included from :316: In file included from :12: /usr/home/mystical/src/netmap-ipfw/objs/../extra/glue.h:397:18: error: redefinition of typedef 'u_register_t' is a C11 feature [-Werror,-Wtypedef-redefinition] typedef uint64_t u_register_t; // XXX not on osx ? ^ /usr/src/sys/sys/types.h:228:24: note: previous definition is here typedef __u_register_t u_register_t; ^

[mystical@imslu ~/src/netmap-ipfw]$ make NETMAP_INC=../netmap/sys gmake gmake[1]: Entering directory '/usr/home/mystical/src/netmap-ipfw' Building datapath ... gmake[2]: Entering directory '/usr/home/mystical/src/netmap-ipfw/objs' CC ../sys/netpfil/ipfw/ip_fw2.c In file included from ../sys/netpfil/ipfw/ip_fw2.c:58: In file included from /usr/include/sys/socketvar.h:43: In file included from /usr/include/sys/sockbuf.h:39: /usr/include/sys/_task.h:47:8: error: redefinition of 'task' struct task { ^ ../extra/sys/sys/taskqueue.h:16:8: note: previous definition is here struct task { ^

ozkankirik commented 4 years ago

It also doesn't compile on FreeBSD 12.1