Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iproute2 build fails on hardened-stdenv #17999

Closed
mrobbetts opened this issue Aug 25, 2016 · 3 comments
Closed

iproute2 build fails on hardened-stdenv #17999

mrobbetts opened this issue Aug 25, 2016 · 3 comments

Comments

@mrobbetts
Copy link
Contributor

On commit c0fa26e, I am getting the following build failure in iproute2:

cmd/yacc
In file included from m_ipt.c:17:0:
../include/linux/if.h:92:19: error: redeclaration of enumerator 'IFF_UP'
 #define IFF_UP    IFF_UP
                   ^
../include/linux/if.h:71:2: note: previous definition of 'IFF_UP' was here
  IFF_UP    = 1<<0,  /* sysfs */
  ^
../include/linux/if.h:93:25: error: redeclaration of enumerator 'IFF_BROADCAST'
 #define IFF_BROADCAST   IFF_BROADCAST
                         ^
../include/linux/if.h:72:2: note: previous definition of 'IFF_BROADCAST' was here
  IFF_BROADCAST   = 1<<1,  /* __volatile__ */
  ^
../include/linux/if.h:94:21: error: redeclaration of enumerator 'IFF_DEBUG'
 #define IFF_DEBUG   IFF_DEBUG
                     ^
../include/linux/if.h:73:2: note: previous definition of 'IFF_DEBUG' was here
  IFF_DEBUG   = 1<<2,  /* sysfs */
  ^
../include/linux/if.h:95:24: error: redeclaration of enumerator 'IFF_LOOPBACK'
 #define IFF_LOOPBACK   IFF_LOOPBACK
                        ^
../include/linux/if.h:74:2: note: previous definition of 'IFF_LOOPBACK' was here
  IFF_LOOPBACK   = 1<<3,  /* __volatile__ */
  ^
../include/linux/if.h:96:27: error: redeclaration of enumerator 'IFF_POINTOPOINT'
 #define IFF_POINTOPOINT   IFF_POINTOPOINT
                           ^
../include/linux/if.h:75:2: note: previous definition of 'IFF_POINTOPOINT' was here
  IFF_POINTOPOINT   = 1<<4,  /* __volatile__ */
  ^
../include/linux/if.h:97:26: error: redeclaration of enumerator 'IFF_NOTRAILERS'
 #define IFF_NOTRAILERS   IFF_NOTRAILERS
                          ^
../include/linux/if.h:76:2: note: previous definition of 'IFF_NOTRAILERS' was here
  IFF_NOTRAILERS   = 1<<5,  /* sysfs */
  ^
../include/linux/if.h:98:23: error: redeclaration of enumerator 'IFF_RUNNING'
 #define IFF_RUNNING   IFF_RUNNING
                       ^
../include/linux/if.h:77:2: note: previous definition of 'IFF_RUNNING' was here
  IFF_RUNNING   = 1<<6,  /* __volatile__ */
  ^
../include/linux/if.h:99:21: error: redeclaration of enumerator 'IFF_NOARP'
 #define IFF_NOARP   IFF_NOARP
                     ^
../include/linux/if.h:78:2: note: previous definition of 'IFF_NOARP' was here
  IFF_NOARP   = 1<<7,  /* sysfs */
  ^
../include/linux/if.h:100:23: error: redeclaration of enumerator 'IFF_PROMISC'
 #define IFF_PROMISC   IFF_PROMISC
                       ^
../include/linux/if.h:79:2: note: previous definition of 'IFF_PROMISC' was here
  IFF_PROMISC   = 1<<8,  /* sysfs */
  ^
../include/linux/if.h:101:24: error: redeclaration of enumerator 'IFF_ALLMULTI'
 #define IFF_ALLMULTI   IFF_ALLMULTI
                        ^
../include/linux/if.h:80:2: note: previous definition of 'IFF_ALLMULTI' was here
  IFF_ALLMULTI   = 1<<9,  /* sysfs */
  ^
