Closed ArtHome12 closed 5 years ago
If what you show above is the authentic output then based on the your prompt it seems that your OSS terminal is differently configured from your VS Code terminal. I'd suspect that this is also the cause for your different host/target configurations for gcc.
Yes, it is the authentic output, with russian locale "версия" :) I have changed only the name of the computer and login.
However, I did not make any manual settings. Maybe important - I installed VSCode before clang.
@ArtHome12 Looks like the RPATH is wrong in the vscode terminal, which will break compile&run from that terminal for projects with shared libs. Whats your linux distro? Maybe it sets RPATH in some init script that is not called in vscode's terminal? Also note your different prompt, you either run a totally different shell (sh vs. bash?) which lacks some env vars or the shell is missing some init script (like said above).
@jerch Linux Mint x64 4.15.0-38-generic. The variable RPATH is not set. From VSCode without any changes:
RPATH is not meant to be set directly as env var (discouraged for many many years), it acts behind the scenes (see https://wiki.debian.org/RpathIssue). I still think your system simply launches the wrong shell for vscode, maybe it cannot resolve bash
due a custom install path (multiple bash versions installed)?
What are the shown results of these two commands:
echo $0
make -v
for the system terminal emulator and vscode's emulator?
Please also post the output of env
. Does running bash -li
in the integrated terminal change anything?
Thank you for help. Below result of the commands
here we go: /bin/sh
vs. bash
. Maybe your system has a custom path to the bash executable, you can explicitly set it in the terminal settings.
Still weird that your /bin/sh
shell cannot resolve the arch triplet correctly, at least on my Ubuntu machine this works as expected (also Debian based).
Edit: Oh well, you have different build sets installed, see "GNU Make 4.1" vs. "GNU Make 4.2.1". For some reason /bin/sh
defaults to the other one. To fix that you have to consult your distro's help (in Ubuntu you can switch buildsets with the update-alternatives
command).
I figured out the problem. There are two ways to install VS Code:
/usr/share/code/code --unity-launch %F
. /usr/bin/flatpak run --branch=stable --arch=x86_64 --command=code --file-forwarding com.visualstudio.code --reuse-window @@ %F @@
Both versions of VSCode work without interfering with each other. :)
So this problem does not apply to VS Code and I will close the thread in a few days. Please advise where to report this problem (latest linux mint + program manager + flatpack).
Issue Type: Bug
The behavior of the OS terminal and integrated VSCode differs. In the OS terminal:
In the VSCode integrated:
The difference is -unknown- and -pc-. Result of whoami is the same on both terminals. This is not a minor problem, it manifests itself further and breaks the compilation of complex projects under VSCode when with CLI is Ok.
In the OS terminal:
In the VSCode integrated:
There is only one object (really 3) and it has different name -
x86_64-unknown-linux-gnu
instead correctx86_64-linux-gnu
.VS Code version: Code 1.28.2 (7f3ce96ff4729c91352ae6def877e59c561f4850, 2018-10-17T00:20:56.183Z) OS version: Linux x64 4.15.0-38-generic
System Info
|Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-4710MQ CPU @ 2.50GHz (8 x 2652)| |GPU Status|2d_canvas: enabledchecker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: disabled_software
video_decode: unavailable_software
video_encode: unavailable_software
webgl: enabled
webgl2: enabled| |Load (avg)|1, 1, 1| |Memory (System)|7.71GB (0.65GB free)| |Process Argv|--extensions-dir=/home/artem/.var/app/com.visualstudio.code/data/vscode/extensions --reuse-window| |Screen Reader|no| |VM|0%|
Extensions (6)
Extension|Author (truncated)|Version ---|---|--- git-project-manager|fel|1.7.1 autoconf|mae|0.0.7 vscode-clang|mit|0.2.3 vscode-language-pack-ru|MS-|1.28.2 cpptools|ms-|0.20.1 vscode-arduino|vsc|0.2.22