Skip to content

ilasm (and ildasm) fail to resolve runtime dependencies on Linux #38703

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

Closed
ivanpovazan opened this issue Jul 2, 2020 · 5 comments
Closed

ilasm (and ildasm) fail to resolve runtime dependencies on Linux #38703

ivanpovazan opened this issue Jul 2, 2020 · 5 comments
Assignees
Milestone

Comments

@ivanpovazan
Copy link
Member

Description

After adding ilasm (or ildasm) package to an app and publishing the app as runtime-dependent; running ilasm (or ildasm) fails with:
Error: Fail to load /home/ivan/Projects/test/bin/Release/netcoreapp3.1/linux-x64/publish/libcoreclr.so Failed to initialize Assembler

Configuration

OS: Ubuntu 18.04 x64
dotnet: 3.1.301
ilasm (ildasm) package: 2.0.8

How to reproduce

In a new terminal execute the following sequence:

  1. dotnet new console -n test
  2. cd test
  3. dotnet add package Microsoft.NETCore.ILAsm (ILDAsm)
  4. dotnet publish -c Release --self-contained false --runtime linux-x64
  5. touch test.il
  6. ./bin/Release/netcoreapp3.1/linux-x64/publish/ilasm test.il

Other information

This might be related to previously reported issue #38701

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-ILTools-coreclr untriaged New issue has not been triaged by the area owner labels Jul 2, 2020
@BruceForstall BruceForstall added this to the 5.0.0 milestone Jul 8, 2020
@BruceForstall BruceForstall removed the untriaged New issue has not been triaged by the area owner label Jul 8, 2020
@JulieLeeMSFT
Copy link
Member

@janvorli, we suspect that this might be related to SDK issue. You appear as "area-SDK" owner. However, I don't see area-SDK anymore from our labels, but who would be the proper owner for SDK related issue? I also reported this to dotnet/sdk.

@janvorli
Copy link
Member

The problem is that libcoreclr.so needs to be side by side with the ilasm and the steps above don't put it there. The folder ./bin/Release/netcoreapp3.1/linux-x64/publish created by the above mentioned commands contains just these files:

ilasm
libsosplugin.so
libsos.so
sosdocsunix.txt
SOS.NETCore.dll
test
test.deps.json
test.dll
test.pdb
test.runtimeconfig.json

Removing the false after the --self-contained fixes the problem since the whole runtime is copied into the target folder.

@janvorli
Copy link
Member

You appear as "area-SDK" owner.

I am not an owner of the SDK area, I'm not sure how I got it assigned to myself. In fact, I have no idea what that area is supposed to mean in the runtime repo. I believe that dotnet/sdk repo is an appropriate repo for this issue.

@JulieLeeMSFT
Copy link
Member

Closing this bug and tracking from dotnet/sdk #12928.

@jkotas
Copy link
Member

jkotas commented Aug 14, 2020

This was fixed by dotnet/coreclr#25930 and related PRs that made ilasm/ildasm SDK standalone. It does not reproduce for me with the .NET 5 preview packages.

BTW: dotnet/runtime is the right repo to track this if this is still a problem. dotnet/sdk repo is not responsible to ilasm/ildasm packages.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants