Skip to content

Add ARM64 build target for linux-musl libc #25762

Description

Steps to reproduce

  1. Use Alpine Linux on a ARM64 processor
  2. Try to install PowerShell
  3. Can’t, ARM build for Alpine Linux (musl libc) is not provided

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.

Activity

  1. changed the title [-]Add ARM64 build target for linux-musl backend[/-] [+]Add ARM64 build target for linux-musl libc[/+] on Jul 17, 2025
  2. harryzcy commented on Nov 27, 2025

    @harryzcy

    Is there any updates to this?

  3. tomflenner commented on Feb 4, 2026

    @tomflenner

    Hey 👋🏻,

    Any news on this topic ?

  4. sailro commented on Feb 4, 2026

    @sailro

    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.

  5. sailro commented on Feb 5, 2026

    @sailro

    For the record I was able to make it work by doing the following:

    1- On a Win11/x64 machine I cross-compiled powershell to target Alpine/linux-musl-arm64:

    • I updated the build script to add the proper linux-musl-arm64 target.
    • 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.config and manually downloading some of them to my cache, I was able to build everything. Perhaps the powershell registry is not up-to-date with latest .net packages. I spotted only later that there is a Switch-PSNugetConfig -Source NuGetOnly.

    2- When trying to run pwsh on the target Alpine/linux-musl-arm64 machine, 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-native is required and was not available in my setup for Alpine/linux-musl-arm64. The regular build is giving an arm64 glibc-based one !
    • So I cloned your PowerShell-native repo 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.so next to my custom pwsh

    And powershell was 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!

  6. tomflenner commented on Feb 9, 2026

    @tomflenner

    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!

    Gist
    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.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Needs-TriageThe issue is new and needs to be triaged by a work group.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions