[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH] tools/xenstore: mark variable in header as extern


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 20 May 2020 17:59:04 +0100
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 20 May 2020 17:00:32 +0000
  • Ironport-sdr: UsxlX1X7VTEfq6+h6MalDh9nt0ZhtNSXX5fYOoHqBiJc2h+85Kl+KLUDe4XrnxNh+HPoBwTZRo IOi0c+7PPnW3bU+6auttrhQg/h9WUeKA7WF1Z37pZyYDWQP3rTAjHO4DK05YqsM2Ep8PLbT5pX T7r/unLZOCZni1Qvpk+/97nfvDlVox9Q5BxuNocjKbItmqimxAzDRJaSkD6ZbpEadpgFkfs/p5 0c8rk7KgAtHYdajo3UoQdrE+CWfPSBO2JCOHmcd3m89H/5M7hyW0Sb4WFiYzm6atuByY2weEdI C/Q=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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>



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.