Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerShell tries to crosscompile to aarch64 / armv7 when building on those platforms #17891

Closed
5 tasks done
ayakael opened this issue Aug 13, 2022 · 1 comment
Closed
5 tasks done

Comments

@ayakael
Copy link

ayakael commented Aug 13, 2022

Prerequisites

Steps to reproduce

Currently building a package for powershell on Alpine Linux. When building for aarch64, armv7 platform, build fails due to trying to crosscompile to those platforms. Cross-compilations should not occur on a platform that is building for itself, yet the build process tries to force that.

To reproduce, git clone https://gitlab.alpinelinux.org/ayakael/aports -b testing/powershell-arm and abuild -r in any Alpine environment eqal or greater to version 3.16 when in aports/testing/powershell directory.

Aport for build process is accessible here

Expected behavior

Build should not use CrossGen2 to build `powershell`

Actual behavior

Build tries to use CrossGen2 to build on the same platform.

Error details

/usr/lib/dotnet/sdk/6.0.108/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(463,5): error MSB6003: The specified task executable "/home/buildozer/.nuget/packages/microsoft.netcore.app.crossgen2.linux-musl-arm64/6.0.8/tools/crossgen2" could not be run. System.ComponentModel.Win32Exception (2): An error occurred trying to start process '/home/buildozer/.nuget/packages/microsoft.netcore.app.crossgen2.linux-musl-arm64/6.0.8/tools/crossgen2' with working directory '/builds/ayakael/aports/testing/powershell/src/PowerShell-7.2.6/src/powershell-unix'. No such file or directory [/builds/ayakael/aports/testing/powershell/src/PowerShell-7.2.6/src/powershell-unix/powershell-unix.csproj]

Full log accessible here



### Environment data

```powershell
Name                           Value
----                           -----
PSVersion                      7.2.6
PSEdition                      Core
GitCommitId                    7.2.6
OS                             Linux 5.4.157-1-pve #1 SMP PVE 5.4.157-1 (Mon, 29 Nov 2021 12:01:44 +0100)
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

@ayakael ayakael added the Needs-Triage The issue is new and needs to be triaged by a work group. label Aug 13, 2022
@ayakael
Copy link
Author

ayakael commented Aug 13, 2022

The error was not a crosscompilation error, but rather having to do with dotnet/runtime#73908

Closing as fixed by disabling optimization on arm + arm64 platforms.

@ayakael ayakael closed this as completed Aug 13, 2022
@ghost ghost removed the Needs-Triage The issue is new and needs to be triaged by a work group. label Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant