www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Weird ouput when using dub / dmd with vscode terminal

reply Aldo <aldocd4 outlook.com> writes:
Hello,

I have a strange bug on my laptop at work when working with 
VSCode and the integrated terminal. At home it is working 
perfectly.

When I type dub in the terminal (powershell, bash or cmd) the 
process hangs before the end and display weird output. Today I 
typed 'dmd -v' and this one crash as well (sometimes displaying a 
big error messagebox and sometimes "ERROR: This is a compiler 
bug.".

You can find album of the bug here: https://imgur.com/a/eYYIsRE

No problem with LDC2, no problems with dmd/dub at home.
Jan 31
next sibling parent reply Seb <seb wilzba.ch> writes:
On Friday, 31 January 2020 at 10:47:22 UTC, Aldo wrote:
 Hello,

 I have a strange bug on my laptop at work when working with 
 VSCode and the integrated terminal. At home it is working 
 perfectly.

 When I type dub in the terminal (powershell, bash or cmd) the 
 process hangs before the end and display weird output. Today I 
 typed 'dmd -v' and this one crash as well (sometimes displaying 
 a big error messagebox and sometimes "ERROR: This is a compiler 
 bug.".

 You can find album of the bug here: https://imgur.com/a/eYYIsRE

 No problem with LDC2, no problems with dmd/dub at home.
What version of DMD are you using on your work laptop?
Jan 31
parent Aldo <aldocd4 outlook.com> writes:
On Friday, 31 January 2020 at 14:23:39 UTC, Seb wrote:
 What version of DMD are you using on your work laptop?
I think first version i used on that laptop was dmd 2.084 (now its on latest dmd). It's happening since the beginning.
Jan 31
prev sibling parent reply jxel <jxel gmall.com> writes:
On Friday, 31 January 2020 at 10:47:22 UTC, Aldo wrote:
 Hello,

 I have a strange bug on my laptop at work when working with 
 VSCode and the integrated terminal. At home it is working 
 perfectly.

 When I type dub in the terminal (powershell, bash or cmd) the 
 process hangs before the end and display weird output. Today I 
 typed 'dmd -v' and this one crash as well (sometimes displaying 
 a big error messagebox and sometimes "ERROR: This is a compiler 
 bug.".

 You can find album of the bug here: https://imgur.com/a/eYYIsRE

 No problem with LDC2, no problems with dmd/dub at home.
The problem is that the official DMD executable for Windows is built with an old and outdated linker known as optlink. Just build DMD yourself using ldc2 or just use ldc2 instead. This issue already been reported and a pull request that fixed the issue was made, but no action has been taken on D's management end.
Jan 31
parent reply Aldo <aldocd4 outlook.com> writes:
On Friday, 31 January 2020 at 15:22:41 UTC, jxel wrote:
 The problem is that the official DMD executable for Windows is 
 built with an old and outdated linker known as optlink. Just 
 build DMD yourself using ldc2 or just use ldc2 instead.

 This issue already been reported and a pull request that fixed 
 the issue was made, but no action has been taken on D's 
 management end.
I will try that, thanks. This bug really need to be fixed asap for the sake of user experience.
Jan 31
parent reply jxel <jxel gmall.com> writes:
On Friday, 31 January 2020 at 18:06:44 UTC, Aldo wrote:
 This bug really need to be fixed asap for the sake of user 
 experience.
I agree, the burden falls on the few people that have the VMs that make all the release builds to update the environment accordingly for Windows. But they don't seem to have any interest in doing the work.
Feb 01
parent reply rikki cattermole <rikki cattermole.co.nz> writes:
On 02/02/2020 6:21 AM, jxel wrote:
 On Friday, 31 January 2020 at 18:06:44 UTC, Aldo wrote:
 This bug really need to be fixed asap for the sake of user experience.
I agree, the burden falls on the few people that have the VMs that make all the release builds to update the environment accordingly for Windows. But they don't seem to have any interest in doing the work.
This has nothing to do with Optlink. Nor the release environment. It is a bug either in dmd or in snn (dmc's libc). ``` fputs(("---\n" ~ "ERROR: This is a compiler bug.\n" ~ "Please report it via https://issues.dlang.org/enter_bug.cgi\n" ~ "with, preferably, a reduced, reproducible example and the information below.\n" ~ "DustMite (https://github.com/CyberShadow/DustMite/wiki) can help with the reduction.\n" ~ "---\n").ptr, stream); ``` Only the first two lines are printing, as it is a CTFE concatenated string that is rather concerning.
Feb 01
next sibling parent jxel <jxel gmall.com> writes:
On Saturday, 1 February 2020 at 17:45:23 UTC, rikki cattermole 
wrote:
 On 02/02/2020 6:21 AM, jxel wrote:
 On Friday, 31 January 2020 at 18:06:44 UTC, Aldo wrote:
 This bug really need to be fixed asap for the sake of user 
 experience.
I agree, the burden falls on the few people that have the VMs that make all the release builds to update the environment accordingly for Windows. But they don't seem to have any interest in doing the work.
This has nothing to do with Optlink. Nor the release environment. It is a bug either in dmd or in snn (dmc's libc). ``` fputs(("---\n" ~ "ERROR: This is a compiler bug.\n" ~ "Please report it via https://issues.dlang.org/enter_bug.cgi\n" ~ "with, preferably, a reduced, reproducible example and the information below.\n" ~ "DustMite (https://github.com/CyberShadow/DustMite/wiki) can help with the reduction.\n" ~ "---\n").ptr, stream); ``` Only the first two lines are printing, as it is a CTFE concatenated string that is rather concerning.
Optlink is the only linker that uses OMF libs and DMC's std library (both DMC and Optlink are outdated and bit rotten), so it is an Optlink only issue. That's not including other issues and limitations caused by Optlink.
Feb 01
prev sibling parent jxel <jxel gmall.com> writes:
On Saturday, 1 February 2020 at 17:45:23 UTC, rikki cattermole 
wrote:
 Nor the release environment.
The issue with the VM environment that builds the compiler is that it doesn't have ldc2 installed ;).
Feb 01