Repository navigation
Add ARM64 build target for linux-musl libc #25762
Description
Activity
- addedNeeds-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.
on Jul 17, 2025 - changed the title
[-]Add ARM64 build target for linux-musl backend[/-][+]Add ARM64 build target for linux-musl libc[/+]on Jul 17, 2025 Is there any updates to this?
Hey 👋🏻,
Any news on this topic ?
cc Rich Lander (@richlander), given that we now have official support for .net 10/alpine/docker, I think it would be great to prioritize this. Currently, it is not possible to install PowerShell on alpine/arm64, and PowerShell is one essential tool for .NET developers.
Travis Plunk (@TravisEz13) Steve Lee (@SteveL-MSFT) could you help us move forward on this issue? It would be really great to unlock the use of PowerShell on this alpine/arm64 platform.
Reacted by Logan Bussell, backtrack5r3 and Chongyi ZhengFor the record I was able to make it work by doing the following:
1- On a Win11/x64 machine I cross-compiled
powershellto targetAlpine/linux-musl-arm64:- I updated the build script to add the proper
linux-musl-arm64target. - Then I ran:
Import-Module ./build.psm1 Start-PSBuild -Runtime linux-musl-arm64 -Configuration Release
- I had several issues while restoring packages. Perhaps the root issue is on my side but after playing with the
nuget.configand manually downloading some of them to my cache, I was able to build everything. Perhaps thepowershellregistry is not up-to-date with latest .net packages. I spotted only later that there is aSwitch-PSNugetConfig -Source NuGetOnly.
2- When trying to run
pwshon the targetAlpine/linux-musl-arm64machine, I got:Unhandled exception. System.TypeInitializationException: The type initializer for 'System.Management.Automation.Tracing.PSEtwLog' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Management.Automation.Tracing.PSSysLogProvider' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'libpsl-native' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: Error relocating /opt/microsoft/powershell/7/libpsl-native.so: __realpath_chk: symbol not found Error loading shared library libpsl-native.so: No such file or directory Error loading shared library /opt/microsoft/powershell/7/liblibpsl-native.so: No such file or directory Error loading shared library liblibpsl-native.so: No such file or directory Error loading shared library /opt/microsoft/powershell/7/libpsl-native: No such file or directory Error loading shared library libpsl-native: No such file or directory Error loading shared library /opt/microsoft/powershell/7/liblibpsl-native: No such file or directory Error loading shared library liblibpsl-native: No such file or directory- Indeed
libpsl-nativeis required and was not available in my setup forAlpine/linux-musl-arm64. The regular build is giving an arm64 glibc-based one ! - So I cloned your
PowerShell-nativerepo and recompiled it on the target machine using the following:
apk update apk add git build-base gcc abuild binutils git python3 bash cmake apk upgrade git clone https://github.com/PowerShell/PowerShell-native.git cd PowerShell-native/src/libpsl-native cmake -DCMAKE_BUILD_TYPE=Release . make -j
- then copied
libpsl-native.sonext to my custompwsh
And
powershellwas working !So it would be really great to industrialize all this so that we can officially benefit from PowerShell on this platform. I may not be aware of everything, but from experiments above, it doesn't seem like a tremendous amount of work for someone familiar with this repo.
Thank you for your help!
Reacted by obsidienceReacted by backtrack5r3- I updated the build script to add the proper
Hey! We needed this for our project, so we created an Azure Pipeline that builds PowerShell for linux-musl-arm64.
The pipeline uses Docker buildx + QEMU to build libpsl-native.so natively on ARM64 Alpine, then cross-compiles PowerShell and packages everything together.
Here's the pipeline configuration: https://github.com/proxy/gist.github.com/tomflenner/60d5f4d93852d3040adfe95c2f662fb0
Hope this helps others who need Alpine ARM64 support!
Azure Pipeline to build PowerShell 7.5.2 for linux-musl-arm64 (Alpine ARM64) using Docker buildx, QEMU emulation, and cross-compilation - azure-pipelines-powershell-alpine-arm64.ymlReacted by Sebastien Lebreton and obsidience
Steps to reproduce
Expected behavior
Find a build named like “powershell-7.5.2-linux-musl-arm64.tar.gz”.
Actual behavior
No ARM64 build is provided. Can’t install PowerShell.
Environment data
A ARM64 glibc is provided, ex “powershell-7.5.2-linux-arm64.tar.gz”. Only musl is missing. ARM32 is also not provided but I don’t know is there is really a use case there.