Skip to content

[ArPow] Build has a hard dependency on libunwind, which is not available on RHEL 8 #2477

Closed

Description

@omajid

I can't build installer commit 28be3e9a006d90d8c6e87d4353b77882829df718 on RHEL 8:

dotnet-28be3e9a006d90d8c6e87d4353b77882829df718-x64-bootstrap/src/source-build-reference-packages.0aba30b468e666bdc3cfc6c36a8b417a0f6fb62a/artifacts/source-build/self/package-cache/runtime.linux-x64.microsoft.netcore.ilasm/6.0.0-rc.2.21459.6/runtimes/linux-x64/native/ilasm: error while loading shared libraries: libunwind-x86_64.so.8: cannot open shared object file: No such file or directory

This SDK prebuilt nuget package has a hard dependency on libunwind, which is not available in RHEL 8.

Is there some way I can rebuild this to avoid this hard dependency?

Is there a longer term fix we can use to avoid depending on libunwind for our bootstrap builds?

Activity

  1. ghost added
    area-build
    on Sep 26, 2021
  2. omajid commented on Sep 26, 2021

    @omajid
    MemberAuthor

    I tried replacing runtime.linux-x64.microsoft.netcore.ilasm and runtime.linux-x64.microsoft.netcore.ildasm with versions downloaded from https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json but it leads to errors in the build:

    dotnet-28be3e9a006d90d8c6e87d4353b77882829df718-x64-bootstrap/src/runtime.826f81a11ad17f415668fe1cb934bdaf00d36ea2/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.2.21419.17/build/Microsoft.NET.Compatibility.Common.targets(26,5): error MSB4018: The "Microsoft.DotNet.Compatibility.ValidatePackage" task failed unexpectedly. [dotnet-28be3e9a006d90d8c6e87d4353b77882829df718-x64-bootstrap/src/runtime.826f81a11ad17f415668fe1cb934bdaf00d36ea2/artifacts/source-build/self/src/src/libraries/System.IO.Hashing/src/System.IO.Hashing.csproj]                                                                             
    dotnet-28be3e9a006d90d8c6e87d4353b77882829df718-x64-bootstrap/src/runtime.826f81a11ad17f415668fe1cb934bdaf00d36ea2/artifacts/source-build/self/package-cache/microsoft.dotnet.compatibility/1.0.0-rc.2.21419.17/build/Microsoft.NET.Compatibility.Common.targets(26,5): error MSB4018: System.MissingMethodException: Method not found: 'Int32 Microsoft.CodeAnalysis.ISymbol.get_MetadataToken()'. [dotnet-28be3e9a006d90d8c6e87d4353b77882829df718-x64-bootstrap/src/runtime.826f81a11ad17f415668fe1cb934bdaf00d36ea2/artifacts/source-build/self/src/src/libraries/System.IO.Hashing/src/System.IO.Hashing.csproj]  
    

    Is this a known issue? Any idea how to work around this?

  3. changed the title [-][ArPow] Build has a hard dependency on libunwind[/-] [+][ArPow] Build has a hard dependency on libunwind, which is not available on RHEL 8[/+] on Sep 26, 2021
  4. omajid commented on Sep 26, 2021

    @omajid
    MemberAuthor
  5. dseefeld commented on Sep 27, 2021

    @dseefeld
    Contributor

    This SDK has a hard dependency on libunwind, which is not available in RHEL 8.

    Is there some way I can rebuild this to avoid this hard dependency?

    Is there a longer term fix we can use to avoid depending on libunwind for our bootstrap builds?

    We don't have bootstrapping figured out here since there is only one build (i.e. no production build to generate the tarball). I think we need a way to build without previously source-built packages for an initial bootstrap build that will generate previously source-built packages for subsequent builds. I'll investigate and report back here.

  6. omajid commented on Sep 27, 2021

    @omajid
    MemberAuthor

    Any idea how to work around this?

    Adding /p:EnablePackageValidation=false to runtime's SourceBuild.props seems to have done the trick.

    Thanks, @tmds for the idea!

  7. dseefeld commented on Sep 28, 2021

    @dseefeld
    Contributor

    Looking at this closer, it appears that we should be able to bootstrap off of previously source-built packages. The problem here is that the current version of previously source-built packages wasn't built with this change in runtime: dotnet/runtime#58911. This should get fixed in the next update of previously source-built packages here: dotnet/installer#12161. I verified that the version of ilasm in this package does not have a hard dependency on libunwind.

  8. omajid commented on Sep 28, 2021

    @omajid
    MemberAuthor

    @dseefeld Thanks! That wont address the GLIBC ABI change, though, will it? AFAICS, RHEL 7 will remain broken as we discovered in dotnet/installer#12141.

    Have you considered whether it might be a good idea to take the previously source-built packages, and replace all the portable bits in it with the real portable bits published on the in-development .NET nuget feeds?

  9. tmds commented on Sep 28, 2021

    @tmds
    Member

    Have you considered whether it might be a good idea to take the previously source-built packages, and replace all the portable bits in it with the real portable bits published on the in-development .NET nuget feeds?

    imo that is the way to go, see dotnet/installer#12141 (comment).

  10. dseefeld commented on Sep 28, 2021

    @dseefeld
    Contributor

    Have you considered whether it might be a good idea to take the previously source-built packages, and replace all the portable bits in it with the real portable bits published on the in-development .NET nuget feeds?

    I see what you're saying. I was originally looking at creating a bootstrap version of previously source-built packages. I'll continue on that. Thanks!

  11. self-assigned this
    on Sep 30, 2021
  12. added this to the 6.0 milestone on Sep 30, 2021
  13. dseefeld commented on Oct 4, 2021

    @dseefeld
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-build

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions