www.digitalmars.com         C & C++   DMDScript  

D.gnu - Linker errors with i686-w64-mingw32 binaries

reply "Mike Parker" <aldacron gmail.com> writes:
Haven't tried the 64-bit binaries yet, but any attempt to compile 
an executable with the 32-bit binaries results in this:

c:/d/i686-w64-mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../lib/libg
phobos2.a(thread.o): In function `_lambda3':
/home/build/tmp/build/.build/src/gcc-4.9.2/libphobos/libdruntime/core/thread.d:1
983: undefined reference to `D2rt5tlsgc4initFZPv'
c:/d/i686-w64-mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../lib/libg
phobos2.a(thread.o): In function 
`D4core6thread6Thread6__dtorMFZv':
/home/build/tmp/build/.build/src/gcc-4.9.2/libphobos/libdruntime/core/thread.d:6
33: undefined reference to `D2rt5tlsgc7destroyFPvZv'
c:/d/i686-w64-mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../lib/libg
phobos2.a(thread.o): In function `thread_entryPoint 4':
/home/build/tmp/build/.build/src/gcc-4.9.2/libphobos/libdruntime/core/thread.d:1
93: undefined reference to `D2rt5tlsgc4initFZPv'
c:/d/i686-w64-mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../lib/libg
phobos2.a(thread.o): In function `thread_attachThis':
/home/build/tmp/build/.build/src/gcc-4.9.2/libphobos/libdruntime/core/thread.d:1
903: undefined reference to `D2rt5tlsgc4initFZPv'
c:/d/i686-w64-mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../lib/libg
phobos2.a(thread.o): In function `thread_attachByAddrB':
/home/build/tmp/build/.build/src/gcc-4.9.2/libphobos/libdruntime/core/thread.d:1
968: undefined reference to `D2rt5tlsgc4initFZPv'
c:/d/i686-w64-mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../lib/libg
phobos2.a(thread.o): In function 
`D4core6thread15scanAllTypeImplFNbMDFNbE4core6t
hread8ScanTypePvPvZvPvZv':
/home/build/tmp/build/.build/src/gcc-4.9.2/libphobos/libdruntime/core/thread.d:2
666: undefined reference to `D2rt5tlsgc4scanFNbPvMDFNbPvPvZvZv'
c:/d/i686-w64-mingw32/bin/../lib/gcc/i686-w64-mingw32/4.9.2/../../../../lib/libg
phobos2.a(thread.o): In function `thread_processGCMarks':
/home/build/tmp/build/.build/src/gcc-4.9.2/libphobos/libdruntime/core/thread.d:2
896: undefined reference to 
`D2rt5tlsgc14processGCMarksFNbPvMDFNbPvZiZv'
collect2.exe: error: ld returned 1 exit status
Aug 06 2015
parent reply "Mike Parker" <aldacron gmail.com> writes:
On Thursday, 6 August 2015 at 11:07:33 UTC, Mike Parker wrote:
 Haven't tried the 64-bit binaries yet, but any attempt to 
 compile an executable with the 32-bit binaries results in this:
OK, I've tried the x86_64-w64-mingw32 binaries. When compiling with -m32, I get the same errors as above. The default -m64 works.
Aug 06 2015
parent reply "Iain Buclaw via D.gnu" <d.gnu puremagic.com> writes:
On 6 August 2015 at 13:19, Mike Parker via D.gnu <d.gnu puremagic.com>
wrote:

 On Thursday, 6 August 2015 at 11:07:33 UTC, Mike Parker wrote:

 Haven't tried the 64-bit binaries yet, but any attempt to compile an
 executable with the 32-bit binaries results in this:
OK, I've tried the x86_64-w64-mingw32 binaries. When compiling with -m32, I get the same errors as above. The default -m64 works.
Bug report?
Aug 10 2015
parent Johannes Pfau <nospam example.com> writes:
Am Mon, 10 Aug 2015 12:36:32 +0200
schrieb "Iain Buclaw via D.gnu" <d.gnu puremagic.com>:

 On 6 August 2015 at 13:19, Mike Parker via D.gnu <d.gnu puremagic.com>
 wrote:
 
 On Thursday, 6 August 2015 at 11:07:33 UTC, Mike Parker wrote:

 Haven't tried the 64-bit binaries yet, but any attempt to compile
 an executable with the 32-bit binaries results in this:
OK, I've tried the x86_64-w64-mingw32 binaries. When compiling with -m32, I get the same errors as above. The default -m64 works.
Bug report?
Looks like it's some kind of problem with underscore prefixing. `D2rt5tlsgc14processGCMarksFNbPvMDFNbPvZiZv' should likely have an underscore appended. Our MinGW port is probably mostly broken, but we need a good way to run the testsuite for MinGW to really have a useful MinGW port. Once I've got some time for this I want to take the standard DMD test runner, make it a real stand-alone program and add support for cross compiler testing using ssh/scp. Once we have that it should be possible to reliably test the MinGW port. BTW: As MinGW mostly uses the standard MS runtime and upstream druntime/phobos now supports these we'll probably only have to update version blocks. TLS could be a problem, but we could just compile with emutls for now which should work.
Aug 10 2015