../include/linux/if.h:102:22: error: redeclaration of enumerator 'IFF_MASTER'
 #define IFF_MASTER   IFF_MASTER
                      ^
../include/linux/if.h:81:2: note: previous definition of 'IFF_MASTER' was here
  IFF_MASTER   = 1<<10, /* __volatile__ */
  ^
../include/linux/if.h:103:21: error: redeclaration of enumerator 'IFF_SLAVE'
 #define IFF_SLAVE   IFF_SLAVE
                     ^
../include/linux/if.h:82:2: note: previous definition of 'IFF_SLAVE' was here
  IFF_SLAVE   = 1<<11, /* __volatile__ */
  ^
../include/linux/if.h:104:25: error: redeclaration of enumerator 'IFF_MULTICAST'
 #define IFF_MULTICAST   IFF_MULTICAST
                         ^
../include/linux/if.h:83:2: note: previous definition of 'IFF_MULTICAST' was here
  IFF_MULTICAST   = 1<<12, /* sysfs */
  ^
../include/linux/if.h:105:23: error: redeclaration of enumerator 'IFF_PORTSEL'
 #define IFF_PORTSEL   IFF_PORTSEL
                       ^
../include/linux/if.h:84:2: note: previous definition of 'IFF_PORTSEL' was here
  IFF_PORTSEL   = 1<<13, /* sysfs */
  ^
../include/linux/if.h:106:25: error: redeclaration of enumerator 'IFF_AUTOMEDIA'
 #define IFF_AUTOMEDIA   IFF_AUTOMEDIA
                         ^
../include/linux/if.h:85:2: note: previous definition of 'IFF_AUTOMEDIA' was here
  IFF_AUTOMEDIA   = 1<<14, /* sysfs */
  ^
../include/linux/if.h:107:23: error: redeclaration of enumerator 'IFF_DYNAMIC'
 #define IFF_DYNAMIC   IFF_DYNAMIC
                       ^
../include/linux/if.h:86:2: note: previous definition of 'IFF_DYNAMIC' was here
  IFF_DYNAMIC   = 1<<15, /* sysfs */
  ^
In file included from ../include/xtables.h:16:0,
                 from ../include/iptables.h:5,
                 from m_ipt.c:18:
/nix/store/cap4dv1c16nzy8y36pinryllxqygrqny-glibc-2.24-dev/include/net/if.h:111:8: error: redefinition of 'struct ifmap'
 struct ifmap
        ^
In file included from m_ipt.c:17:0:
../include/linux/if.h:169:8: note: originally defined here
 struct ifmap {
        ^
In file included from ../include/xtables.h:16:0,
                 from ../include/iptables.h:5,
                 from m_ipt.c:18:
/nix/store/cap4dv1c16nzy8y36pinryllxqygrqny-glibc-2.24-dev/include/net/if.h:126:8: error: redefinition of 'struct ifreq'
 struct ifreq
        ^
In file included from m_ipt.c:17:0:
../include/linux/if.h:203:8: note: originally defined here
 struct ifreq {
        ^
In file included from ../include/xtables.h:16:0,
                 from ../include/iptables.h:5,
                 from m_ipt.c:18:
/nix/store/cap4dv1c16nzy8y36pinryllxqygrqny-glibc-2.24-dev/include/net/if.h:176:8: error: redefinition of 'struct ifconf'
 struct ifconf
        ^
In file included from m_ipt.c:17:0:
../include/linux/if.h:252:8: note: originally defined here
 struct ifconf  {
        ^
archive/tar
cmd/pprof/internal/plugin
m_ipt.c:62:1: warning: no previous prototype for 'register_target' [-Wmissing-prototypes]
 register_target(struct iptables_target *me)
 ^
m_ipt.c: In function 'register_target':
m_ipt.c:66:4: error: dereferencing pointer to incomplete type 'struct iptables_target'
  me->next = t_list;
    ^
m_ipt.c: At top level:
m_ipt.c:72:1: error: conflicting types for 'xtables_register_target'
 xtables_register_target(struct iptables_target *me)
 ^
In file included from ../include/iptables.h:5:0,
                 from m_ipt.c:18:
../include/xtables.h:444:13: note: previous declaration of 'xtables_register_target' was here
 extern void xtables_register_target(struct xtables_target *me);
             ^
m_ipt.c:79:1: warning: no previous prototype for 'exit_tryhelp' [-Wmissing-prototypes]
 exit_tryhelp(int status)
 ^
m_ipt.c:87:17: warning: 'enum exittype' declared inside parameter list
 exit_error(enum exittype status, char *msg, ...)
                 ^
m_ipt.c:87:17: warning: its scope is only this definition or declaration, which is probably not what you want
m_ipt.c:87:26: error: parameter 1 ('status') has incomplete type
 exit_error(enum exittype status, char *msg, ...)
                          ^
m_ipt.c:87:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 exit_error(enum exittype status, char *msg, ...)
 ^
m_ipt.c:110:1: warning: no previous prototype for 'addr_to_dotted' [-Wmissing-prototypes]
 addr_to_dotted(const struct in_addr *addrp)
 ^
m_ipt.c:120:5: warning: no previous prototype for 'string_to_number_ll' [-Wmissing-prototypes]
 int string_to_number_ll(const char *s, unsigned long long min,
     ^
m_ipt.c:140:5: warning: no previous prototype for 'string_to_number_l' [-Wmissing-prototypes]
 int string_to_number_l(const char *s, unsigned long min, unsigned long max,
     ^
m_ipt.c:152:5: warning: no previous prototype for 'string_to_number' [-Wmissing-prototypes]
 int string_to_number(const char *s, unsigned int min, unsigned int max,
     ^
m_ipt.c:314:17: warning: no previous prototype for 'dotted_to_addr' [-Wmissing-prototypes]
 struct in_addr *dotted_to_addr(const char *dotted)
                 ^
m_ipt.c:361:1: warning: no previous prototype for 'build_st' [-Wmissing-prototypes]
 build_st(struct iptables_target *target, struct ipt_entry_target *t)
 ^
m_ipt.c: In function 'build_st':
m_ipt.c:369:7: warning: implicit declaration of function 'IPT_ALIGN' [-Wimplicit-function-declaration]
       IPT_ALIGN(sizeof (struct ipt_entry_target)) + target->size;
       ^
m_ipt.c: In function 'parse_ipt':
m_ipt.c:405:13: error: 'IPT_LIB_DIR' undeclared (first use in this function)
   lib_dir = IPT_LIB_DIR;
             ^
m_ipt.c:405:13: note: each undeclared identifier is reported only once for each function it appears in
m_ipt.c: In function 'print_ipt':
m_ipt.c:547:13: error: 'IPT_LIB_DIR' undeclared (first use in this function)
   lib_dir = IPT_LIB_DIR;
             ^
cmd/pprof/internal/report
In file included from m_ipt.c:32:0:
m_ipt.c: In function 'exit_error':
m_ipt.c:91:2: error: 'va_start' used in function with fixed args
  va_start(args, msg);
  ^
make[1]: *** [<builtin>: m_ipt.o] Error 1
rm emp_ematch.lex.c
make[1]: Leaving directory '/tmp/nix-build-iproute2-4.5.0.drv-0/iproute2-4.5.0/tc'
make: *** [Makefile:49: all] Error 2
builder for ‘/nix/store/hakp69nndby1242c0mgz59870zqypx3v-iproute2-4.5.0.drv’ failed with exit code 2
  • System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)
    16.09.git.b4cc9bd (Flounder)
  • Nix version: (run nix-env --version)
    nix-env (Nix) 1.11.2
  • Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)
    "16.09.git.b4cc9bd"
@globin
Copy link
Member

globin commented Aug 25, 2016

Seems this is fixed on staging, which contains more fixes for hardened-stdenv by now

@mrobbetts
Copy link
Contributor Author

Argh, I am the worst.

Thanks.

@globin globin closed this as completed Aug 26, 2016
@globin
Copy link
Member

globin commented Aug 26, 2016

No worries :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants