Bug 17197 – Link failure with -m64 on Windows

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
visuald
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2017-02-19T16:26:00Z
Last change time
2017-06-05T17:06:37Z
Assigned to
nobody
Creator
zan77137

Comments

Comment #0 by zan77137 — 2017-02-19T16:26:20Z
VisualD produces a build error at link process: std.utf.UTFException@c:\s\d\rainers\phobos\std\utf.d(1339): Invalid UTF-8 sequence (at index 3) As far as I searched, an argument with pipedmd.exe that is a build command generated by VisualD was lacked. ------ "C:\Program Files (x86)\VisualD\pipedmd.exe" -deps obj\debug\dummy\test\test.lnkdep link.exe @C:\Work\test\.dub\obj\debug\dummy\test\test.build.lnkarg ------ Probably, as for the command mentioned above in build log, the following commands are more right. ------ "C:\Program Files (x86)\VisualD\pipedmd.exe" -msmode -deps obj\debug\dummy\test\test.lnkdep link.exe @C:\Work\test\.dub\obj\debug\dummy\test\test.build.lnkarg ------ This error occurs because of pipedmd.exe does not convert the localized string that link.exe output into UTF-8 correctly. pepedmd.exe has to convert correctly and has been already implemented with the function. I found the function in tools/pipedmd.d(338). -msmode flag is necessary to let the function activate. VisualD has to generate a command correctly to pass -msmode flag to pipedmd.exe.
Comment #1 by r.sagitario — 2017-02-24T08:24:20Z
You are right that -msmode should be added, but it probably isn't going to make a lot of difference since the actual encoding is often hard to guess. In my tests the names displayed in linker messages are never correct for non-ASCII characters (there are no exceptions, though). Could you provide an example that raises the exception? To avoid the exception from occuring, pipedmd should probably never assume correct UTF-8.
Comment #2 by r.sagitario — 2017-03-04T07:52:11Z
-msmode now passed for links with the MS Linker by https://github.com/dlang/visuald/releases/tag/v0.44-rc2
Comment #3 by r.sagitario — 2017-06-05T17:06:37Z
"Invalid UTF-8" exceptions should no longer happen as I changed the critical path to use byte[] arrays instead of char[] arrays. Released in https://github.com/dlang/visuald/releases/tag/v0.45.0-beta1