Summary: | dev-dotnet/dotnet-sdk-8.0.105: fails to build: error NETSDK1096: Optimizing assemblies for performance failed. You can either exclude the failing assemblies from being optimized, or set the PublishReadyToRun property to false. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Edgar Chalico <edgar1569> |
Component: | Current packages | Assignee: | dotnet project <dotnet> |
Status: | IN_PROGRESS --- | ||
Severity: | normal | CC: | edgar1569, leohdz172, xgqt |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build log
build log |
Description
Edgar Chalico
2024-07-07 06:47:56 UTC
Created attachment 897252 [details]
build log
I needed to compress the build.log file because it is too long.
> /var/tmp/portage/dev-dotnet/dotnet-sdk-8.0.105/work/dotnet-sdk-8.0.5/.dotnet/sdk/8.0.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(470,5): error MSB6006: "/var/tmp/portage/dev-dotnet/dotnet-sdk-8.0.105/work/dotnet-sdk-8.0.5/src/runtime/artifacts/source-build/self/package-cache/microsoft.netcore.app.crossgen2.linux-x64/8.0.4/tools/crossgen2" exited with code 139. [/var/tmp/portage/dev-dotnet/dotnet-sdk-8.0.105/work/dotnet-sdk-8.0.5/src/runtime/artifacts/source-build/self/src/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj] > /var/tmp/portage/dev-dotnet/dotnet-sdk-8.0.105/work/dotnet-sdk-8.0.5/.dotnet/sdk/8.0.104/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(358,5): error NETSDK1096: Optimizing assemblies for performance failed. You can either exclude the failing assemblies from being optimized, or set the PublishReadyToRun property to false. [/var/tmp/portage/dev-dotnet/dotnet-sdk-8.0.105/work/dotnet-sdk-8.0.5/src/runtime/artifacts/source-build/self/src/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj] Looks like crossgen2 sefaults. Please rebuild with CFLAGS="-O2 -pipe -march=znver2". Your CFLAGS are, as you wrote: > CXXFLAGS="-O2 -pipe -march=znver2 -O2 -pipe -flto=thin -Werror=odr -Werror=strict-aliasing -stdlib=libstdc++" Created attachment 897348 [details] build log Still having the same issue using CXXFLAGS="-march=znver2 -O2 -pipe" Also, on the last version that I could compile successfully (8.0.101) I used this flags: > cat /var/db/pkg/dev-dotnet/dotnet-sdk-8.0.101/LDFLAGS -stdlib=libstdc++ -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,-O2 -Wl,--as-needed > cat /var/db/pkg/dev-dotnet/dotnet-sdk-8.0.101/CXXFLAGS -O2 -pipe -march=znver2 -O2 -pipe -stdlib=libstdc++ > cat /var/db/pkg/dev-dotnet/dotnet-sdk-8.0.101/CFLAGS -O2 -pipe -march=znver2 -O2 -pipe Its definitely a issue related to what CC+LD and what FLAGS you use for compiling this package. I'd recommend going back to the profile defaults and working your way up from there trying to replace GCC toolchain with CLANG+LLD. |