Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #875 (closed defect: fixed)

Opened 7 months ago

Last modified 5 months ago

multiple definition of _D6object13__va_list_tag6__initZ

Reported by: e-t172 Assigned to: sean
Priority: critical Milestone: 0.99.6
Component: Core Functionality Version: trunk
Keywords: gdc, multiple definition, Cc:

Description

I'm using Tango r3152 and GDC r199 on GCC 4.1.2 on a x86_64 Debian Unstable system.

Tango itself compiles fine; however, when I try to compile a Hello World using Tango, I get this :

/usr/local/gdc-tango/lib/gcc/x86_64-unknown-linux-gnu/4.1.2/../../../../lib64/libgphobos.a(genobj.o):(.rodata+0xba0): multiple definition of `_D6object13__va_list_tag6__initZ'
/usr/local/gdc-tango/lib/gcc/x86_64-unknown-linux-gnu/4.1.2/../../../../lib64/libgphobos.a(builtins.o):(.rodata+0x0): first defined here
collect2: ld a retourné 1 code d'état d'exécution

I found a workaround:

ar d libgphobos.a builtins.o

It then compiles fine. Maybe builtins.o was included in libgphobos.a by mistake ?

Change History

02/06/08 06:03:18 changed by larsivi

  • milestone set to 0.99.5.

03/04/08 04:17:31 changed by Jim Panic

  • milestone changed from 0.99.5 to 0.99.6.

04/08/08 13:03:10 changed by larsivi

Seems like builtins may be included in genobj during compile via some stdc dependencies. I think in any case builtins should be an .di import and not built as an object.

Can someone verify this? Preferably on X86_64.

04/16/08 10:03:58 changed by fawzi

the problem is present also in phobos (but then in object.o and builtins.o) but only on X86-64 and I think that it is connected with the fact that va_list is an array on X86-64.

A simple fix (as larsivi suggested) that seems to work is to remove gcc/builtins.o from both compiler/gdc/Makefile.in compiler/gdc/Makefile.am .

04/16/08 10:14:38 changed by fawzi

04/16/08 13:01:52 changed by sean

  • status changed from new to assigned.

Huh. gcc/builtins.d was never supposed to be compiled or linked to begin with. No idea how that snuck in.

04/16/08 23:43:18 changed by sean

  • status changed from assigned to closed.
  • resolution set to fixed.

Fixed in revision [3436]. I made the change here because there was already some deletion of unwanted object files taking place.