Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use extra command to compile failure #38928

Closed
jackietw opened this issue Nov 22, 2017 · 27 comments
Closed

Use extra command to compile failure #38928

jackietw opened this issue Nov 22, 2017 · 27 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster terminal Integrated terminal issues

Comments

@jackietw
Copy link

  • VSCode Version: Code 1.18.1 (929bacb, 2017-11-16T18:32:36.023Z)
  • OS Version: Windows_NT x64 10.0.16299
  • Extensions:
Extension Author (truncated) Version
vscode-eclipse-keybindings alp 0.9.6
cpptools ms- 0.14.2
makefiles-support-for-vscode nae 0.0.3

Steps to Reproduce:

I am use gcc (gmake) compiler to compile DSP code was failure on Windows version,
but the same code working on linux version haven't this issue,
and I use command to compile also haven't this issue, just only use vs code windows version to compile has this issue,
How can I do?

Reproduces without extensions: Yes/No

@jackietw
Copy link
Author

jackietw commented Nov 22, 2017

Visual Studio Code terminal on Windows 10 result:
vs
tasks.json:

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build All",
            "type": "shell",
            "command": "gmake -C build -j depend",
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "problemMatcher": []
        }
    ]
}

Command result:
cmd
command:
gmake -C build -j depend

Visual Studio Code terminal on Linux:
vslinux
tasks.json:

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build First",
            "type": "shell",
            "command": "make -C ./build -j depend",
            "problemMatcher": []
        },
        {
            "label": "Build Secsond",
            "type": "shell",
            "command": "make -C ./build -j",
            "problemMatcher": []
        },
        {
            "label": "Clean",
            "type": "shell",
            "command": "make -C ./build clean",
            "problemMatcher": []
        }
    ]
}

@dbaeumer dbaeumer added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Nov 22, 2017
@vscodebot
Copy link

vscodebot bot commented Nov 22, 2017

This issue has been closed because it represents a question. Questions are better addressed on StackOverflow. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Nov 22, 2017
@jackietw
Copy link
Author

jackietw commented Nov 22, 2017

I think this issue isn't question, it maybe vscode bug,
why can working on command, not working at vscode?
why cmd can do it, but vscode is't?

@dbaeumer please re-check this issue

@dbaeumer
Copy link
Member

It doesn't explain what your issue is with the Windows command and the screen shots are not very helpful. What happens if you execute the command in the integrated terminal. E.g. type: gmake -C build -j depend. VS Code doesn't ship with gmake and I am sure there is more support on StackOverflow on how to use VS Code with gmake. I even thing you will get more support from the cpptools extension as well.

@jackietw
Copy link
Author

I have one question,
If I am compile code in vscode command mode (cmd at Terminal) is fail,
theoretically, command build-in Windows 10 (cmd) must compile failure,
but windows command can compile success, why?
is't it vscode issue?

@dbaeumer
Copy link
Member

By default VS Code uses PowerShell as the command interpreter however this can by customizer using the terminal.integrated.* settings. Does the command work correctly in PowerShell ?

@jackietw
Copy link
Author

jackietw commented Nov 23, 2017

I am try to use cmd ("terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\cmd.exe") and powershell (default, "terminal.integrated.shell.windows": "C:\\Windows\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe"),
there was get the same result,
Use alone cmd or powershell can compile success,
but regardless use cmd or ps at vscode ( tasks.json or type command at terminal) I was get compile fail result,
I am not sure this is it related to vscode?

Alone use PowerShell result:
powershell

Type command on PowerShell at VS Code
vscode

@dbaeumer
Copy link
Member

I would think that this is caused by a environment difference between the external and the internal PS instance. But I am neither a gcc nor gmake expert.

@jackietw
Copy link
Author

jackietw commented Nov 24, 2017

I am try recording output log, type gmake -C .\build\ -j depend | Out-File vs.txt, the extra compiler can compile success,
So, I think if vscode isn't display script or output result, it can compile success,
this is not difference between the external and the internal problem
it is vscode issue,

have any chance to fix it?

@dbaeumer
Copy link
Member

I have to say I am still not sure I fully understand what your problem is exactly. Can you create a GitHub repository that I can clone with simple steps to reproduce. Without being able to reproduce the problem we don't know what to fix.

@jackietw
Copy link
Author

jackietw commented Nov 24, 2017

Okay,
I description our method,
I am build TI Vision SDK and the compiler is build-in SDK (XDC TOOL),
Download link: VisionSDK

