Re: dmd -> ldmd2: /usr/bin/ld.gold: error: .o: multiple definition of 'bool ldc.attributes...

2021-03-07 Thread kdevel via Digitalmars-d-learn
On Sunday, 7 March 2021 at 12:47:45 UTC, kinke wrote: [...] ./dmd -i -of=pointless.o -g -c pointless/package.d "dmd" is a symlink to /opt/ldc2/bin/ldmd2 Ah, try using `-i=-ldc` instead of `-i` alone to manually exclude the ldc.* modules from being included. Solved the issue. Many thanks!

Re: dmd -> ldmd2: /usr/bin/ld.gold: error: .o: multiple definition of 'bool ldc.attributes...

2021-03-07 Thread kinke via Digitalmars-d-learn
On Sunday, 7 March 2021 at 11:34:08 UTC, kdevel wrote: ./dmd -i -I=tillyscop:tillyscop/msgpack-d/src -O -g -of=localscop.o -c tillyscop/scop.d tillyscop/scopserializer.d and ./dmd -i -of=pointless.o -g -c pointless/package.d "dmd" is a symlink to /opt/ldc2/bin/ldmd2 Ah, try using `-i=-ldc`

Re: dmd -> ldmd2: /usr/bin/ld.gold: error: .o: multiple definition of 'bool ldc.attributes...

2021-03-07 Thread kdevel via Digitalmars-d-learn
On Sunday, 7 March 2021 at 11:50:45 UTC, z wrote: [...] I think i had a similar error, can you try adding version(LDC) pragma(LDC_no_moduleinfo) to the affected modules? At the line just after the module declaration, particularly in all package.d files and the file that contains the main funct

Re: dmd -> ldmd2: /usr/bin/ld.gold: error: .o: multiple definition of 'bool ldc.attributes...

2021-03-07 Thread z via Digitalmars-d-learn
On Saturday, 6 March 2021 at 22:14:26 UTC, kdevel wrote: After replacing dmd with ldmd2 (LDC 1.25.1) I get tons of link errors all of the form mentioned in the subject. Any idea what can be done about it? (With a handcrafted single compile/link statement using ldc2 everything compiles but id

Re: dmd -> ldmd2: /usr/bin/ld.gold: error: .o: multiple definition of 'bool ldc.attributes...

2021-03-07 Thread kdevel via Digitalmars-d-learn
On Sunday, 7 March 2021 at 01:29:50 UTC, Preetpal wrote: [...] Can you post more information? Like the full error that you are seeing, [link cmd] /usr/bin/ld.gold: error: pointless.o: multiple definition of '_D3ldc10attributes10assumeUsedySQBeQBd11_assumeUsed' /usr/bin/ld.gold: localscop.o: p

Re: dmd -> ldmd2: /usr/bin/ld.gold: error: .o: multiple definition of 'bool ldc.attributes...

2021-03-06 Thread Preetpal via Digitalmars-d-learn
On Saturday, 6 March 2021 at 22:14:26 UTC, kdevel wrote: After replacing dmd with ldmd2 (LDC 1.25.1) I get tons of link errors all of the form mentioned in the subject. Any idea what can be done about it? (With a handcrafted single compile/link statement using ldc2 everything compiles but id

dmd -> ldmd2: /usr/bin/ld.gold: error: .o: multiple definition of 'bool ldc.attributes...

2021-03-06 Thread kdevel via Digitalmars-d-learn
After replacing dmd with ldmd2 (LDC 1.25.1) I get tons of link errors all of the form mentioned in the subject. Any idea what can be done about it? (With a handcrafted single compile/link statement using ldc2 everything compiles but ideally I want to reuse my Makefile).