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

Get 8 build errors on Linux #15398

Closed
cnblogs-dudu opened this issue Oct 9, 2015 · 10 comments
Closed

Get 8 build errors on Linux #15398

cnblogs-dudu opened this issue Oct 9, 2015 · 10 comments
Assignees
Labels
area-Infrastructure-libraries os-linux Linux OS (any supported distro) os-mac-os-x macOS aka OSX
Milestone

Comments

@cnblogs-dudu
Copy link
Contributor

Get 8 errors when building latest corefx on ubuntu with dnx-coreclr-linux-x64.1.0.0-rc1-15838.

CSC : error CS7027: Error signing output with public key from file 
'/data/git/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00104/lib/ECMA.snk' 
-- mscoree.dll [/data/git/corefx/src/System.IO.Compression.ZipFile/ref/System.IO.Compression.ZipFile.csproj]

CSC : error CS7033: Delay signing was specified and requires a public key, but no public key was specified 
[/data/git/corefx/src/System.IO.Compression.ZipFile/ref/System.IO.Compression.ZipFile.csproj]

CSC : error CS7027: Error signing output with public key from file 
'/data/git/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00104/lib/ECMA.snk' 
-- mscoree.dll [/data/git/corefx/src/System.IO.Compression/ref/System.IO.Compression.csproj]

CSC : error CS7033: Delay signing was specified and requires a public key, but no public key was specified 
[/data/git/corefx/src/System.IO.Compression/ref/System.IO.Compression.csproj]

CSC : error CS7027: Error signing output with public key from file 
'/data/git/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00104/lib/ECMA.snk' 
-- mscoree.dll [/data/git/corefx/src/System.Reflection.Context/ref/System.Reflection.Context.csproj]

CSC : error CS7033: Delay signing was specified and requires a public key, but no public key was specified 
[/data/git/corefx/src/System.Reflection.Context/ref/System.Reflection.Context.csproj]

CSC : error CS7027: Error signing output with public key from file 
'/data/git/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00104/lib/ECMA.snk' 
-- mscoree.dll [/data/git/corefx/src/System.Runtime.WindowsRuntime.UI.Xaml/ref/System.Runtime.WindowsRuntime.UI.Xaml.csproj]

CSC : error CS7033: Delay signing was specified and requires a public key, but no public key was specified 
[/data/git/corefx/src/System.Runtime.WindowsRuntime.UI.Xaml/ref/System.Runtime.WindowsRuntime.UI.Xaml.csproj]
@mellinoe
Copy link
Contributor

mellinoe commented Oct 9, 2015

I'm also seeing this on OSX and Linux. It seems to be the same projects as above

@ghost
Copy link

ghost commented Oct 10, 2015

I am getting same on FreeBSD. Here is the msbuild.log.

@weshaggard
Copy link
Member

Copying the snippet from @jasonwilliams200OK's log:

 /root/corefx/packages/Microsoft.Build.Mono.Debug.14.1.0.0-prerelease/lib/tools/../tools/csc2.exe -noconfig -nowarn:1701,1702 -langversion:5 -nostdlib+ -warn:4 -define:DEBUG;TRACE;DEBUGRESOURCES;SIGNED -reference:/root/corefx/packages/System.IO.Compression/4.0.0/ref/dotnet/System.IO.Compression.dll -reference:/root/corefx/packages/System.IO/4.0.0/ref/dotnet/System.IO.dll -reference:/root/corefx/packages/System.Runtime/4.0.0/ref/dotnet/System.Runtime.dll -reference:/root/corefx/packages/System.Text.Encoding/4.0.0/ref/dotnet/System.Text.Encoding.dll -debug- -delaysign+ -keyfile:/root/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00104/lib/ECMA.snk -optimize- -out:/root/corefx/bin/obj/ref/System.IO.Compression.ZipFile/4.0.1.0/System.IO.Compression.ZipFile.dll -target:library -warnaserror+ System.IO.Compression.ZipFile.cs /root/corefx/bin/obj/ref/System.IO.Compression.ZipFile/4.0.1.0/_AssemblyInfo.cs
CSC : error CS7027: Error signing output with public key from file '/root/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00104/lib/ECMA.snk' -- mscoree.dll [/root/corefx/src/System.IO.Compression.ZipFile/ref/System.IO.Compression.ZipFile.csproj]
CSC : error CS7033: Delay signing was specified and requires a public key, but no public key was specified [/root/corefx/src/System.IO.Compression.ZipFile/ref/System.IO.Compression.ZipFile.csproj]

I assume the file /root/corefx/packages/Microsoft.DotNet.BuildTools.1.0.25-prerelease-00104/lib/ECMA.snk exists?

I'm not at all sure what is happening here. @akoeplinger @ellismg any ideas? My only guess is there is something going on with mono csc here.

@ellismg
Copy link
Contributor

ellismg commented Oct 10, 2015

I think @pgavlin was seeing this, but he cleaned and rebuilt and it worked.

@pgavlin
Copy link
Contributor

pgavlin commented Oct 10, 2015

No, I'm still seeing this. Haven't had a chance to investigate yet.

@pgavlin
Copy link
Contributor

pgavlin commented Oct 10, 2015

FWIW, I verified that the key file exists and that it contains the ECMA key.

@ghost
Copy link

ghost commented Oct 10, 2015

Yup the ECMA.snk file exists. I just rebuilt the current master: commit 4554758 from scratch and the occurrence of this error has increased from 8 (against 2d36889) to 12: old vs. new msbuild.log

@ellismg
Copy link
Contributor

ellismg commented Oct 14, 2015

I looked into this a little.

We don't actually use mono CSC, we use Roslyn and apparently Roslyn has never supported this when running on platforms other than windows (since it calls into mscoree to do stuff), see dotnet/roslyn#2444 for more context.

We actually have code to work around this in dir.props by unconditionally setting UseECMAKey to false when the host platform in not Windows. However, some projects were stomping over this setting. It's unclear to me why this just started to break.

I will open a PR that modifies the specific projects to only set UseECMAKey to true if it is unset.

ellismg referenced this issue in ellismg/corefx Oct 14, 2015
Due to dotnet/roslyn#2444, we have disabled
ECMA signing when the host platform for our build is not Windows. This
is done by explicitly setting the property in our top level dir.props.
Some of the reference assemblies explicitly set UseECMAKey to true,
overwriting this value which leads to build breaks when building on non
Windows platforms.

Guard the setting of this property so that we don't override it if it
already set.

Fixes #3739
@joshfree joshfree assigned ellismg and unassigned weshaggard Oct 14, 2015
@mmitche mmitche assigned mmitche and unassigned ellismg Oct 14, 2015
@weshaggard
Copy link
Member

Thanks @ellismg I think this just started to break because we just started to build the ref folders recently (dotnet/corefx@581a773). I suspect it has been broken since then.

@ghost
Copy link

ghost commented Oct 14, 2015

Thanks @ellismg! No more ECMA.snk errors on FreeBSD (latest msbuild.log against 01fc685) 👍

rajansingh10 referenced this issue in rajansingh10/corefx Oct 18, 2015
Due to dotnet/roslyn#2444, we have disabled
ECMA signing when the host platform for our build is not Windows. This
is done by explicitly setting the property in our top level dir.props.
Some of the reference assemblies explicitly set UseECMAKey to true,
overwriting this value which leads to build breaks when building on non
Windows platforms.

Guard the setting of this property so that we don't override it if it
already set.

Fixes #3739
@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 1.0.0-rtm milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jan 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Infrastructure-libraries os-linux Linux OS (any supported distro) os-mac-os-x macOS aka OSX
Projects
None yet
Development

No branches or pull requests

7 participants