Skip to content

Published ConsoleApp with AOT throws error /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found  #37240

Closed
@mahdighorbanpourptw

Description

@mahdighorbanpourptw

Describe the bug

When I publish a console app, it does not run in Ubuntu 18.04 and gives the following error message: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found

To Reproduce

dotnew new console -n TestAot
Add the follwoing to the csproj file:

<RuntimeIdentifiers>linux-x64</RuntimeIdentifiers>
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>partial</TrimMode>
<PublishAot>true</PublishAot>

Publish the project using the folowing command:
dotnet publish --configuration release -r linux-x64 --self-contained true /p:EnableCompressionInSingleFile=true -o ./linux-x64

Run the published assembly in an Ubuntu fresh installation.

Further technical details

I tried to publish it with my WSL2 Ubuntu 22.04 installed on a Windows 10 Pro and also in the azure pipeline with Ubuntu 20.04. Both had the same result.

  • Include the output of dotnet --info
.NET SDK:
 Version:           8.0.100
 Commit:            57efcf1350
 Workload version:  8.0.100-manifests.6c33ef20

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  22.04
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /usr/share/dotnet/sdk/8.0.100/

.NET workloads installed:
 Workload version: 8.0.100-manifests.6c33ef20
There are no installed workloads to display.

Host:
  Version:      8.0.0
  Architecture: x64
  Commit:       5535e31a71

.NET SDKs installed:
  6.0.406 [/usr/share/dotnet/sdk]
  8.0.100 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.14 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.14 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/usr/lib/dotnet]

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download
  • The IDE (VS / VS Code/ VS4Mac) you're running on, and its version
Version: 1.84.2 (system setup)
Commit: 1a5daa3a0231a0fbba4f14db7ec463cf99d7768e
Date: 2023-11-09T10:51:52.184Z
Electron: 25.9.2
ElectronBuildId: 24603566
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19045

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions