Skip to content

Commit f4807c4

Browse files
Let the SDK pick the ILCompiler version, fixing the native build on master (#674)
* Let the SDK pick the ILCompiler version, fixing the native build The C++ Test and C++ Build workflows have failed on master since around February: Microsoft.NETCore.Native.Publish.targets(70,5): error : The PrivateSdkAssemblies ItemGroup is required for _ComputeAssembliesToCompileToNative The exporting project pins Microsoft.DotNet.ILCompiler to 10.0.1 while the workflows install the current 10.x SDK, and with PublishAot the SDK brings its own matching ILCompiler. The two disagree, and the build stops. The toolchain says as much in a warning immediately above the error: "Delete explicit 'Microsoft.DotNet.ILCompiler' package reference in your project file to avoid versioning problems." Removing the reference is the whole change. The SDK then resolves 10.0.10 here, matching itself, and `dotnet publish -p:NativeLib=Shared -p:SelfContained=true -p:PublishAot=true -r linux-x64 -c release` completes with no errors and no warnings, producing AngouriMath.CPP.Exporting.so. Nothing else references the package; the pin was the only thing holding the version back. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Refresh the package index before installing, in the C++ workflows The ubuntu leg of both C++ workflows dies before it reaches the build: E: Failed to fetch .../libkrb5-dev_1.20.1-6ubuntu2.6_amd64.deb 404 Not Found apt-get install is called without apt-get update first, so it asks the mirror for whatever versions the runner image happened to be built with. Once those are superseded they are gone from the pool and every one of them 404s. Added the update, and -y so the install is not waiting on a prompt. The two packages go in one call rather than two, which is only tidier. This is a second, independent break from the ILCompiler pin in the previous commit. The matrix is fail-fast, so whichever leg fell over first hid the other: the run I first read failed on macOS with the ILCompiler error, and the run on this branch failed on ubuntu here, before the build could be reached at all. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 8b33aad commit f4807c4

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

‎.github/workflows/CPPBuild.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ jobs:
4545
- name: 'Install some libs for Linux'
4646
if: ${{ matrix.os == 'ubuntu-latest' }}
4747
run: |
48-
sudo apt-get install zlib1g-dev
49-
sudo apt-get install libkrb5-dev
48+
sudo apt-get update
49+
sudo apt-get install -y zlib1g-dev libkrb5-dev
5050
5151
- name: 'Building the library into native for Windows'
5252
if: ${{ matrix.os == 'windows-latest' }}

‎.github/workflows/CPPTest.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ jobs:
3737
- name: 'Install some libs for Linux'
3838
if: ${{ matrix.os == 'ubuntu-latest' }}
3939
run: |
40-
sudo apt-get install zlib1g-dev
41-
sudo apt-get install libkrb5-dev
40+
sudo apt-get update
41+
sudo apt-get install -y zlib1g-dev libkrb5-dev
4242
4343
- name: 'Building the library into native for Windows'
4444
if: ${{ matrix.os == 'windows-latest' }}

‎Sources/Wrappers/AngouriMath.CPP.Exporting/AngouriMath.CPP.Exporting.csproj‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
<ItemGroup>
2121
<PackageReference Include="IsExternalInit" Version="1.0.0" PrivateAssets="all" />
22-
<PackageReference Include="Microsoft.DotNet.ILCompiler" Version="10.0.1" />
2322
<PackageReference Include="AngouriMath" Version="1.4.0-preview.2" />
2423
</ItemGroup>
2524
</Project>

0 commit comments

Comments
 (0)