CyberShadow / Digger

A tool to build D and bisect old D versions
Other
57 stars 9 forks source link

Linker error #71

Closed Bolpat closed 5 years ago

Bolpat commented 6 years ago

I get this linker error:

Linking...
OPTLINK (R) for Win32  Release 8.00.17
Copyright (C) Digital Mars 1989-2013  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
..\..\..\AppData\Roaming\dub\packages\digger-3.0.0-alpha-7\digger\.dub\build\application-debug-windows-x86-dmd_2080-11610441FAA00E50439AB168C0E58707\digger.obj(digger)
 Error 42: Symbol Undefined __D3std5stdio4File17LockingTextWriter26highSurrogateShouldBeEmptyMFNfZv
..\..\..\AppData\Roaming\dub\packages\digger-3.0.0-alpha-7\digger\.dub\build\application-debug-windows-x86-dmd_2080-11610441FAA00E50439AB168C0E58707\digger.obj(digger)
 Error 42: Symbol Undefined __D3std6random6rndGenFNcNdNiNfZSQBdQBc__T21MersenneTwisterEngineTkVki32Vki624Vki397Vki31Vki256748C927A0D23AD0EB3CD00E0EA89B59355F
Error: linker exited with status 2
dmd failed with exit code 1.

when performing the Dlang bot's recommendation

dub fetch digger
dub run digger -- build "master + phobos#6513"

I checked other issues, #37 made me try using -debug, but it didn't help.

CyberShadow commented 6 years ago

It looks like a problem with your D setup. How did you install DMD, and what version is it?

Bolpat commented 6 years ago

Installed DMD32 D Compiler v2.080.0 via Windows installer on dlang.org main page (http://downloads.dlang.org/releases/2.x/2.080.0/dmd-2.080.0.exe).

CyberShadow commented 6 years ago

Sorry, I can't reproduce this with 2.080.0.

You could try reinstalling D, clearing the Dub cache, building with -m32mscoff or -m64, or trying on a fresh Windows VM or user account.

FreeSlave commented 6 years ago

Also having linker error, but different.

Linking...
OPTLINK (R) for Win32  Release 8.00.17
Copyright (C) Digital Mars 1989-2013  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
..\..\AppData\Local\dub\packages\digger-3.0.0-alpha-7\digger\.dub\build\application-debug-windows-x86-dmd_2080-51770A5309DE90312F678A3ADE80772B\digger.obj(digger)
 Error 42: Symbol Undefined __D3std4conv16testEmplaceChunkFNaNbNiNfAvkkZv
..\..\AppData\Local\dub\packages\digger-3.0.0-alpha-7\digger\.dub\build\application-debug-windows-x86-dmd_2080-51770A5309DE90312F678A3ADE80772B\digger.obj(digger)
 Error 42: Symbol Undefined __D3std5stdio4File17LockingTextWriter26highSurrogateShouldBeEmptyMFNfZv
..\..\AppData\Local\dub\packages\digger-3.0.0-alpha-7\digger\.dub\build\application-debug-windows-x86-dmd_2080-51770A5309DE90312F678A3ADE80772B\digger.obj(digger)
 Error 42: Symbol Undefined __D3std6random6rndGenFNcNdNiNfZSQBdQBc__T21MersenneTwisterEngineTkVki32Vki624Vki397Vki31Vki256748C927A0D23AD0EB3CD00E0EA89B59355F
..\..\AppData\Local\dub\packages\digger-3.0.0-alpha-7\digger\.dub\build\application-debug-windows-x86-dmd_2080-51770A5309DE90312F678A3ADE80772B\digger.obj(digger)
 Error 42: Symbol Undefined __D3std4path11expandTildeFNbNfAyaZQe
Error: linker exited with status 4

When I'm trying to build with --arch=x86_64 os --arch=x86_mscoff, it gives me another error:

Linking...
C:\D\dmd2\windows\bin\lld-link.exe: error: could not open libcmt.lib: no such file or directory
C:\D\dmd2\windows\bin\lld-link.exe: error: could not open OLDNAMES.lib: no such file or directory
Error: linker exited with status 1

Upd: Reinstalling dmd really did help!

CyberShadow commented 6 years ago

How are you building, dub or rdmd? Whichever it is, try the other one. Also please specify D version. Have you tried -allinst as mentioned in the readme?

When I'm trying to build with --arch=x86_64 os --arch=x86_mscoff, it gives me another error:

That's because MS libraries aren't set up for you.

FreeSlave commented 6 years ago

I built digger via dub build digger with dmd 2.080.0 I reinstalled from the same installer I already had in Downloads and it began working.