Skip to content
This repository has been archived by the owner on Apr 14, 2022. It is now read-only.

linux-arm64 For Raspberry Pi 4 Support #2073

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lishewen
Copy link

Passed on VSCode Remote SSH to Ubuntu 20.04 LTS For Raspberry Pi 4 aarch64

@ghost
Copy link

ghost commented Jun 15, 2020

CLA assistant check
All CLA requirements met.

@@ -25,7 +25,7 @@
<Compile Remove="Models\GenericParameterModel.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="LiteDB" Version="4.1.4" />
<PackageReference Include="LiteDB" Version="5.0.8" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all of these upgrades required, or just the addition of arm64? This LiteDB upgrade contains breaking format changes that will break the existing code.

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package upgrades seem unnecessary if this change is about adding arm64 support.

@MikhailArkhipov
Copy link

MikhailArkhipov commented Jun 15, 2020

I'd probably separate package upgrades from just adding the platform. Also, adding new platform won't make LS load in Python Extension since it does its own platform checks and may or may not permit ARM. Extension needs to be modified to properly calculate URL for the ARM download.

https://github.com/microsoft/vscode-python/blob/master/src/client/activation/languageServer/languageServerPackageService.ts

@lishewen
Copy link
Author

lishewen commented Jun 20, 2020

I'd probably separate package upgrades from just adding the platform. Also, adding new platform won't make LS load in Python Extension since it does its own platform checks and may or may not permit ARM. Extension needs to be modified to properly calculate URL for the ARM download.
https://github.com/microsoft/vscode-python/blob/master/src/client/activation/languageServer/languageServerPackageService.ts

https://github.com/microsoft/vscode-python/blob/master/src/client/activation/languageServer/languageServerPackageService.ts#L39
This place treats arm64 as x64 that causes the PLS to crash at startup.

Downloading https://pvsc.azureedge.net/python-language-server-stable/Python-Language-Server-linux-x64.0.5.50.nupkg...
Language server download complete
Unpacking archive... done
[Error - 7:11:48 AM] Connection to server is erroring. Shutting down server.
[Error - 7:11:48 AM] Connection to server is erroring. Shutting down server.
[Error - 7:11:48 AM] Connection to server is erroring. Shutting down server.
/home/ubuntu/.vscode-server/extensions/ms-python.python-2020.6.88468/languageServer.0.5.50/Microsoft.Python.LanguageServer: 1: cannot create �5@@8j@8
@ ���@@@@@0�0����p�p�@p�@�����@@49�49� �� <� <a <a
� ��=�=a=a@�@���� � �@ �@DD� � <� <a <a��P td�� �� A� A � ��Q td��R td� <� <a <a � ��/lib64/ld-linux-x86-64.so.2���GNU�� ���GNU fS[ wD 㶱 kF (FCI� � � �!� ��� �� j Cֺ |CE : 2b K � qX� � : � �yIk ��� ��    �}�� ��4    ��� ��s    � �� ��  - Q��(��A  �~ �[��!�� ��I��    �m��1�� �� ���
�.��;   �/�� �� �����  �: Directory nonexistent
/home/ubuntu/.vscode-server/extensions/ms-python.python-2020.6.88468/languageServer.0.5.50/Microsoft.Python.LanguageServer: 1: �ELF����: not found
/home/ubuntu/.vscode-server/extensions/ms-python.python-2020.6.88468/languageServer.0.5.50/Microsoft.Python.LanguageServer: 4: �_: not found
/home/ubuntu/.vscode-server/extensions/ms-python.python-2020.6.88468/languageServer.0.5.50/Microsoft.Python.LanguageServer: 5: � �� ��: not found
/home/ubuntu/.vscode-server/extensions/ms-python.python-2020.6.88468/languageServer.0.5.50/Microsoft.Python.LanguageServer: 6: � � � : not found
/home/ubuntu/.vscode-server/extensions/ms-python.python-2020.6.88468/languageServer.0.5.50/Microsoft.Python.LanguageServer: 12: � �� �  � ��� �%�� � ��G    � ��E��f��r � �     � �� �@ �w��/��D��b�� ��    �   �["
��  � "P � �� �� �� ��� � ��y   � " ��Q��k  �I�� �� ��  �X  � ��    � ���
�� Ca
�� Ha
�� Ha
 � Ca

5@p: not found
/home/ubuntu/.vscode-server/extensions/ms-python.python-2020.6.88468/languageServer.0.5.50/Microsoft.Python.LanguageServer: 13: �� @� : not found
/home/ubuntu/.vscode-server/extensions/ms-python.python-2020.6.88468/languageServer.0.5.50/Microsoft.Python.LanguageServer: 1:  @U�: not found
/home/ubuntu/.vscode-server/extensions/ms-python.python-2020.6.88468/languageServer.0.5.50/Microsoft.Python.LanguageServer: 18: 
@ �

@e
�� Ha

h+@
: not found
/home/ubuntu/.vscode-server/extensions/ms-python.python-2020.6.88468/languageServer.0.5.50/Microsoft.Python.LanguageServer: 19: �
p @�j: not found
/home/ubuntu/.vscode-server/extensions/ms-python.python-2020.6.88468/languageServer.0.5.50/Microsoft.Python.LanguageServer: 20: ��t @ �� 1@libpthread.so.0_ITM_deregisterTMCloneTable_Jv_RegisterClasses_ITM_registerTMCloneTable__pthread_key_create__errno_locationpthread_mutex_lockpthread_mutex_unlocklibdl.so.2__gmon_start__dlclosedlsymdladdrdlopendlerrorlibstdc++.so.6_ZNSs4_Rep10_M_destroyERKSaIcE_ZNKSs5rfindEPKcmm_Znam_ZNKSs12find_last_ofEPKcmm_ZNKSt5ctypeIcE13_M_widen_initEv_ZNSi4peekEv_ZSt17__throw_bad_allocv_ZNSs6appendERKSsmm_ZNSi5seekgElSt12_Ios_Seekdir_ZSt16__throw_bad_castv_ZdaPv_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l_ZNKSs7compareEmmRKSs__cxa_throw_ZSt20__throw_system_errori__cxa_rethrow_ZSt9terminatev_ZNSsC1ERKSsmm_ZNKSs5rfindEcm_ZNSt8__detail15_List_node_base7_M_hookEPS0__ZNSt8ios_base4InitD1Ev_ZNSt6localeD1Ev_ZNSs6appendEmc_ZNSsC1EPKcRKSaIcE_ZNKSs7compareEPKc_ZNSt13basic_fstreamIcSt11char_traitsIcEEC1Ev_ZNSt13basic_filebufIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode_ZNSi4readEPcl_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate_ZNSt13basic_filebufIcSt11char_traitsIcEE5closeEv_ZTTSt13basic_fstreamIcSt11char_traitsIcEE_ZSt20__throw_out_of_rangePKc_ZNKSs4findEcm_ZNSt18basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKSsSt13_Ios_Openmode_ZNKSs17find_first_not_ofEPKcmm_ZNSs6assignEPKcm_ZNKSs4findEPKcmm__cxa_begin_catch_ZTVN10__cxxabiv116__enum_type_infoE_ZNSs4_Rep20_S_empty_rep_storageE_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv__gxx_personality_v0_ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RSbIS4_S5_T1_ES4__ZNSs12_M_leak_hardEv_ZNSs6appendEPKcm_ZSt24__throw_invalid_argumentPKc_ZNSs4swapERSs_ZTVSt15basic_stringbufIcSt11char_traitsIcESaIcEE_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ZNSolsEi_Znwm_ZNSs9_M_mutateEmmm_ZNSs4_Rep9_S_createEmmRKSaIcE_ZNSt8ios_baseD2Ev_ZNSs6assignERKSs__cxa_allocate_exception__cxa_end_catch_ZNSt13basic_fstreamIcSt11char_traitsIcEED2Ev_ZTTSt18basic_stringstreamIcSt11char_traitsIcESaIcEE_ZNSt18basic_stringstreamIcSt11char_traitsIcESaIcEEC1ESt13_Ios_Openmode_ZNSs4_Rep11_S_terminalE_ZNSsC1ERKSs_ZNSs7reserveEm_ZNSt8ios_base4InitC1Ev_ZNSs6appendERKSs_ZdlPv_ZNKSs7compareEmmPKclibm.so.6libgcc_s.so.1_Unwind_Resumelibc.so.6fflushfnmatchreaddirfopenstrncmpperrorclosedir__stack_chk_failmkdirtolowergetpidstrftimegmtimestrtolfgetsstrlen__cxa_atexitmemsetrmdirfseekmemcmpvsnprintfstdoutfputcfputsmemcpyfclosestrtoulstrcasecmprealpathremoveopendirgetenvsscanfstderrstrncasecmpusleepgetcwd__getdelimfwritefreadrename__xstataccessstrcmp__libc_start_mainvfprintffreeld-linux-x86-64.so.2__tls_get_addr/netcoredeps__libc_csu_fini_IO_stdin_used__data_start_ZNSt6vectorISsSaISsEE19_M_emplace_back_auxIJRKSsEEEvDpOT___libc_csu_init__bss_start_end_edata_ZN9__gnu_cxx12__to_xstringISscEET_PFiPT0_mPKS2_P13__va_list_tagEmS5_zGCC_3.0GLIBC_2.2.5GLIBC_2.3GLIBC_2.14GLIBC_2.4GLIBCXX_3.4.9GLIBCXX_3.4.15CXXABI_1.3GLIBCXX_3.4.11GLIBCXX_3.4������������������������������������������������� ���: File name too long
/home/ubuntu/.vscode-server/extensions/ms-python.python-2020.6.88468/languageServer.0.5.50/Microsoft.Python.LanguageServer: 21: Syntax error: "(" unexpected

@lishewen
Copy link
Author

lishewen commented Jun 20, 2020

My current solution:

Add linux-arm64 RuntimeIdentifiers and Build

dotnet publish -c release -r linux-arm64

Replace the output to the directory /home/ubuntu/.vscode-server/extensions/ms-python.python-2020.6.88468/languageServer.0.5.50/

Add permissions

sudo chmod +x Microsoft.Python.LanguageServer

Normal after reopen vscode

@danieldjewell
Copy link

For what it's worth - and at the risk of introducing scope creep ...... linux-arm64 (in this case, native Linux on arm64/aarch64 on a Raspberry Pi...) ... But would this also work for Windows on ARM? And especially WSL2 on ARM?

Given that Microsoft has doubled-down on ARM (you gotta be pretty serious to make a custom processor and not something off-the-shelf), it seems wise to ensure that this runs not only on linux-arm64 but wsl2-arm64 win-arm64, etc.

See: https://www.github.com/microsoft/vscode/issues/33620

@MikhailArkhipov
Copy link

Have you tried Pylance LS? It is in typescript so should run on any platform. https://devblogs.microsoft.com/python/announcing-pylance-fast-feature-rich-language-support-for-python-in-visual-studio-code/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants