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

Add support for the s390x architecture #34195

Closed
fradaham opened this issue Mar 27, 2020 · 25 comments
Closed

Add support for the s390x architecture #34195

fradaham opened this issue Mar 27, 2020 · 25 comments
Labels
arch-s390x Related to s390x architecture (unsupported) area-VM-meta-mono help wanted [up-for-grabs] Good issue for external contributors port
Milestone

Comments

@fradaham
Copy link

As a team responsible for a self-developed integration platform implemented in asp.net core (currently 3.1) with the task of exposing IBM mainframe services, we have an interest to be able to run this platform as a linux container in the IBM zCX (zOS container extension) docker environment. But its a showstopper that there aren't any released linux images with .net (sdk and runtime) built for the s390x architecture used in IBM zCX. There are several other programming languages represented as linux docker containers for the s390x architecture, like python, java, ruby, golang, groovy, perl, just to mention some (see https://hub.docker.com/u/s390x/?page=1)). Is it possible to build .net core (sdk and runtime (asp.net core)) for the s390x architecture in a linux container? There exists a debian s390x docker image (https://hub.docker.com/r/s390x/debian).

@MichaelSimons
Copy link
Member

@fradaham - Thanks for letting us know your interest in having support added for he s390x architecture. .NET Core does not currently support s390x therefore support would need to be added. Because of this, I am going to move this issue to the dotnet/core repo.

@MichaelSimons MichaelSimons transferred this issue from dotnet/dotnet-docker Mar 27, 2020
@MichaelSimons MichaelSimons changed the title Build and release linux docker images for .net core on the s390x architecture Add support for the s390x architecture Mar 27, 2020
@omajid
Copy link
Member

omajid commented Mar 27, 2020

cc @tmds

@scalablecory scalablecory transferred this issue from dotnet/core Mar 27, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Mar 27, 2020
@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this issue. Please help me learn by adding exactly one area label.

@jkotas
Copy link
Member

jkotas commented Mar 27, 2020

https://github.com/mono/mono supports s390x . Now that Mono is being unified with .NET Core, the easiest way to make progress on s390x would be to enable s390x Mono in https://github.com/dotnet/runtime .

@lambdageek lambdageek added the help wanted [up-for-grabs] Good issue for external contributors label Jun 8, 2020
@MichaelErichsen
Copy link

This could have general interest. I have described a scenario that were interesting to us at "Running a hybrid application in Docker and zCX on ZD&T" Part 1 and Part 2.

@marek-safar marek-safar removed the untriaged New issue has not been triaged by the area owner label Jun 30, 2020
@marek-safar marek-safar added this to the Future milestone Jun 30, 2020
@jperezpbos
Copy link

jperezpbos commented Jul 6, 2020

Adding a quick comment from dotnet/core#4917 for visibility and clarification.

Not really need to run as a container as long as we have .NET 5 for s390x for a Linux distribution we can deploy in different ways.
Support for s390x (IBM Z / LinuxONE platform) is a great opportunity to take over mostly Java and Python development in s390x right now. Note that this platform is used for enterprise applications for the largest Financial Services organizations and a lot of FinTech, Blockchain, Data Science, and AI development.

I can make some introductions with the IBM open source community who can collaborate in this effort.

@jperezpbos
Copy link

https://github.com/mono/mono supports s390x . Now that Mono is being unified with .NET Core, the easiest way to make progress on s390x would be to enable s390x Mono in https://github.com/dotnet/runtime .

Looks like this was done here mono/mono#19611 by @nealef

@neman
Copy link

neman commented Oct 13, 2020

Looks like it was not done since build is failing

image

@jperezpbos
Copy link

Thanks @neman. Hi @nealef is this something you can fix?

@nealef
Copy link
Contributor

nealef commented Oct 13, 2020

Are you asking can dotnet/runtime be built for s390x? If so, I am working on it. If you are asking can mono be built from github.com/mono for s390x then yes.

@neman
Copy link

neman commented Oct 14, 2020

So can we expect that .net 5 will have support for s390x anytime soon?

@nealef
Copy link
Contributor

nealef commented Oct 14, 2020

Depends on a number of factors:

  1. Getting time to do the work
  2. Learning what needs to be done other than the fixes to build scripts and CMakeLists.txt
  3. Having that work reviewed and accepted

@nealef
Copy link
Contributor

nealef commented Dec 1, 2020

We're making progress...

$ ~/dotNET/dotnet HelloWorld.dll
Hello World!
$ ~/dotNET/dotnet --info
.NET SDK (reflecting any global.json):
 Version:   5.0.100-rc.2.20479.15
 Commit:    da7dfa8840

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  20.04
 OS Platform: Linux
 RID:         linux-s390x
 Base Path:   /home/neale/dotNET/sdk/6.0.0/

Host (useful for support):
  Version: 6.0.0-dev
  Commit:  8a061afef9

.NET SDKs installed:
  6.0.0 [/home/neale/dotNET/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 5.0.0-rc.2.20475.17 [/home/neale/dotNET/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 5.0.0-rc.2.20475.5 [/home/neale/dotNET/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.0-dev [/home/neale/dotNET/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

@ad-ops
Copy link

ad-ops commented Feb 25, 2021

Is there any progress on this issue? Is there any better support in .Net 6?

@nealef
Copy link
Contributor

nealef commented Feb 25, 2021

Take a look in dotnet/runtimelab repo and the feature/s390x branch. You can cross-build dotnet from it. There are also fixes pending for msbuild and NuGet.Client that will enable the dotnet new and build operations. The dotnet command will run built apps without those fixes.

@fradaham
Copy link
Author

fradaham commented Nov 10, 2021

Is this fully included now in the new .net 6.0 release? I guess so: https://devblogs.microsoft.com/dotnet/announcing-net-6/. But are there any official linux images including .net for the s390x architecture? I found one for RHEL...but would have preferred one published on docker hub. If not, is is it possible for me to install .net on a s390x linux image, let's say alpine or debian? Like this one: https://hub.docker.com/r/s390x/debian? Is it just like any .net install on linux?

@uweigand
Copy link
Contributor

The only binary build of .NET on s390x available at this point is the one provided by Red Hat. RPM packages are available with RHEL 8.5, and Red Hat also provides a set of UBI-based container images containing the .NET runtime & SDK:
https://catalog.redhat.com/software/containers/rhel8/dotnet-60/6182efa2be25a74c00923848?architecture=s390x

Does this work for you?

You can of course always build .NET yourself from source, but that is somewhat non-trivial, in particular since .NET is written in .NET, so you first need some .NET runtime available. This can be handled either by starting with one of existing images (from Red Hat), or by performing a cross-build starting on another architecture like Intel.

@fradaham
Copy link
Author

Ok, we have gotten hold of the RedHat image, and will start trying it out. But what if we, or anyone else, wants to build .NET for another linux image? Are there some instructions on how to do this, making it somewhat less non-trivial? Either the cross-build case, or starting from the RedHat image?

@tonyqus
Copy link

tonyqus commented Apr 29, 2022

Looks like it was not done since build is failing

image

Where is this build status page? Is it open to public?

@jmertic
Copy link

jmertic commented May 1, 2022

If there is interest in the project in working on this port, it might be a good Open Mainframe Project Mentorship project...

https://www.openmainframeproject.org/projects/mentorship-program

Let me know if there is interest and I can help get this posted.

@uweigand
Copy link
Contributor

uweigand commented May 2, 2022

If there is interest in the project in working on this port, it might be a good Open Mainframe Project Mentorship project...

https://www.openmainframeproject.org/projects/mentorship-program

Let me know if there is interest and I can help get this posted.

Hi John, just to clarify: as mentioned above, we have ported .NET to s390x - all required changes are present in the upstream sources starting with .NET 6, and Red Hat provides binary images as RPMs (part of RHEL 8.5 and later) and as container images (linked above).

The only missing question is whether there is interest in someone providing binary builds in addition to what Red Hat is doing (e.g. to support other distros). On other platforms, Microsoft are providing regular binary builds supporting multiple Linux distros, but they do not do so for the s390x architecture.

At this point, this is not so much a question of porting, but rather of setting up a CI infrastructure that regularly checks out the current sources, builds it for s390x (e.g. by cross-compiling), and publishes the binaries for download somewhere. That could of course be also an opportunity for the OMP to get involved ...

@jmertic
Copy link

jmertic commented May 2, 2022

Thanks @uweigand - that makes sense.

Generally, the Open Mainframe Project tries to stay away from distributing binary builds; it puts the wrong expectation on the role of the Open Mainframe Project regarding end-user support and could require Open Mainframe Project to do additional assertions of the assets depending upon the contents. We'd be happy to help connect with Microsoft to see if there is interest from thier end of doing the binary builds you reference.

@neman
Copy link

neman commented May 2, 2022

If there is interest in the project in working on this port, it might be a good Open Mainframe Project Mentorship project...

https://www.openmainframeproject.org/projects/mentorship-program

Let me know if there is interest and I can help get this posted.

You should check this out https://youtu.be/SMF80uJuv0s

@AaronRobinsonMSFT
Copy link
Member

@uweigand Is this issue still relevant now that s390x is supported? This issue seems misleading given the title and description. Some comments above indicate there are still questions about CI and distribution, which I'd argue might warrant a more targeted issue. Thoughts?

@uweigand
Copy link
Contributor

@AaronRobinsonMSFT the remaining open questions are around:

  • Possibly providing pre-built .NET SDK & runtime binary images for s390x somewhere, similar to the pre-built tarballs provided by Microsoft for Intel and Arm. (These would be intended for dev/test purposes only, without any official support.)
  • Out-of-the box support for .NET on s390x in Linux distributons other than RHEL (and Fedora).

As to the second point, that's up to the distributions in question - if any distro out there wants to support .NET on s390x, we'd appreciate that and would be happy to help. (For example, there's currently an issue about Alpine support open here: dotnet/source-build#2839)

As to the first point, we're currently investigating whether we can set up an infrastructure to provide pre-built images for dev/test purposes. But I think that would be outside the scope of this open source project, so having an issue open here isn't likely to help with that.

In summary, I agree that this issue can probably be closed now.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-s390x Related to s390x architecture (unsupported) area-VM-meta-mono help wanted [up-for-grabs] Good issue for external contributors port
Projects
None yet
Development

No branches or pull requests