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

error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'linux-x86' #31180

Open
Daniel15 opened this issue Oct 16, 2019 · 12 comments
Labels
arch-x86 area-Infrastructure os-linux Linux OS (any supported distro) question Answer questions and provide assistance, not an issue with source code or documentation.
Milestone

Comments

@Daniel15
Copy link

Trying to publish a project for linux-x86 fails:

λ dotnet publish -c Release -o --self-contained --runtime linux-x86
Microsoft (R) Build Engine version 16.3.0+0f4c62fea for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

C:\Program Files\dotnet\sdk\3.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(87,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'linux-x86'. [C:\src\test\Test.Worker.csproj]
C:\Program Files\dotnet\sdk\3.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(87,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'linux-x86'. [C:\src\test\Test.Worker.csproj]

linux-x64 works fine though.

Can --self-contained not be used for 32-bit Linux builds?

@wfurt
Copy link
Member

wfurt commented Oct 16, 2019

There are no official builds for Linux x86. https://github.com/dotnet/core-sdk
You would have to build it your self.

cc: @richlander

@Daniel15
Copy link
Author

The docs at https://docs.microsoft.com/en-us/dotnet/core/rid-catalog say:

You can see the list of supported RIDs and the RID graph in the runtime.json file, which is located at the CoreFX repo.

The runtime.json file does have a linux-x86 RID listed. Is this documentation incorrect?

Why is there an x86 build for Windows but not Linux? I've got a few VPSes with very limited RAM (128 MB) which I'd like to run .NET Core apps on. With such a small amount of RAM there's not really any benefits of 64-bit over 32-bit.

@msftgits msftgits transferred this issue from dotnet/corefx Feb 1, 2020
@msftgits msftgits added this to the Future milestone Feb 1, 2020
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Feb 23, 2020
@ericstj ericstj removed the untriaged New issue has not been triaged by the area owner label Jun 25, 2020
@robertobecchiniWR
Copy link

I'm trying to cross-build the runtime using an Ubuntu 18.04 x86-64 for a linux-x86 system. I do receive also this error.
So apparently I need to rebuild also the SDK (https://github.com/dotnet/installer/tree/v6.0.100) so thatthe RID linux-x86 is available. How do I do this in practice? The instructions at README at installer repository don't help at all.
Can some of you here shed some light?

@robertobecchiniWR
Copy link

There are no official builds for Linux x86. https://github.com/dotnet/core-sdk You would have to build it your self.

cc: @richlander

Referring to this. How? what parameters to the build scripts? Following the README took me nowhere

@ericstj
Copy link
Member

ericstj commented Jan 4, 2022

the runtime.json file does have a linux-x86 RID listed. Is this documentation incorrect?

There are many RIDs which are present in the graph which are not built by Microsoft. Some are built by the community or other parties. The list of RIDs which the SDK supports for self-contained apps is stored here: https://github.com/dotnet/installer/blob/8b9782a074c51ef9f8b8b0608870c23ed77df7f5/src/redist/targets/GenerateBundledVersions.targets#L181-L192

@dsplaisted might be able to comment if there's a good place where this is documented.

Moving this to area-Infrastructure as it has become a question of building the product.

@ghost
Copy link

ghost commented Jan 4, 2022

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Issue Details

Trying to publish a project for linux-x86 fails:

λ dotnet publish -c Release -o --self-contained --runtime linux-x86
Microsoft (R) Build Engine version 16.3.0+0f4c62fea for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

C:\Program Files\dotnet\sdk\3.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(87,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'linux-x86'. [C:\src\test\Test.Worker.csproj]
C:\Program Files\dotnet\sdk\3.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(87,5): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'linux-x86'. [C:\src\test\Test.Worker.csproj]

linux-x64 works fine though.

Can --self-contained not be used for 32-bit Linux builds?

Author: Daniel15
Assignees: -
Labels:

question, arch-x86, os-linux, area-Infrastructure

Milestone: Future

@ericstj
Copy link
Member

ericstj commented Jan 4, 2022

I would imagine that you'd want to build dotnet/runtime for linux-x86 release, the output you'd be interested in is the runtime-pack. Then you could tell the SDK to use this when publishing your self-contained app. Given we don't officially support this, there is no guarantee it would work. It looks like #7335 tracks an effort to build the product for x86.

@weltkante
Copy link
Contributor

weltkante commented Jan 6, 2022

Considering you get this very error when you cross-compile an x86 build I don't think you can use this approach to produce a runtime-pack (see last note in the issue you linked, and I just verified it still is regressed and produces this error).

Note that cross compiling x86 on an x64 host is the only way to produce x86 binaries, since you cannot compile the dotnet runtime on an x86 host (the build process needs more memory than an x86 host can manage)

I've managed to cross compile in the past with an earlier version, before the cross compilation regressed, but even then I never managed to convince the SDK to actually use the produced artifacts; and building the SDK itself for x86 is impossible (for me), the build scripts are too poorly managed/documented.

@avlec
Copy link

avlec commented Jan 19, 2022

Having this same issue when trying to publish an application, but instead to a ARM target with softfpu, requiring linux-armel, doing this with the below command on .NET 6.0.101 on VS2022. Is there any guide on how to build the SDK and inform dotnet of its existence so the below works?
dotnet publish -r linux-armel --self-contained -p:PublishSingleFile=true -p:PublishTrimmed=true

@Adinihal
Copy link

I am also having this same issue when trying to run a 32bit .net application in Linux I am getting the error as
image
by using dotnet run command
by using dotnet run -c Debug -r linux-x86 command I am getting this below error
image

as per the above answer There are no official builds for Linux x86 so is there any way to resolve this error .

@weltkante
Copy link
Contributor

weltkante commented Jan 25, 2024

I am also having this same issue when trying to run a 32bit .net application in Linux I am getting the error as

as you noted Microsoft does not provide official builds for Linux x86, so how did you get that SDK/runtime? did you compile it yourself? are you trying to cross-compile on a 64 bit machine? this is known to not work since there are no official builds of the platform specific packages for x86 on nuget, you'd have to make your own

maybe add some information about what you're doing, but the most likely response will be "you are on your own, this can be made working but is not officially supported"

PS: I got compiling the runtime to work years ago, see the linked issue from earlier, but never got the SDK to build for x86 out of the box, so as far as I can tell its only possible if you put lots of effort into it to customize/fix the build scripts

[edit] it looks like someone on the other issue got the SDK to build for earlier versions of .NET Core after all, so thats probably what you are looking for if you're trying to get this working yourself

@dkurt
Copy link
Contributor

dkurt commented Jan 26, 2024

Have same problem with missed RID on 9.0 (upstream branch): error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'linux-riscv64'. However I were able to build entire SDK for riscv64 with the same build commands on 8.0.1 tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-x86 area-Infrastructure os-linux Linux OS (any supported distro) question Answer questions and provide assistance, not an issue with source code or documentation.
Projects
Status: No status
Development

No branches or pull requests

10 participants