Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux build fails #3412

Open
jtang613 opened this issue Feb 25, 2025 · 5 comments
Open

Linux build fails #3412

jtang613 opened this issue Feb 25, 2025 · 5 comments
Labels

Comments

@jtang613
Copy link

Fedora 41
pwsh installed
dotnet-sdk-8.0 installed

Following the steps in the readme produces the following build errors:

MSBuild version 17.8.5+b5265ef37 for .NET
  Determining projects to restore...
  Restored /home/jtang613/tools/ILSpy/ICSharpCode.ILSpyX/ICSharpCode.ILSpyX.csproj (in 189 ms).
  Restored /home/jtang613/tools/ILSpy/ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj (in 189 ms).
  Restored /home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj (in 189 ms).
  Restored /home/jtang613/tools/ILSpy/ICSharpCode.Decompiler.TestRunner/ICSharpCode.Decompiler.TestRunner.csproj (in 189 ms).
  Restored /home/jtang613/tools/ILSpy/ICSharpCode.ILSpyCmd/ICSharpCode.ILSpyCmd.csproj (in 199 ms).
  Restored /home/jtang613/tools/ILSpy/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj (in 273 ms).
  d8825bc1a6799ced72935ca5604ad0c5a8d66885
  ICSharpCode.Decompiler.TestRunner -> /home/jtang613/tools/ILSpy/ICSharpCode.Decompiler.TestRunner/bin/Debug/net8.0/ICSharpCode.Decompiler.TestRunner.dll
  ILSpyUpdateAssemblyInfo-1656059220
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error : Unhandled exception. Interop+Crypto+OpenSslCryptographicException: error:03000098:digital envelope routines::invalid digest [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at Interop.Crypto.RsaSignHash(SafeEvpPKeyHandle pkey, RSASignaturePaddingMode paddingMode, IntPtr digestAlgorithm, ReadOnlySpan`1 hash, Span`1 destination) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at System.Security.Cryptography.RSAOpenSsl.TrySignHash(ReadOnlySpan`1 hash, Span`1 destination, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding, Boolean allocateSignature, Int32& bytesWritten, Byte[]& signature) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at System.Security.Cryptography.RSAOpenSsl.SignHash(Byte[] hash, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at Microsoft.CodeAnalysis.SigningUtilities.CalculateRsaSignature(IEnumerable`1 content, RSAParameters privateKey) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at Microsoft.CodeAnalysis.DesktopStrongNameProvider.<>c__DisplayClass12_0.<SignBuilder>b__0(IEnumerable`1 content) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at System.Reflection.PortableExecutable.PEBuilder.Sign(BlobBuilder peImage, Blob strongNameSignatureFixup, Func`2 signatureProvider) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at Microsoft.Cci.PeWriter.WritePeToStream(EmitContext context, CommonMessageProvider messageProvider, Func`1 getPeStream, Func`1 getPortablePdbStreamOpt, PdbWriter nativePdbWriterOpt, String pdbPathOpt, Boolean metadataOnly, Boolean isDeterministic, Boolean emitTestCoverageData, Nullable`1 privateKeyOpt, CancellationToken cancellationToken) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at Microsoft.CodeAnalysis.Compilation.SerializePeToStream(CommonPEModuleBuilder moduleBeingBuilt, DiagnosticBag metadataDiagnostics, CommonMessageProvider messageProvider, Func`1 getPeStream, Func`1 getMetadataPeStreamOpt, Func`1 getPortablePdbStreamOpt, PdbWriter nativePdbWriterOpt, String pdbPathOpt, RebuildData rebuildData, Boolean metadataOnly, Boolean includePrivateMembers, Boolean isDeterministic, Boolean emitTestCoverageData, Nullable`1 privateKeyOpt, CancellationToken cancellationToken) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at Microsoft.CodeAnalysis.Compilation.SerializeToPeStream(CommonPEModuleBuilder moduleBeingBuilt, EmitStreamProvider peStreamProvider, EmitStreamProvider metadataPEStreamProvider, EmitStreamProvider pdbStreamProvider, RebuildData rebuildData, Func`2 testSymWriterFactory, DiagnosticBag diagnostics, EmitOptions emitOptions, Nullable`1 privateKeyOpt, CancellationToken cancellationToken) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at Microsoft.CodeAnalysis.CommonCompiler.CompileAndEmit(TouchedFileLogger touchedFilesLogger, Compilation& compilation, ImmutableArray`1 analyzers, ImmutableArray`1 generators, ImmutableArray`1 additionalTextFiles, AnalyzerConfigSet analyzerConfigSet, ImmutableArray`1 sourceFileAnalyzerConfigOptions, ImmutableArray`1 embeddedTexts, DiagnosticBag diagnostics, ErrorLogger errorLogger, CancellationToken cancellationToken, CancellationTokenSource& analyzerCts, AnalyzerDriver& analyzerDriver, Nullable`1& generatorTimingInfo) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at Microsoft.CodeAnalysis.CommonCompiler.RunCore(TextWriter consoleOutput, ErrorLogger errorLogger, CancellationToken cancellationToken) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at Microsoft.CodeAnalysis.CommonCompiler.Run(TextWriter consoleOutput, CancellationToken cancellationToken) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc.<>c__DisplayClass1_0.<Run>b__0(TextWriter tw) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc.Run(String[] args, BuildPaths buildPaths, TextWriter textWriter, IAnalyzerAssemblyLoader analyzerLoader) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at Microsoft.CodeAnalysis.CommandLine.BuildClient.RunCompilation(IEnumerable`1 originalArguments, BuildPaths buildPaths, TextWriter textWriter, String pipeName) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at Microsoft.CodeAnalysis.CommandLine.BuildClient.Run(IEnumerable`1 arguments, RequestLanguage language, CompileFunc compileFunc, CompileOnServerFunc compileOnServerFunc, ICompilerServerLogger logger) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.MainCore(String[] args) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]
/usr/lib64/dotnet/sdk/8.0.112/Roslyn/Microsoft.CSharp.Core.targets(84,5): error :    at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main(String[] args) [/home/jtang613/tools/ILSpy/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj]

Build FAILED.
@jtang613 jtang613 added the Bug label Feb 25, 2025
@greenozon
Copy link

seems an old issue
there are some hints over here
dotnet/runtime#65874

@christophwille
Copy link
Member

We are building on Linux, see https://github.com/icsharpcode/ILSpy/blob/master/.github/workflows/build-frontends.yml. So something might be off in your setup.

@jtang613
Copy link
Author

Just tried in a fresh Fedora Docker container - same result. So it's unlikely unique to my setup. Might be a difference between Ubuntu versus Fedora. It does build on an Ubuntu container - but that's only one distro.

@greenozon
Copy link

have you tried one of recommendations? (openssl config change or env var setup)

@jtang613
Copy link
Author

Setting OPENSSL_ENABLE_SHA1_SIGNATURES=1 has no effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants