D.gnu - GDC bug? duplicates symbols when using mixin and interface
- Daniel Kozak (45/45) Oct 24 2019 I have been trying to compile gtkd with gdc but without success.
- Daniel Kozak (5/10) Oct 24 2019 BTW. DMD does not includes those _DT16_D1b1B8__mixin24getSMFZPv
- Daniel Kozak (2/7) Oct 29 2019 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92216
- Matthias Klumpp (4/12) Nov 18 2019 Thank you for reporting this!
- BoraxMan (7/20) Dec 27 2019 D IS is a great programming language, but I'm finding the
I have been trying to compile gtkd with gdc but without success. I always end up with some duplicates symbols when gdc try to link final binary [https://github.com/gtkd-developers/GtkD/issues/282] I have tried it with ldc and dmd too, and both are working fine. So I guess there is some symbolgen issue with gdc. To make it (hopefuly) easier to investigate I have try to reduce it as much as I can by hand (I am unable to use dusmite or how it is called). So to reproduce this issue one need to have two files for eg. (b.d and c.d) see below // b.d ========================================== class B : I { protected override void getStruct(){} mixin A!(); } mixin template A() { public void* getS() { return null; } } public interface I { public void* getS(); protected void getStruct(); } void main() {} // EOF ========================================== // c.d ========================================== private import b; class C : B { protected override void getStruct() {} } // EOF ========================================== $ gdc -c -o b.o b.d $ gdc -c -o c.o c.d $ gdc -o test.o b.o c.o ld: c.o: in function `_DT16_D1b1B8__mixin24getSMFZPv': c.d:(.text+0x27): multiple definition of `_DT16_D1b1B8__mixin24getSMFZPv'; b.o:b.d:(.text+0x38): first defined here
Oct 24 2019
On Thursday, 24 October 2019 at 11:05:21 UTC, Daniel Kozak wrote:ld: c.o: in function `_DT16_D1b1B8__mixin24getSMFZPv': c.d:(.text+0x27): multiple definition of `_DT16_D1b1B8__mixin24getSMFZPv'; b.o:b.d:(.text+0x38): first defined hereBTW. DMD does not includes those _DT16_D1b1B8__mixin24getSMFZPv symbols (ddemangle even could not decode them) in obj files and ldc does include tham but with small differecies in name and have defined them as W (weak reference) not T(text/code) as gdc does
Oct 24 2019
On Thursday, 24 October 2019 at 11:05:21 UTC, Daniel Kozak wrote:ld: c.o: in function `_DT16_D1b1B8__mixin24getSMFZPv': c.d:(.text+0x27): multiple definition of `_DT16_D1b1B8__mixin24getSMFZPv'; b.o:b.d:(.text+0x38): first defined herehttps://gcc.gnu.org/bugzilla/show_bug.cgi?id=92216
Oct 29 2019
On Tuesday, 29 October 2019 at 13:23:33 UTC, Daniel Kozak wrote:On Thursday, 24 October 2019 at 11:05:21 UTC, Daniel Kozak wrote:Thank you for reporting this! This error is also a major pain for us at Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=944380ld: c.o: in function `_DT16_D1b1B8__mixin24getSMFZPv': c.d:(.text+0x27): multiple definition of `_DT16_D1b1B8__mixin24getSMFZPv'; b.o:b.d:(.text+0x38): first defined herehttps://gcc.gnu.org/bugzilla/show_bug.cgi?id=92216
Nov 18 2019
On Tuesday, 19 November 2019 at 00:56:33 UTC, Matthias Klumpp wrote:On Tuesday, 29 October 2019 at 13:23:33 UTC, Daniel Kozak wrote:D IS is a great programming language, but I'm finding the implementation lacking, and having a good implementation of it, which integrates nicely with the OS is critical to it working as a systems language. I've found a few problems with GDC (at least on Fedora) that make it almost unworkable as a D implementation.On Thursday, 24 October 2019 at 11:05:21 UTC, Daniel Kozak wrote:Thank you for reporting this! This error is also a major pain for us at Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=944380ld: c.o: in function `_DT16_D1b1B8__mixin24getSMFZPv': c.d:(.text+0x27): multiple definition of `_DT16_D1b1B8__mixin24getSMFZPv'; b.o:b.d:(.text+0x38): first defined herehttps://gcc.gnu.org/bugzilla/show_bug.cgi?id=92216
Dec 27 2019