I want to run a web server with Rust and Actix-Web. After following these steps of their documentation everything works as expected: the server runs on port 8080.
The problem I have is that VSCode shows errors
This error message is shown in the tooltip upon hovering the error in the IDE
proc macro main not expanded: Cannot create expander for /Users/name/Documents/projects/project-rust/target/debug/deps/libactix_web_codegen-b262af45f63000f3.dylib: Io(Custom { kind: InvalidData, error: DlOpen { desc: "dlopen(/Users/name/Documents/projects/project-rust/target/debug/deps/libactix_web_codegen-b262af45f63000f3.dylib, 0x000A): tried: '/Users/name/Documents/projects/project-rust/target/debug/deps/libactix_web_codegen-b262af45f63000f3.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libactix_web_codegen-b262af45f63000f3.dylib' (no such file), '/usr/lib/libactix_web_codegen-b262af45f63000f3.dylib' (no such file)" } })
Environemnt - macOS Monterey 12.1 (M1)
VS Code
Thanks, #Smitop for the tip
I reinstalled VSCode with universal build and the errors are gone
P.S. I tried to install the build for Apple Silicon, but it didn't help
NVIM (macOS, arm64, m1)
For those experiencing the same issue in NeoVim, the following steps helped resolve the errors.
Open a terminal
Execute rustup toolchain list
It should print
stable-aarch64-apple-darwin (default)
stable-x86_64-apple-darwin
Copy the stable-x86_64-apple-darwin and make it default, by using rustup default stable-x86_64-apple-darwin
Re-open NeoVim.
Errors should disappear
Related
I have successfully installed the LeetCode extension and node.js,then I click the icon of Switch Endpoint or Sign in that in LeetCode extension ,it reports these error:
command 'leetcode.toggleLeetCodeCn' not found
or
command 'leetcode.signin' not found.
I have tried changing the version of nodejs and LeetCode extension, but it didn't work. When I reload the VSCode window, it would reports this error:
LeetCode extension needs Node.js installed in environment path
And then I follow the prompts to open the output channel, the OUTPUT menu show:
/bin/sh: 1: /usr/local/bin: Permission denied
Error: The environment doesn't meet requirements.
Has anyone ever encountered this problem? please help me! thanks.
my software version:
Ubuntu: 16.04 x64
VScode: 1.52.1 x64
nodejs version which I have tried: 8.9.3/15.6.0/15.10.0
leetcode extension version which I have tried: 0.16.2/0.17.0
This error also occurs to me. The leetcode plugin worked well in the past weeks, but today, all of sudden, it stopped working
I tried
re-intall leetcode cli globally
add source .bash_profile and .bashrc to my zshrc
update node
However, none of them works.
The problem was resolved by doing the follow
disable leetcode plugin
reload
enable leetcode plugin
Installation vscode
I'm running Arch Linux (Manjaro) and installed vscode with:
sudo pacman -S code
but then a simple .NET core program resulted in
--------------------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (clrdbg) with Visual Studio
Code, Visual Studio or Visual Studio for Mac software to help you develop and
test your applications.
--------------------------------------------------------------------------------
It seems like the official Microsoft build should be obtained via the snap store:
sudo snap install code --classic
And the program looks normal. I can install plug-ins, create a new file et cetera.
Problem
However, I cannot open any files or projects. Doing so results in vscode crashing. I read that code --disable-gpu could solve this problem, but doesn't do so for me.
Any ideas
what may cause this crash?
or how to get the pacman vscode working?
Logs
$ code --verbose
Gtk-Message: 22:59:19.805: Failed to load module "canberra-gtk-module"
Gtk-Message: 22:59:19.805: Failed to load module "canberra-gtk-module"
(code:33833): GdkPixbuf-WARNING **: 22:59:19.817: Cannot open pixbuf loader module file '/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory
This likely means that your installation is broken.
Try running the command
gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache
to make things work again for the time being.
[33863:1104/225919.911481:ERROR:appcenter_api.cc(52)] expecting appcenter url prefix
[main 2020-11-04T21:59:19.960Z] Sending env to running instance...
[main 2020-11-04T21:59:20.041Z] Sent env to running instance. Terminating...
[main 2020-11-04T21:59:20.041Z] Lifecycle#kill()
where the recommended gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache results in bash: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache: No such file or directory
I'm running Arch Linux (Manjaro) and installed vscode with:
sudo pacman -S code
but then a simple .NET core program resulted in
--------------------------------------------------------------------------------
You may only use the Microsoft .NET Core Debugger (clrdbg) with Visual Studio
Code, Visual Studio or Visual Studio for Mac software to help you develop and
test your applications.
--------------------------------------------------------------------------------
I had the same issue trying to get the debugger to work and I spent hours on finding the reason for this. What I found out is that the debugger only works with officially signed Microsoft binaries of VSCode. So you have to make a distinction here:
The package code contains the open source version of visual studio code, a build wich anyone can make using the provided sources by Microsoft. The program which you get here is therefore not signed by MS!
The package visual-studio-code-bin provided by the AUR contains a officially signed version by MS. If you use this package, the debugger works as expected.
I do not know wether snap - which I personally never used at all - provides this kind of package, so I can not tell anything about that, but using the said package from the user repository solved the problem for me reliably.
Try this one (which I installed just yesterday under the recent manjaro distribution and it worked fine) and see if this solves your problem with opening files and folders.
I've been trying to set up Lazarus to compile for Windows CE 5.0, specifically for a Motorola MK-4000. However, I'm not having much success, and the instructions to set up the IDE appear to be outdated.
I'm using Lazarus v1.8.4 for Windows x64.
The problem starts when I'm told to download and install cross-arm-wince from the same download page as Lazarus. There is no such thing there. I did however find lazarus-1.8.4-fpc-3.0.4-cross-i386-win32-win64.exe which is the only mention of "cross" I can find. Not what I need, but installed anyway.
Now I go to set up my project in the IDE. I start a new application, but Project -> Project Options -> Compiler Options -> Paths -> LCL Widget Type or Project -> Project Options -> Compiler Options -> Paths -> Select another widget set (Macro LCLWidgetType) are not found, nor do I see any mention of "Widget".
Next two instructions for Target OS and CPU Family are okay, I found those settings and changed to WinCE and arm.
Upon saving project options, I see an error message:
Compiler "C:\lazarus\fpc\3.0.4\bin\x86-64-win64\fpc.exe" does not support target arm-wince
Except for the "Widget" setting I couldn't find, now I try to go ahead and build a new unaltered application. But to no surprise, I get an error:
Error: ppcarm.exe can't be executed, error message: Failed to execute ""ppcarm.exe" -Twince -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -FuC:\lazarus\packager\registration\ -FUC:\lazarus\packager\units\arm-wince\ fcllaz.pas
I went ahead and installed the arm-wince from FPC 3.0.0 (My Lazarus version came with 3.0.4), and it installed into its own FPC directory outside of the Lazarus directory. However I'm extremely new to FPC/Lazarus and have no idea how to make the IDE actually work with the other compiler.
As a dirty trial, I temporarily copied the compilers from the 3.0.0 dir to the 3.0.4 one, and the first attempt failed (I didn't note the error message at that time), but I just tried again and it compiled! Obviously blindly dumping files into the bin is not the appropriate solution, as I'm sure there's a proper way to configure this. It doesn't run on the device anyway, just shows the title in the taskbar and no UI ever opens.
What am I missing to get Lazarus to compile for Windows CE?
Well, that is a win32->win64 crosscompiler. You need a win32 -> arm-wince compiler. (assuming that the device is arm and not i386)
Not the same thing. Seems that prebuilding for arm-wince has stopped, so you have to build your own. Try reading the buildfaq.
For 3.0.0 the relevant crosscompiler is prebuilt, maybe it is enough for simple testing: ftp://ftp.freepascal.org/pub/fpc/dist/3.0.0/arm-wince/
I want to start coding in VB.Net but I have a Linux machine ATM i don't want to switch to Windows.
I installed MonoDevelop on my Ubuntu 16.04 by following the steps from their page: http://www.monodevelop.com/download/linux/. Everything is fine until I try to run the program I get the following error:
/home/user/Projects/Project/Project/Project.vbproj: Error: Target named 'Build' not found in the project.
I searched around for a solution but didn't find any. Didn't mess with any of the settings just created the project and tried to compile. Is there anything extra i had to install/set maybe?
Thanks in advance!
I've recently loaded the new Android dev tools, SDK 20130717 and NDK r9.
Up to now I had the previous versions, working and debugging from within Eclipse just fine on both of my systems, a XP and a W7/64.
Now, the W7/64 with the new tools does work and debug my apps ok after the new tools installation and the required path environment changes.
It works ok when I select the "Debug As" + "Android Native Application".
Yet the XP, although they have the exact configuration in terms of folders/cygwin etc, after the new tools installed and the necessary path env changed, it looks that it can't start the ndk-dbg and it;s stuck waiting in definitively at "Launching MyApp(1): (100%)".
That happens after I select the "Debug As" + "Android Native Application".
Any hints on what might be the cause of it? or
is there any known issue on XP and r9 debugging that I miss?
thanks,
Christos
*edit
Tried to start manually the ndk-gdb and this is what I get, any hints are welcome
Blockquote
$ ndk-gdb --start --verbose --force
Android NDK installation path: /cygdrive/e/android-ndk-r9
Using default adb command: /cygdrive/e/adt-bundle-windows-x86-20130717/sdk/platform-tools/adb
ADB version found: Android Debug Bridge version 1.0.31
Using ADB flags:
Using JDB command: /cygdrive/e/Android/Java/jdk1.7.0_21/bin/jdb
Using auto-detected project path: .
Found package name: myndkpackage
ABIs targetted by application: armeabi-v7a
Device API Level: 17
Device CPU ABIs: armeabi-v7a armeabi
Compatible device ABI: armeabi-v7a
Using gdb setup init: ./libs/armeabi-v7a/gdb.setup
Using toolchain prefix: /cygdrive/e/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/arm-linux-androideabi-
Using app out directory: ./obj/local/armeabi-v7a
Found debuggable flag: true
Found device gdbserver: /data/data/myndkpackage/lib/gdbserver
Found data directory: '/data/data/myndkpackage'
Found first launchable activity: myndkpackage.MainActivity
Launching activity: myndkpackage/myndkpackage.MainActivity
COMMAND: adb_cmd shell am start -D -n myndkpackage/myndkpackage.MainActivity
Starting: Intent { cmp=myndkpackage/.MainActivity }
COMMAND: adb_cmd shell sleep 2
Found running PID: 2787
Killing existing debugging session
COMMAND: adb_cmd shell kill -9 2753
Launched gdbserver succesfully.
Setup network redirection
COMMAND: adb_cmd shell run-as myndkpackage lib/gdbserver +debug-socket --attach 2787
COMMAND: adb_cmd forward tcp:5039 localfilesystem:/data/data/myndkpackage/debug-socket
Attached; pid = 2787
Listening on Unix socket debug-socket
COMMAND: adb_cmd pull /system/bin/app_process obj/local/armeabi-v7a/app_process
599 KB/s (9588 bytes in 0.015s)
Pulled app_process from device/emulator.
COMMAND: adb_cmd pull /system/bin/linker obj/local/armeabi-v7a/linker
658 KB/s (63244 bytes in 0.093s)
Pulled linker from device/emulator.
COMMAND: adb_cmd pull /system/lib/libc.so obj/local/armeabi-v7a/libc.so
744 KB/s (297608 bytes in 0.390s)
Pulled libc.so from device/emulator.
Setup JDB connection
COMMAND: adb_cmd forward tcp:65534 jdwp:2787
java.io.IOException: handshake failed - connection prematurally closed
at com.sun.tools.jdi.SocketTransportService.handshake(SocketTransportService.java:136)
at com.sun.tools.jdi.SocketTransportService.attach(SocketTransportService.java:232)
at com.sun.tools.jdi.GenericAttachingConnector.attach(GenericAttachingConnector.java:116)
at com.sun.tools.jdi.SocketAttachingConnector.attach(SocketAttachingConnector.java:90)
at com.sun.tools.example.debug.tty.VMConnection.attachTarget(VMConnection.java:519)
at com.sun.tools.example.debug.tty.VMConnection.open(VMConnection.java:328)
at com.sun.tools.example.debug.tty.Env.init(Env.java:63)
at com.sun.tools.example.debug.tty.TTY.main(TTY.java:1066)
Fatal error:
Unable to attach to target VM.
/cygdrive/e/android-ndk-r9/ndk-gdb: line 742: 4636 Segmentation fault $GDBCLIENT -x native_path $GDBSETUP
Blockquote
Ok,
From what I understand, its a problem in the new r9 release, specifically in the file named
android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/arm-linux-androideabi-gdb
This executable gives the segmentation fault.
So it looks that in the distro it has not been generated correctly from the start, from the android devs themselves who uploaded it on the main android site.
I tried and re-downloaded the r9 distribution and re-installed, yet the same thing happens so it was not something accidental eg a bad unzip.
I tried the older r8e same file and it does not give the segmentation fault, it works ok.
So, I did something to get a proof of concept of what I say and took the previous version file (from r8e) and overwrite the new r9 file, then tried again to run the failing ndk-dbg and..
..IT WORKS..
Now I have a new r9 NDK but with one file from the r8e, the old arm-linux-androideabi-gdb.exe and everything works just fine!
So I guess the android devs have to re-do the compilation of the
-> android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/arm-linux-androideabi-gdb.exe
tool, properly this time.
At least I hope someone will find this useful and avoid the frustration that I had all this time.
Christos
This is the bug that was opened on the Android NDK. A work-around is to use the arm-linux-androideabi-gdb.exe from Android NDK r8e (as described in Christos' answer), or to download a fixed file from http://code.google.com/p/mingw-and-ndk/downloads/detail?name=arm-linux-androideabi-gdb.exe.
Just for the record, the problem with gdb appears to be fixed in r9b of the NDK.
https://developer.android.com/tools/sdk/ndk/index.html
Fixed a problem with Windows 32-bit *-gdb.exe executables failing to
launch. (Issue 58975)