[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH] tools/xenstore: mark variable in header as extern
On 20/05/2020 17:39, Anthony PERARD wrote: > This patch fix "multiple definition of `xprintf'" (or xgt_handle) > build error with GCC 10.1.0. > > These are the error reported: > gcc xs_tdb_dump.o utils.o tdb.o talloc.o -o xs_tdb_dump > /usr/bin/ld: utils.o:./utils.h:27: multiple definition of `xprintf'; > xs_tdb_dump.o:./utils.h:27: first defined here > [...] > gcc xenstored_core.o xenstored_watch.o xenstored_domain.o > xenstored_transaction.o xenstored_control.o xs_lib.o talloc.o utils.o tdb.o > hashtable.o xenstored_posix.o -lsystemd -Wl,-rpath-link=... > ../libxc/libxenctrl.so -lrt -o xenstored > /usr/bin/ld: xenstored_watch.o:./xenstored_core.h:207: multiple > definition of `xgt_handle'; xenstored_core.o:./xenstored_core.h:207: first > defined here > /usr/bin/ld: xenstored_domain.o:./xenstored_core.h:207: multiple > definition of `xgt_handle'; xenstored_core.o:./xenstored_core.h:207: first > defined here > /usr/bin/ld: xenstored_transaction.o:./xenstored_core.h:207: multiple > definition of `xgt_handle'; xenstored_core.o:./xenstored_core.h:207: first > defined here > /usr/bin/ld: xenstored_control.o:./xenstored_core.h:207: multiple > definition of `xgt_handle'; xenstored_core.o:./xenstored_core.h:207: first > defined here > /usr/bin/ld: xenstored_posix.o:./xenstored_core.h:207: multiple > definition of `xgt_handle'; xenstored_core.o:./xenstored_core.h:207: first > defined here > > A difference that I noticed with earlier version of the build chain is > that before, I had: > $ nm xs_tdb_dump.o | grep xprintf > 0000000000000008 C xprintf > And now, it's: > 0000000000000000 B xprintf > With the patch apply, the symbol isn't in xs_tdb_dump.o anymore. > > Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Ah - this will be a side effect of defaulting to -fno-common now. Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |