`.dotnet/x64` used on Arm64 machine
- Dominant language
- C#
- Stars
- 2.4k
- Forks
- 630
- Avg merge
- 11d 3h
- Merged PRs (30d)
- 2
Description
I was just building this repo. I noticed references to `x64` in this script output. Why is that used on an Arm64 machine? That's a waste of resources since those assets cannot be used.
```bash
~/iot $ ./build.sh
Determining projects to restore...
All projects are up-to-date for restore.
Attempting to install dotnet from public_location.
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
dotnet-install: .NET Core Runtime with version '3.1.21' is already installed.
Attempting to install dotnet from public_location.
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.
dotnet-install: Attempting to download using primary link https://dotnetcli.azureedge.net/dotnet/Runtime/6.0.11/dotnet-runtime-6.0.11-linux-x64.tar.gz
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Runtime/6.0.11/dotnet-runtime-6.0.11-linux-x64.tar.gz
dotnet-install: Adding to current process PATH: `/home/rich/iot/.dotnet/x64`. Note: This change will be visible only when sourcing script.
```
And then later, all the 3.1 tests failed because 3.1 is also installed to the x64 location. I'm wondering why this is happening on my machine and not in CI. Do we run Linux Arm64 in CI? I assume so.
```bash
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Testhost process for source(s) '/home/rich/iot/src/devices/SensorHub/tests/bin/Debug/netcoreapp3.1/SensorHub.Tests.dll' exited with error: Failed to create CoreCLR, HRESULT: 0x80070057
. Please check the diagnostic logs for more information.
Test Run Aborted.
```
Sharing what should be obvious:
```bash
~/iot/.dotnet/x64 $ ./dotnet
-bash: ./dotnet: cannot execute binary file: Exec format error
~/iot/.dotnet/x64 $ ls
dotnet dotnet-install.sh host LICENSE.txt shared ThirdPartyNotices.txt
```
My machine:
```bash
~ $ uname -a
Linux raspberrypi 5.15.76-v8+ #1597 SMP PREEMPT Fri Nov 4 12:16:41 GMT 2022 aarch64 GNU/Linux
~ $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
```
It feels like there is logic in the install script oriented on x64 emulation for macOS and Windows Arm64 that should not be applied to Linux but is. However, our `global.json` file seems to requesting these .NET versions as `x64`. Why is that? That seems odd to me.
https://github.com/dotnet/iot/blob/f3fbefadb4718309a921322a5a1ec3bf2524934d/global.json#L5-L8
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.