setup environment:
workspace: {install_dir}\vision_sdk\
windows path: PATH={install_dir}\ti_components\os_tools\windows\xdctools_3_32_01_22_core\;%PATH%

modifiy compile var:
open {instasll_dir}\vision_sdk\Rules.make
modify => MAKECONFIG?=tda3xx_rvp_bios_all

compile command: gmake -C .\build\ -j depend

I think compile this code need build-in compiler,
so, I share you download link to you to test,
but download it need sign up myTI account(free),

If you still need use GitHub,
a little later, I need processing git and compiler tool.

@dbaeumer
Copy link
Member

I really would appreciate a GitHub repository I can clone with a Readme of steps how to setup and reproduce.

@jackietw
Copy link
Author

This SDK is very large (about 6G, there are include RTOS, arm, dsp, tools... etc.),
I can't upload full source code to GitHub,
I think how does I separated this SDK package,
or you can try my method

@dbaeumer
Copy link
Member

Have you tried to reproduce this with a smaller example with gmake, ... that doesn't need the full SDK. (6GByte sounds huge)

@jackietw
Copy link
Author

I think this issue maybe occur at terminal complex output,
so, if I use simple code, this issue maybe can't reappear.

@dbaeumer
Copy link
Member

@Tyriar are you aware of the integrated terminal not showing all output of a command ?

@jackietw
Copy link
Author

@dbaeumer I was already upload source code to GitHub as below,
myTestRepo

there are need toolchain, download link as below,
SDK ToolChain

the SDK folder structure as below
(folder)
|-SDK in GitHub(mater)
||-.vscode
|||-tasks.json (Task Script)
|-ti_components (ToolChain)

@dbaeumer
Copy link
Member

Downloading a 6GB SDK and installing it is something I want to avoid. Since you are experienced with this can you try to reproduce this with a smaller setup. My by only gmake or other g++ tools.

@Tyriar @jackietw runs something in the integrated terminal and the terminal is missing output compared to a normal terminal. Is this ringing a bell for you.

@dbaeumer dbaeumer reopened this Nov 29, 2017
@dbaeumer dbaeumer added terminal Integrated terminal issues and removed *question Issue represents a question, should be posted to StackOverflow (VS Code) labels Nov 29, 2017
@dbaeumer dbaeumer assigned Tyriar and unassigned dbaeumer Nov 29, 2017
@Tyriar
Copy link
Member

Tyriar commented Dec 11, 2017

My guess would be environment differences. @jackietw could you run Get-ChildItem Env: in both windows to print the environments and then compare them?

@Tyriar Tyriar added the info-needed Issue requires more information from poster label Dec 11, 2017
@jackietw
Copy link
Author

jackietw commented Dec 12, 2017

PowerShell:PS.txt

PS C:\Users\jacki> Get-ChildItem Env:

Name                           Value
----                           -----
ALLUSERSPROFILE                C:\ProgramData
APPDATA                        C:\Users\jacki\AppData\Roaming
asl.log                        Destination=file
CommonProgramFiles             C:\Program Files\Common Files
CommonProgramFiles(x86)        C:\Program Files (x86)\Common Files
CommonProgramW6432             C:\Program Files\Common Files
COMPUTERNAME                   JACKIENB
ComSpec                        C:\WINDOWS\system32\cmd.exe
FPS_BROWSER_APP_PROFILE_STRING Internet Explorer
FPS_BROWSER_USER_PROFILE_ST... Default
HOMEDRIVE                      C:
HOMEPATH                       \Users\jacki
LOCALAPPDATA                   C:\Users\jacki\AppData\Local
LOGONSERVER                    \\JACKIENB
MGLS_LICENSE_FILE              C:\MentorGraphics\LICENSE.DAT
NUMBER_OF_PROCESSORS           4
OneDrive                       C:\Users\jacki\OneDrive
OS                             Windows_NT
Path                           C:\ProgramData\Oracle\Java\javapath;D:\PROCESSOR_SDK_VISION_03_01_00_00\ti_components\os_tools\windows\xdctools_3_32_01_22_core;C:\Program Files (x86)\In...
PATHEXT                        .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL
PROCESSOR_ARCHITECTURE         AMD64
PROCESSOR_IDENTIFIER           Intel64 Family 6 Model 142 Stepping 9, GenuineIntel
PROCESSOR_LEVEL                6
PROCESSOR_REVISION             8e09
ProgramData                    C:\ProgramData
ProgramFiles                   C:\Program Files
ProgramFiles(x86)              C:\Program Files (x86)
ProgramW6432                   C:\Program Files
PSModulePath                   C:\Users\jacki\OneDrive\文件\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PUBLIC                         C:\Users\Public
SESSIONNAME                    Console
SystemDrive                    C:
SystemRoot                     C:\WINDOWS
TEMP                           C:\Users\jacki\AppData\Local\Temp
TMP                            C:\Users\jacki\AppData\Local\Temp
USERDOMAIN                     JACKIENB
USERDOMAIN_ROAMINGPROFILE      JACKIENB
USERNAME                       jackie
USERPROFILE                    C:\Users\jacki
VS110COMNTOOLS                 C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\
VS120COMNTOOLS                 C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
VS140COMNTOOLS                 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
WDIR_PADSVX_2                  C:\PADS Projects
windir                         C:\WINDOWS

VS Code Terminal:VS.txt

PS D:\PROCESSOR_SDK_VISION_03_01_00_00\vision_sdk> Get-ChildItem Env:

Name                           Value
----                           -----
ALLUSERSPROFILE                C:\ProgramData
APPDATA                        C:\Users\jacki\AppData\Roaming
asl.log                        Destination=file
CommonProgramFiles             C:\Program Files\Common Files
CommonProgramFiles(x86)        C:\Program Files (x86)\Common Files
CommonProgramW6432             C:\Program Files\Common Files
COMPUTERNAME                   JACKIENB
ComSpec                        C:\WINDOWS\system32\cmd.exe
FPS_BROWSER_APP_PROFILE_STRING Internet Explorer
FPS_BROWSER_USER_PROFILE_ST... Default
GOOGLE_API_KEY                 AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q
HOMEDRIVE                      C:
HOMEPATH                       \Users\jacki
LANG                           en_US.UTF-8
LOCALAPPDATA                   C:\Users\jacki\AppData\Local
LOGONSERVER                    \\JACKIENB
MGLS_LICENSE_FILE              C:\MentorGraphics\LICENSE.DAT
NUMBER_OF_PROCESSORS           4
OneDrive                       C:\Users\jacki\OneDrive
OS                             Windows_NT
Path                           C:\ProgramData\Oracle\Java\javapath;D:\PROCESSOR_SDK_VISION_03_01_00_00\ti_components\os_tools\windows\xdctools_3_32_01_22_core;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files...
PATHEXT                        .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL
PROCESSOR_ARCHITECTURE         AMD64
PROCESSOR_IDENTIFIER           Intel64 Family 6 Model 142 Stepping 9, GenuineIntel
PROCESSOR_LEVEL                6
PROCESSOR_REVISION             8e09
ProgramData                    C:\ProgramData
ProgramFiles                   C:\Program Files
ProgramFiles(x86)              C:\Program Files (x86)
ProgramW6432                   C:\Program Files
PSModulePath                   C:\Users\jacki\OneDrive\文件\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
PUBLIC                         C:\Users\Public
SESSIONNAME                    Console
SystemDrive                    C:
SystemRoot                     C:\WINDOWS
TEMP                           C:\Users\jacki\AppData\Local\Temp
TERM_PROGRAM                   vscode
TERM_PROGRAM_VERSION           1.18.1
TMP                            C:\Users\jacki\AppData\Local\Temp
USERDOMAIN                     JACKIENB
USERDOMAIN_ROAMINGPROFILE      JACKIENB
USERNAME                       jackie
USERPROFILE                    C:\Users\jacki
VS110COMNTOOLS                 C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\
VS120COMNTOOLS                 C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
VS140COMNTOOLS                 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
VSCODE_CWD                     C:\Program Files\Microsoft VS Code
VSCODE_IPC_HOOK                \\.\pipe\d05508c76b298e82110b003a5ea2699f-1.18.1-main-sock
VSCODE_NLS_CONFIG              {"locale":"zh-tw","availableLanguages":{"*":"zh-tw"}}
VSCODE_NODE_CACHED_DATA_DIR... C:\Users\jacki\AppData\Roaming\Code\CachedData\929bacba01ef658b873545e26034d1a8067445e9
VSCODE_PID                     1080
WDIR_PADSVX_2                  C:\PADS Projects
windir                         C:\WINDOWS

@Tyriar
Copy link
Member

Tyriar commented Dec 12, 2017

It looks like your Path differs, maybe that's the problem? Bit hard to tell myself as I'm not familiar with the tooling you're using.

@jackietw
Copy link
Author

jackietw commented Dec 13, 2017

The path looks is same, but VS CODE added some variables.
So, I think this is another issue, are you checking it?

PS Path:

PS D:\PROCESSOR_SDK_VISION_03_01_00_00\vision_sdk> $ENV:PATH
C:\ProgramData\Oracle\Java\javapath;D:\PROCESSOR_SDK_VISION_03_01_00_00\ti_components\os_tools\windows\xdctools_3_32_01_22_core;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;D:\PROCESSOR_SDK_VISION_03_00_00_00\ti_components\os_tools\windows\xdctools_3_32_01_22_core;C:\Program Files\MATLAB\MATLAB Compiler Runtime\v84\runtime\win64;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\nodejs\;C:\Program Files\dotnet\;C:\Program Files (x86)\Xoreax\IncrediBuild;C:\Program Files\Git\cmd;D:\Program Files\MATLAB\R2017a\runtime\win64;D:\Program Files\MATLAB\R2017a\bin;C:\Users\jacki\AppData\Local\Microsoft\WindowsApps;C:\MentorGraphics\PADSVX.2\SDD_HOME\CAMCAD;C:\Users\jacki\AppData\Roaming\npm;C:\Program Files\Microsoft VS Code\bin;C:\Users\jacki\AppData\Local\GitHubDesktop\bin

VS CODE Path:

>PS C:\Users\jacki> $Env:PATH
>C:\ProgramData\Oracle\Java\javapath;D:\PROCESSOR_SDK_VISION_03_01_00_00\ti_components\os_tools\windows\xdctools_3_32_01_22_core;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;D:\PROCESSOR_SDK_VISION_03_00_00_00\ti_components\os_tools\windows\xdctools_3_32_01_22_core;C:\Program Files\MATLAB\MATLAB Compiler Runtime\v84\runtime\win64;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\nodejs\;C:\Program Files\dotnet\;C:\Program Files (x86)\Xoreax\IncrediBuild;C:\Program Files\Git\cmd;D:\Program Files\MATLAB\R2017a\runtime\win64;D:\Program Files\MATLAB\R2017a\bin;C:\Users\jacki\AppData\Local\Microsoft\WindowsApps;C:\MentorGraphics\PADSVX.2\SDD_HOME\CAMCAD;C:\Users\jacki\AppData\Roaming\npm;C:\Program Files\Microsoft VS Code\bin;C:\Users\jacki\AppData\Local\GitHubDesktop\bin

it is differs part:

GOOGLE_API_KEY                 AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q
LANG                           en_US.UTF-8
TERM_PROGRAM                   vscode                                                                                                                                                                                       
TERM_PROGRAM_VERSION           1.18.1 
VSCODE_CWD                     C:\Program Files\Microsoft VS Code                                                                                                                                                           
VSCODE_IPC_HOOK                \\.\pipe\d05508c76b298e82110b003a5ea2699f-1.18.1-main-sock                                                                                                                                   
VSCODE_NLS_CONFIG              {"locale":"zh-tw","availableLanguages":{"*":"zh-tw"}}                                                                                                                                        
VSCODE_NODE_CACHED_DATA_DIR... C:\Users\jacki\AppData\Roaming\Code\CachedData\929bacba01ef658b873545e26034d1a8067445e9                                                                                                      
VSCODE_PID                     1080

but this parameter only VS CODE have.
we just use extra compiler tools on Terminal.

@Tyriar
Copy link
Member

Tyriar commented Dec 14, 2017

I don't really have anything else to go on but this looks suspiciously similar to a problem that Python experiences so I'm going to close this in favor of #40199

@Tyriar Tyriar closed this as completed Dec 14, 2017
@Tyriar Tyriar added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 14, 2017
@jackietw
Copy link
Author

@Tyriar Linux version and MacOS version seem no this issue, Windows version, I just only running on Windows 10, other Windows I haven't.
I am not sure this issue similar as #40199

@Tyriar
Copy link
Member

Tyriar commented Dec 15, 2017

@jackietw #40199 is Windows only which is one of the reason I think it's the same root cause.

@jackietw
Copy link
Author

@Tyriar What time can fix this issue?
I am upgrade to 1.19.0 also seem has this issue.
Occur this issue seem print garbled text on integrated terminal cause command error,

I am try modified "terminal.explorerKind" parameter to external terminal, it seem has same problem, so I am not sure what's happen.

But if I don't print anything on integrated terminal, vs code can compile finish correctly.

@Tyriar
Copy link
Member

Tyriar commented Dec 27, 2017

@jackietw see #36630, the issue is fixed but it's a problem in Windows so I can't answer on the timeline.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster terminal Integrated terminal issues
Projects
None yet
Development

No branches or pull requests

3 participants