c/c++ language server unable to start(and intellisense too) showing spawn unknown system error -86 on my m1 macbook - visual-studio-code

When I install the C/C++ extension(by Microsoft) on my M1 Macbook after installing Visual Studio Code for the first time,
As soon as I create a cpp file, I get this error:
[Error - 10:26:19 AM] Starting client failed
Error: spawn Unknown system error -86
at ChildProcess.spawn (internal/child_process.js:407:11)
at Object.spawn (child_process.js:557:9)
at /Users/akshay/.vscode/extensions/ms-vscode.cpptools-1.2.2/dist/main.js:15519:40
I'm using the M1 Macbook and clang works properly(it can compile the program)
but Intellisense does not work (I downloaded previous version of c/c++ extension too , it has the same problem)

Related

Visual Studio Code macOS: error loading OmniSharp: spawn EACCES

I'm having no luck in trying to make the C# extension work in macOS. When loading the sln file everything seems to load just fine other than OmniSharp. This makes it hard or impossible to work with Visual Studio Code.
Here's the error I get:
Starting OmniSharp server at 2018-5-4 13:51:51
Target: /PATH/TO/PROJECT/Project.sln
[ERROR] Error: spawn EACCES
Which tells very little about what's wrong.
I followed all instructions found here, including installing Mono SDK but OmniSharp keeps giving this error. I also tried
to install the extension from a vsix file
to overwrite the omnisharp folder content with what I found here
All leading to the same error.
When the extension is freshly installed, it automatically downloads the OmniSharp package and successfully installs it.
Installing C# dependencies...
Platform: darwin, x86_64
Downloading package 'OmniSharp for OSX' (24026 KB) .................... Done!
Downloading package '.NET Core Debugger (macOS / x64)' (44057 KB) .................... Done!
Installing package 'OmniSharp for OSX'
Installing package '.NET Core Debugger (macOS / x64)'
Finished
Someone suggests to add a+x permissions recursively to the whole project folder (as found in this official thread) but is this really necessary? All files in extensions belong to the same staff group as all files in the project do.
I tried this anyway but still [ERROR] Error: spawn EACCES
I'm using Visual Studio Code 1.23.0 and the OmniSharp's version is 1.14.0.
I should also say that all projects I am trying to open are generated by Unity 3D and I have the Unity Debug extension installed.
I don't know where else to go from here. Would someone be able to give advice on this?

Eclipse installation error: java.io.IOException

I tried to install Eclipse Oxygen on my macbook with High Sierra. The installation failed with logs.
At the end of the log I found:
java.io.IOException: Failed to create directory /Users/macuser/.p2/pool/plugins.
I have my username on the macbook which is different than macuser. I'm wondering how to make Eclipse installation or how to tell my mac not create directory inside "macuser" but inside "mycustomser" instead.

NetBeans strange error

I installed MinGW, and I'm trying to setting it on NetBeans to develop on C/C++.
Well, when I try to compile the source, (I do a clean and build) it gives me this error:
make.exe": *** [.validate-impl] Error 53
BUILD FAILED (exit value 2, total time: 364ms)
These are my settings on NetBeans for C/C++:
C Compiler: C:\MinGW\bin\gcc.exe
C++ Compiler: C:\MinGW\bin\g++.exe
Assembler: C:\MinGW\bin\as.exe
Make Command: C:\MinGW\msys\1.0\bin\make.exe
Debugger Command: C:\MinGW\bin\gdb.exe

Executing cuda program through Eclipse is giving error

I am using eclipse to execute a cuda program. I have downloaded a CUDA PLUGIN for
eclipse. When I execute sample cuda program given by plugin its fine but when I try
to execute any other program I am getting error undefined reference to main...
make
Building target: Add_cuda
Invoking: NVCC Linker
nvcc -L/export/trainee3/dinesh/cuda5.0/lib64 -o "Add_cuda" ./mycuda.o -lcudart
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
I found in stackoverflow that some times we get this problem because of system startup file
I used flag -nostartfiles but it is not working in my case..
I have included lib64 and include path in c++ build.
So any suggestion to over come this problem....
We've been over this already.
Use nsight eclipse edition instead.
If you have cuda 5.0 or 5.5 installed, just type nsight in a terminal session.
If you really want to use that Eclipse CUDA plugin (which is no longer supported, I don't believe), then start with the C++ sample project, which you agree now and back then would work. Then modify the source code in that project. Don't create your own project.
Install CUDA 5. It comes with Nsight Eclipse version. Very Elegant to use. NV Visual profiler is integrated with Nsight. Syntax highlighting and debug mode are very easy to use.

Nsight Eclipse Edition not finding nvcc

I just installed CUDA 5.0 Preview (Mac OS X Lion) and I'm having trouble with Nsight.
The toolkit seems to be installed correctly. (Driver loads, nvcc -V works in bash, samples work fine).
When I create a new project I get warnings:
Error launching external scanner info generator (nvcc -dryrun ...)
Program 'nvcc' is not found in $PATH
In Preferences -> CUDA Toolkit I get no CUDA-compatible devices detected. Which is strange because I have nVidia GT 650M on my machine. So why doesn't Nsight recognize it?
If I try to build a project I get 2 errors:
/bin/sh: nvcc: command not found
make: * [src/test.o] Error 127
How do you start Nsight? Do you use /usr/local/cuda/bin/nsight? Unfortunately, it is not currently possible to launch Nsight by double-clinking the application on Mac OS X.
In the CUDA 5.0 Preview build we had a bug when shell script did not properly setup paths. This is how this script looks like in latest internal toolkit builds (you may need to adjust paths depending on your toolkit install location - in the final release installer will handle it):
#!/bin/sh
PATH="$PATH:/Developer/NVIDIA/CUDA-5.0/bin" DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:/Developer/NVIDIA/CUDA-5.0/lib" "/Developer/NVIDIA/CUDA-5.0/libnsight/nsight.app/Contents/MacOS/nsight" $#