Repository navigation
Android code-server ARM issues #6090
Description
Activity
sean-mcmanus commented
on Sep 8, 2020 ContributorAuthorMore actionszengming00 We don't currently support running our extension on Android with code-server.
- The clang-format issue is being tracked by Using clang-format on Linux ARM/ARM64 requires that libtinfo5 is installed #5958 .
- The executable issue is related to code at https://github.com/microsoft/vscode-cpptools/blob/master/Extension/src/main.ts#L263 -- it must have some issue in regards to the platform checks. If you can run our open source TypeScript code you may be able to debug it to find out what is going wrong.
- mono.linux-arm64 and mono.linux-armhf should not co-exist. What vsix did you install? 0.30.0-insiders4 is recommended: https://github.com/microsoft/vscode-cpptools/releases/tag/0.30.0-insiders4
- By uname -m reporting aarch64 are you saying that it's reporting incorrectly and your device can't run arm64 code, only armhf code?
- addedmore info neededThe issue report is not actionable in its current stateThe issue report is not actionable in its current state
on Sep 8, 2020 我安装的vsix是此条评论中给出的版本:
https://github.com/microsoft/vscode-cpptools/issues/429#issuecomment-669502684所以它并不是最新的,我还没有尝试使用最新版本
clang-format的问题因为在那里有提到,所以我很快就发现它没有可执行权限,然后安装缺少的支持库后问题就解决了
当我准备调试一个程序时发现无法启动debug,我不知道发生了什么,因为没有任何错误日志或提示,我猜想可能像clang-format那样是可执行权限的问题,然后我就找到了mono.linux-arm64和mono.linux-armhf这两个文件,mono.linux-armhf确实是没有可执行权限,但给予权限后仍然无法启动debug,然后我看到了OpenDebugAD7发现它执行的是"mono.linux-arm64",当我改成运行"mono.linux-armhf"成功解决了这个问题
在我的设备上uname -m的结果是aarch64,可能是linuxdeploy的问题(https://github.com/meefik/linuxdeploy)
我目前还不知道怎样调试vscode的扩展程序,所以我无法提供更多有帮助的信息
在这里最主要的问题就是当文件没有可执行权限时没有任何提示,这对我找到问题的根源造成了一些麻烦
The vsix I installed is the version given in this comment:
https://github.com/microsoft/vscode-cpptools/issues/429#issuecomment-669502684So it is not the latest version, I have not tried to use the latest version
The problem with clang-format was mentioned there, so I quickly discovered that it did not have executable permissions, and the problem was solved after installing the missing support library
When I started debugging a program, I found that the debug could not be started. I don't know what happened, because there is no error log or prompt. I guess it might be an executable permission problem like clang-format, and then I found mono.linux -arm64 and mono.linux-armhf are two files, mono.linux-armhf does not have executable permissions, but after granting permissions, debugging still cannot be started. Then I saw OpenDebugAD7 and found that it was executing "mono.linux-arm64" ", when I changed to run "mono.linux-armhf" successfully solved the problem
The result of uname -m on my device is aarch64, which may be a problem with linuxdeploy (https://github.com/meefik/linuxdeploy)
I don’t know how to debug the extension of vscode yet, so I can’t provide more helpful information
The main problem here is that there is no prompt when the file does not have executable permissions, which caused some trouble for me to find the source of the problem.
I found a solution, change the output of 'uname -m'
sudo mv /usr/bin/uname /usr/bin/uname_old
Create file
/usr/bin/uname, and the content is:#!/bin/sh if [ "$#" -eq 1 ] && [ "$1" = -m ]; then echo armv7l else command uname_old "$@" fi
Set executable permissions
sudo chmod +x /usr/bin/uname
If use js code to detect hardware, it should be more reliable than
uname -mconst os = require('os'); console.log(os.arch());
sean-mcmanus commented
on Nov 10, 2020 ContributorAuthorMore actionszengming00 This should be fixed now with 1.1.1: https://github.com/microsoft/vscode-cpptools/releases/tag/1.1.1. .
- addedfixedCheck the Milestone for the release in which the fix is or will be available.Check the Milestone for the release in which the fix is or will be available.
on Nov 10, 2020 - locked and limited conversation to collaborators
on Dec 21, 2020
我在我的安卓手机上利用linux deploy部署了一个linux环境
I deployed a linux environment using "linux deploy" on my Android phone
然后通过"npm install -g code-server"安装了code-server
Then installed code-server through "npm install -g code-server"
发现两个问题
Two problems found
首先C源码无法格式化
First, the C source code cannot be formatted
原因是以下文件没有可执行权限
The reason is that the following files do not have executable permissions
还有libtinfo5不存在,我通过以下命令解决
And libtinfo5 does not exist, I solved it with the following command
第二个问题是无法启动debug
The second problem is unable to start debug
这三个其中一个没有执行权限:
mono.linux-arm64 mono.linux-armhf OpenDebugAD7One of these three has no executable permission:
mono.linux-arm64 mono.linux-armhf OpenDebugAD7./OpenDebugAD7 是个shell脚本,会根据
uname -m的结果来执行"mono.linux-arm64"或"mono.linux-armhf",在我的设备上uname -m的结果是aarch64,所以它会执行"mono.linux-arm64",但实际我设备上只能运行"mono.linux-armhf"./OpenDebugAD7 is a shell script that will execute "mono.linux-arm64" or "mono.linux-armhf" according to the result of
uname -m, and the result ofuname -mon my device is aarch64, so It will execute "mono.linux-arm64", but actually only "mono.linux-armhf" can be run on my deviceOriginally posted by zengming00 in #429 (comment)