Skip to content

Update to 3.31.0 breaks AOT build #21824

@snailcatcher

Description

@snailcatcher

What version of protobuf and what language are you using?
Version: 3.31.0 (updated from 3.30.2)
Language: C#

What operating system (Linux, Windows, ...) and version?
build on Linux inside docker

What runtime / compiler are you using (e.g., python version or gcc version)
dotnet publish <project_name>.csproj --os linux --arch x64 --configuration Release -t:PublishContainer

On an azure pipeline

What did you do?
Steps to reproduce the behavior:

  1. Update to 3.31.0
  2. let build pipeline run

What did you expect to see
a successful build

What did you see instead?

Starting: Build and push docker image
==============================================================================
Task         : Command line
Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
Version      : 2.250.1
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
==============================================================================
Generating script.
Script contents:
dotnet publish <project_name>.csproj --os linux --arch x64 --configuration Release -t:PublishContainer -p:ContainerRegistry=<registry>
========================== Starting Command Output ===========================
/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/cd9b333c-ce04-4b38-b570-3946d47bde92.sh
  Determining projects to restore...
  Restored /home/vsts/work/1/s/<project_name>.csproj (in 2.62 sec).
  <project> -> /home/vsts/work/1/s/.../bin/Release/net9.0/linux-x64/<project>.dll
  Generating native code
/home/vsts/.nuget/packages/google.protobuf/3.31.0/lib/net5.0/Google.Protobuf.dll : error IL3053: Assembly 'Google.Protobuf' produced AOT analysis warnings. [/home/vsts/work/1/s/<project_name>.csproj]
/home/vsts/.nuget/packages/microsoft.dotnet.ilcompiler/9.0.5/build/Microsoft.NETCore.Native.targets(317,5): error MSB3073: The command ""/home/vsts/.nuget/packages/runtime.linux-x64.microsoft.dotnet.ilcompiler/9.0.5/tools/ilc" @"obj/Release/net9.0/linux-x64/native/<project>.ilc.rsp"" exited with code -1. [/home/vsts/work/1/s/<project_name>.csproj]
##[error]Bash exited with code '1'.
Finishing: Build and push docker image

Anything else we should know about your project / environment
nope

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions