Hello folks, trying to build BIRD 2.0.7 using GCC 10 (which landed in Fedora these days) leads to a build failure like this: /usr/bin/ld: obj/conf/cf-lex.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/conf/conf.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/filter/filter.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/filter/data.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/filter/f-util.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/filter/tree.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/filter/trie.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/filter/inst-gen.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/a-path.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/a-set.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/cmds.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/iface.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/neighbor.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/proto.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/rt-attr.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/rt-dev.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/rt-fib.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/rt-show.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/rt-table.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/bfd/bfd.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/bfd/packets.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/babel/babel.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/babel/packets.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/bgp/attrs.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/bgp/bgp.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/bgp/packets.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/mrt/mrt.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/dbdes.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/hello.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/iface.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/lsack.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/lsalib.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/lsreq.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/lsupd.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/neighbor.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/ospf.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/packet.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/rt.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/topology.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/perf/perf.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/pipe/pipe.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/radv/packets.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/radv/radv.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/rip/packets.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/rip/rip.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/rpki/rpki.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/rpki/packets.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/rpki/tcp_transport.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/rpki/ssh_transport.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/rpki/transport.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/static/static.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/sysdep/linux/netlink.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/sysdep/unix/krt.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/sysdep/unix/main.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here collect2: error: ld returned 1 exit status https://gcc.gnu.org/gcc-10/porting_to.html gives a pointer that this is related to a common mistake in C related to missing "extern" to global variables in a header file. Any chance for a patch (rather to suggest -fno-common)? Thank you. Regards, Robert
Robert Scheck <bird@robert-scheck.de> writes:
Hello folks,
trying to build BIRD 2.0.7 using GCC 10 (which landed in Fedora these days) leads to a build failure like this:
/usr/bin/ld: obj/conf/cf-lex.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/conf/conf.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/filter/filter.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/filter/data.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/filter/f-util.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/filter/tree.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/filter/trie.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/filter/inst-gen.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/a-path.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/a-set.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/cmds.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/iface.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/neighbor.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/proto.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/rt-attr.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/rt-dev.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/rt-fib.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/rt-show.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/nest/rt-table.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/bfd/bfd.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/bfd/packets.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/babel/babel.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/babel/packets.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/bgp/attrs.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/bgp/bgp.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/bgp/packets.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/mrt/mrt.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/dbdes.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/hello.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/iface.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/lsack.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/lsalib.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/lsreq.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/lsupd.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/neighbor.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/ospf.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/packet.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/rt.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/ospf/topology.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/perf/perf.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/pipe/pipe.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/radv/packets.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/radv/radv.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/rip/packets.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/rip/rip.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/rpki/rpki.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/rpki/packets.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/rpki/tcp_transport.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/rpki/ssh_transport.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/rpki/transport.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/proto/static/static.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/sysdep/linux/netlink.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/sysdep/unix/krt.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here /usr/bin/ld: obj/sysdep/unix/main.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: multiple definition of `rta_dest_names'; obj/conf/cf-parse.tab.o:/builddir/build/BUILD/bird-2.0.7/./nest/route.h:461: first defined here collect2: error: ld returned 1 exit status
https://gcc.gnu.org/gcc-10/porting_to.html gives a pointer that this is related to a common mistake in C related to missing "extern" to global variables in a header file.
Any chance for a patch (rather to suggest -fno-common)? Thank you.
I think the below patch (against master) ought to fix it? Don't have a GCC v10 handy to test with, but at least it doesn't seem to break anything on GCC v9 :) I think the same patch ought to apply against Bird 2.0.7 as well... -Toke diff --git a/nest/route.h b/nest/route.h index d2a07f09..b927db5f 100644 --- a/nest/route.h +++ b/nest/route.h @@ -458,7 +458,7 @@ typedef struct rta { protocol-specific metric is availabe */ -const char * rta_dest_names[RTD_MAX]; +extern const char * rta_dest_names[RTD_MAX]; static inline const char *rta_dest_name(uint n) { return (n < RTD_MAX) ? rta_dest_names[n] : "???"; }
On Mon, 03 Feb 2020, Toke Høiland-Jørgensen wrote:
I think the below patch (against master) ought to fix it? Don't have a GCC v10 handy to test with, but at least it doesn't seem to break anything on GCC v9 :)
I think the same patch ought to apply against Bird 2.0.7 as well...
https://koji.fedoraproject.org/koji/taskinfo?taskID=41348829 - yes, looks good (also on RHEL/CentOS/EPEL 7 with old GCC 4.8.5). I wouldn't have expected that the patch is that trivial when working on other packages/ software before.
diff --git a/nest/route.h b/nest/route.h index d2a07f09..b927db5f 100644 --- a/nest/route.h +++ b/nest/route.h @@ -458,7 +458,7 @@ typedef struct rta { protocol-specific metric is availabe */
-const char * rta_dest_names[RTD_MAX]; +extern const char * rta_dest_names[RTD_MAX];
static inline const char *rta_dest_name(uint n) { return (n < RTD_MAX) ? rta_dest_names[n] : "???"; }
Could upstream please merge this to master and the next release? Thanks. Regards, Robert
Robert Scheck <bird@robert-scheck.de> writes:
On Mon, 03 Feb 2020, Toke Høiland-Jørgensen wrote:
I think the below patch (against master) ought to fix it? Don't have a GCC v10 handy to test with, but at least it doesn't seem to break anything on GCC v9 :)
I think the same patch ought to apply against Bird 2.0.7 as well...
https://koji.fedoraproject.org/koji/taskinfo?taskID=41348829 - yes, looks good (also on RHEL/CentOS/EPEL 7 with old GCC 4.8.5).
Great! And thanks for fixing the Fedora package!
I wouldn't have expected that the patch is that trivial when working on other packages/ software before.
Heh, no, me neither :)
diff --git a/nest/route.h b/nest/route.h index d2a07f09..b927db5f 100644 --- a/nest/route.h +++ b/nest/route.h @@ -458,7 +458,7 @@ typedef struct rta { protocol-specific metric is availabe */
-const char * rta_dest_names[RTD_MAX]; +extern const char * rta_dest_names[RTD_MAX];
static inline const char *rta_dest_name(uint n) { return (n < RTD_MAX) ? rta_dest_names[n] : "???"; }
Could upstream please merge this to master and the next release? Thanks.
+1. Let me know if you want me to send a proper patch (but this is probably so trivial so it's easier for you guys to just add it yourself). -Toke
diff --git a/nest/route.h b/nest/route.h index d2a07f09..b927db5f 100644 --- a/nest/route.h +++ b/nest/route.h @@ -458,7 +458,7 @@ typedef struct rta { protocol-specific metric is availabe */
-const char * rta_dest_names[RTD_MAX]; +extern const char * rta_dest_names[RTD_MAX];
static inline const char *rta_dest_name(uint n) { return (n < RTD_MAX) ? rta_dest_names[n] : "???"; }
Could upstream please merge this to master and the next release? Thanks.
+1. Let me know if you want me to send a proper patch (but this is probably so trivial so it's easier for you guys to just add it yourself).
Thank you both for finding and fixing this bug. Merged. Maria
participants (3)
-
Maria Matějka -
Robert Scheck -
Toke Høiland-Jørgensen