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

Create package for Raspberry Pi OS (ARM64 and ARM32) #3263

Open
Petermarcu opened this issue Jul 31, 2018 · 16 comments
Open

Create package for Raspberry Pi OS (ARM64 and ARM32) #3263

Petermarcu opened this issue Jul 31, 2018 · 16 comments
Milestone

Comments

@Petermarcu
Copy link
Member

@RussKeldorph commented on Mon Jul 30 2018

From @ygoe on June 30, 2018 14:13

While there is a working binary download for dotnet (.NET Core) for ARM32 that works on a Raspberry Pi B 3+ with a current Raspbian OS, there are no instructions how to install it. And there are no packages for the OS, too. So it's a bit of a mystery how to actually make .NET Core work on a Raspi.

I think there should be a package for that OS. It should be as simple as that:

sudo apt install dotnet

Maybe a custom package source needs to be added, but definitely no manual tar file works. Mono was easier to install when it was current like 5 years ago.

Since the docker support on the Raspi with dotnet-runtime packages is very poor (multi-arch fails, need to select arm32 image specifically, can't get my app in a custom image), I need to install .NET Core on the Raspi OS itself.

Copied from original issue: dotnet/coreclr#18732


@RussKeldorph commented on Mon Jul 30 2018

From @ghost on June 30, 2018 16:45

Current blocker for ARM32 in general is https://github.com/dotnet/cli/issues/8998. In my understanding it's about couple of lines of XML changes in dotnet/cli to pack the right binaries (like done for ARM64 https://github.com/dotnet/cli/pull/9011/files) and then testing cross build on x64 (which is a more involved task).
That said, CoreCLR/CoreFx/CoreSetup parts for ARM32 are done.


@RussKeldorph commented on Mon Jul 30 2018

@Petermarcu Wasn't sure how big the gap is or where this request should be tracked. Sorry if this is already covered somewhere else.

@GabrielJadderson
Copy link

GabrielJadderson commented Aug 2, 2018

Dave wrote an article a year ago on where to download and how to install dotnet 2.0.0
I can confirm it still works on the latest Raspbian release.

That article seems to be the only way to install dotnet and it's just directly downloading the binaries, move them to /opt/, and create symbolic link to /usr/local/bin

RaspberryPiInstructions.md links to the official MS download for dotnet, and the instructions for Debian 9 do not work for Raspbian.

@Spacefish
Copy link
Contributor

why not just publish the app on a supported architecture and target arm-32, so every .so file required get´s copied to the publish folder even the CLR and you don´t need to install anything on the Rasbian, just copy over your application.

@ygoe
Copy link

ygoe commented Aug 8, 2018

@Spacefish You could do that. That makes 70 MB for the simplest of an app.

@sdmaclea
Copy link
Contributor

Current blocker for ARM32 in general is dotnet/cli#8998. In my understanding it's about couple of lines of XML changes in dotnet/cli to pack the right binaries (like done for ARM64 https://github.com/dotnet/cli/pull/9011/files) and then testing cross build on x64 (which is a more involved task).
That said, CoreCLR/CoreFx/CoreSetup parts for ARM32 are done.

@jeffschwMSFT I did the equivalent arm64 work for this. Do you want me to assign myself dotnet/cli#8998 ?

@jeffschwMSFT
Copy link
Member

Sounds good, thanks @sdmaclea

@sdmaclea sdmaclea self-assigned this Sep 14, 2018
@sdmaclea sdmaclea removed their assignment Mar 1, 2019
@dagood
Copy link
Member

dagood commented Nov 20, 2019

@dagood dagood closed this as completed Nov 20, 2019
@ygoe
Copy link

ygoe commented Nov 22, 2019

@dagood Ehm, the other issue is about ARM64, right? This issue is about Raspbian OS and ARM32. I can't see how that's a duplicate.

@dagood
Copy link
Member

dagood commented Nov 22, 2019

Ah, we were looking at this in a triage meeting and I guess we overlooked that. IIRC they are pretty much the same from the packaging + release perspective, so they'll be done at the same time, but if we really want to close one we should make sure that's reflected.

Reopening, @leecow PTAL.

@dagood dagood reopened this Nov 22, 2019
@msftgits msftgits transferred this issue from dotnet/core-setup Jan 30, 2020
@msftgits msftgits added this to the 5.0 milestone Jan 30, 2020
@dagood dagood removed the Triaged label Jan 30, 2020
@NikolaMilosavljevic NikolaMilosavljevic modified the milestones: 5.0.0, 6.0.0 Aug 5, 2020
@NikolaMilosavljevic
Copy link
Member

We need to officially support Raspberry Pi OS before creating packages.

@NikolaMilosavljevic
Copy link
Member

We should consider supporting arm64 as well: https://www.raspberrypi.org/forums/viewtopic.php?p=1668160

@NikolaMilosavljevic NikolaMilosavljevic changed the title Create package for Raspbian OS (ARM32) Create package for Raspberry Pi OS (ARM64 and ARM32) Aug 5, 2020
@Jakar510
Copy link

+1 Really want it to work on Raspberry Pi 4 (or later)

pi@Pi:~/ $ sudo apt search dotnet
Sorting... Done
Full Text Search... Done
dotnet-apphost-pack-3.0/buster 3.0.3-1 amd64
  Microsoft.NETCore.App.Host 3.0.3

dotnet-apphost-pack-3.1/buster 3.1.7-1 amd64
  Microsoft.NETCore.App.Host 3.1.7

dotnet-host/buster 3.1.7-1 amd64
  Microsoft .NET Core Host - 3.1.7

dotnet-hostfxr-2.1/buster 2.1.21-1 amd64
  Microsoft .NET Core Host FX Resolver - 2.1.21 2.1.21

dotnet-hostfxr-2.2/buster 2.2.8-1 amd64
  Microsoft .NET Core Host FX Resolver - 2.2.8 2.2.8

dotnet-hostfxr-3.0/buster 3.0.3-1 amd64
  Microsoft .NET Core Host FX Resolver - 3.0.3 3.0.3

dotnet-hostfxr-3.1/buster 3.1.7-1 amd64
  Microsoft .NET Core Host FX Resolver - 3.1.7 3.1.7

dotnet-runtime-2.1/buster 2.1.21-1 amd64
  Microsoft .NET Core Runtime - 2.1.21 Microsoft.NETCore.App 2.1.21

dotnet-runtime-2.2/buster 2.2.8-1 amd64
  Microsoft .NET Core Runtime - 2.2.8 Microsoft.NETCore.App 2.2.8

dotnet-runtime-3.0/buster 3.0.3-1 amd64
  Microsoft .NET Core Runtime - 3.0.3 Microsoft.NETCore.App 3.0.3

dotnet-runtime-3.1/buster 3.1.7-1 amd64
  Microsoft .NET Core Runtime - 3.1.7 Microsoft.NETCore.App 3.1.7

dotnet-runtime-deps-2.1/buster 2.1.21-1 amd64
  dotnet-runtime-deps-2.1 2.1.21

dotnet-runtime-deps-2.2/buster 2.2.8-1 amd64
  dotnet-runtime-deps-2.2 2.2.8

dotnet-runtime-deps-3.0/buster 3.0.3-1 amd64
  dotnet-runtime-deps-3.0 3.0.3

dotnet-runtime-deps-3.1/buster 3.1.7-1 amd64
  dotnet-runtime-deps-3.1 3.1.7

dotnet-sdk-2.1/buster 2.1.809-1 amd64
  Microsoft .NET Core SDK 2.1.809

dotnet-sdk-2.2/buster 2.2.402-1 amd64
  Microsoft .NET Core SDK 2.2.402

dotnet-sdk-3.0/buster 3.0.103-1 amd64
  Microsoft .NET Core SDK 3.0.103

dotnet-sdk-3.1/buster 3.1.401-1 amd64
  Microsoft .NET Core SDK 3.1.401

dotnet-targeting-pack-3.0/buster 3.0.1-1 amd64
  Microsoft.NETCore.App.Ref 3.0.1

dotnet-targeting-pack-3.1/buster 3.1.0-1 amd64
  Microsoft.NETCore.App.Ref 3.1.0

libgtk-dotnet3.0-cil/stable 2.99.3-3 armhf
  GTK.NET library

libgtk-dotnet3.0-cil-dev/stable 2.99.3-3 armhf
  GTK.NET library - development files

libgtk2.0-cil/stable 2.12.40-2+b1 armhf
  CLI binding for the GTK+ toolkit 2.12

libgtk2.0-cil-dev/stable 2.12.40-2+b1 armhf
  CLI binding for the GTK+ toolkit 2.12

netstandard-targeting-pack-2.1/buster 2.1.0-1 amd64
  NETStandard.Library.Ref 2.1.0

pi@Pi:~/ $ sudo apt install dotnet-sdk-3.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dotnet-sdk-3.1
E: Couldn't find any package by glob 'dotnet-sdk-3.1'
E: Couldn't find any package by regex 'dotnet-sdk-3.1'
pi@Pi:~/ $

@pgrawehr
Copy link

The runtime works fine on Raspbian (or better: worked fine) up until .NET Core 5.0 preview 4. Later versions seem to have problems starting the CLR for some users (i.e me). See dotnet/iot#1099.

That said: I'm trying to investigate what's wrong, but I'm a bit lost with instructions on how to build for Arm32.

@Jakar510
Copy link

@pgrawehr i was trying to run a project built on windows on the pi. But couldn't get it to work. The project uses gtksharp for a gui front-end. Unfortunately xamarin.forms doesn't support the pi.

Suggestions?

@pgrawehr
Copy link

@Jakar510 Can you be a bit more precise on what didn't work? What have you tried and what error did you get? I haven't used gtksharp, so I don't know about that, but in general, .NET applications do run on the pi.

@Aldaviva
Copy link

I got tired of waiting, so I made my own public APT package repository of armhf and arm64 .NET DEB packages for Raspberry Pi OS. These packages use the official Linux binaries built by Microsoft, and are automatically updated when new .NET versions are released.

If you like, you can install these packages on your Raspberry Pis too by following these instructions.

(copied from related issue because GitHub didn't link my comment here)

@pedroveiga99
Copy link

Is there any updates on this? @Petermarcu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests