-
Notifications
You must be signed in to change notification settings - Fork 85
SH installs wrong architecture on ARM64 host, ARM32 OS #16
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
Comments
@directhex |
The
Also, I don't think it can be passed through if installing via the Arcade eng/common/tools.sh wrapper? |
@livarcocc is this something what will be addressed or we need to work on a workaround? |
My suspicion that this prevents use of Arcade is correct. The Rather than add workarounds to Arcade, I feel it should be fixed properly, here. |
@johnbeisner @livarcocc yes, you are right. 'get-os-distro.sh' is a partial copy which uses install scripts as a reference.
This will require all tools depending on the install scripts to expose additional parameter for architecture. Please note that the default behavior still will be different for windows and linux. dotnet-install.ps1 installs as per process architecture and dotnet-install.sh installs as per kernel architecture. For default inputs, these two should be consistent. |
@johnbeisner any comment on this thread? Are you planning to make changes to ensure that both Windows and Linux install for same architecture? This will ensure that downstream tools won't have to tke care of this. |
Hey, |
For some reason that bug remains open
`uname -m` on ARM64 processors using 32-bit personality shows as `armv8l`, not `armv7l`. See https://github.com/torvalds/linux/blob/cef7298262e9af841fb70d8673af45caf55300a1/arch/arm64/include/asm/compat.h#L22 This allows building on 64-bit ARM machines in a 32-bit environment. Without this patch, the build system thinks 32-bit personality on ARM64 is linux-x64, and the build explodes accordingly. 32-bit personality allows building ARM32 code on modern ARM64 systems, which in this day and age are easier to obtain with decent performance characteristics. ``` builder@xam-softiron-1:~$ uname -a Linux xam-softiron-1 4.17.0ilp32-31333-gb2d7ec3 dotnet#1 SMP Tue Oct 16 16:37:20 EDT 2018 aarch64 aarch64 aarch64 GNU/Linux builder@xam-softiron-1:~$ linux32 uname -a Linux xam-softiron-1 4.17.0ilp32-31333-gb2d7ec3 dotnet#1 SMP Tue Oct 16 16:37:20 EDT 2018 armv8l armv8l armv8l GNU/Linux ``` Closes: https://github.com/dotnet/cli/issues/11437
There are two failure cases in the issue: |
Issue Description
get_machine_architecture contains the following:
https://github.com/microsoft/azure-pipelines-tasks/blob/08914a70defbdbe73b2bb87e8d0663bdbeb248e0/Tasks/UseDotNetV2/externals/get-os-distro.sh#L159-L178
This is... fundamentally not how
uname
should be used.uname
refers to the profile of the running kernel, not the executing environment. It can be a 100% mismatch, and that's valid and fine. The .NET Core environment which gets installed needs to match the executing environment, not the kernel.Some examples:
In both these cases, these are 64-bit kernels with 32-bit executing environments. There is no guarantee that 64-bit libraries are available to execute 64-bit code, and it is a 32-bit .NET Core which should be installed.
armv7l
is not the only validuname
which requires a 32-bit .NET Core. 32-bit compatibility kernel profile on 64-bit ARM kernels will showarmv8l
:ref: microsoft/azure-pipelines-tasks#10439
The text was updated successfully, but these errors were encountered: