Building linker

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Building linker

Neale Ferguson
Hi,
 I am trying to build the linker from master and after installing the NUnit dependencies and cloning cecil into the cecil subdirectory (I assume that was required), a make in mono build results in:

Target CoreCompile:

Tool /usr/lib/mono/4.5/mcs.exe execution started with arguments: /noconfig /debug:full /debug+ /optimize- /out:obj/Debug/Mono.Linker.Tests.Cases.Expectations.dll Assertions/BaseInAssemblyAttribute.cs Assertions/IgnoreTestCaseAttribute.cs Assertions/KeptAssemblyAttribute.cs Assertions/KeptAttribute.cs Assertions/BaseExpectedLinkedBehaviorAttribute.cs Assertions/KeptBackingFieldAttribute.cs Assertions/KeptDelegateCacheFieldAttribute.cs Assertions/KeptEventAddMethodAttribute.cs Assertions/KeptEventRemoveMethodAttribute.cs Assertions/KeptMemberAttribute.cs Assertions/KeptMemberInAssemblyAttribute.cs Assertions/KeptResourceAttribute.cs Assertions/KeptResourceInAssemblyAttribute.cs Assertions/KeptSecurityAttribute.cs Assertions/KeptTypeInAssemblyAttribute.cs Assertions/RemovedAssemblyAttribute.cs Assertions/RemovedMemberInAssemblyAttribute.cs Assertions/RemovedResourceInAssemblyAttribute.cs Assertions/RemovedTypeInAssemblyAttribute.cs Assertions/SkipPeVerifyAttribute.cs Metadata/BaseMetadataAttribute.cs Metadata/SetupCompileAfterAttribute.cs Metadata/SetupCompileAssemblyNameAttribute.cs Metadata/SetupCompileArgumentAttribute.cs Metadata/SetupCompileBeforeAttribute.cs Metadata/DefineAttribute.cs Metadata/IncludeBlacklistStepAttribute.cs Metadata/Il8nAttribute.cs Metadata/KeepTypeForwarderOnlyAssembliesAttribute.cs Metadata/NotATestCaseAttribute.cs Metadata/ReferenceAttribute.cs Metadata/SandboxDependencyAttribute.cs Assertions/KeptBaseTypeAttribute.cs Assertions/KeptInterfaceAttribute.cs Assertions/KeptAttributeAttribute.cs Assertions/RemovedForwarderAttribute.cs Metadata/SetupLinkerActionAttribute.cs Metadata/SetupLinkerArgumentAttribute.cs Metadata/SetupLinkerCoreActionAttribute.cs Metadata/SetupCompileResourceAttribute.cs Metadata/SetupLinkerLinkSymbolsAttribute.cs obj/Debug/.NETFramework,Version=v4.0.AssemblyAttribute.cs /target:library /define:"DEBUG;TRACE" /nostdlib /reference:/usr/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll /reference:/usr/lib/mono/gac/Microsoft.CSharp/4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll /reference:/usr/lib/mono/gac/System.Data/4.0.0.0__b77a5c561934e089/System.Data.dll /reference:/usr/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll /reference:/usr/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll /warn:4

CSC: error CS0518: The predefined type `System.Object' is not defined or imported

CSC: error CS0518: The predefined type `System.ValueType' is not defined or imported

CSC: error CS0518: The predefined type `System.Attribute' is not defined or imported

CSC: error CS0518: The predefined type `System.Int32' is not defined or imported

CSC: error CS0518: The predefined type `System.UInt32' is not defined or imported

:

:


I am building using mono 4.6.2 on Ubuntu. 

Neale



_______________________________________________
Mono-devel-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/mono-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Building linker

Ludovic Henry (XAMARIN) via Mono-devel-list
Could you please try with a more recent Mono, e.g. 5.4.1 ?
We build it in CI and it's green there.

- Alex

On 29 Jan 2018, at 22:10, Neale Ferguson <[hidden email]> wrote:

Hi,
 I am trying to build the linker from master and after installing the NUnit dependencies and cloning cecil into the cecil subdirectory (I assume that was required), a make in mono build results in:

Target CoreCompile:
Tool /usr/lib/mono/4.5/mcs.exe execution started with arguments: /noconfig /debug:full /debug+ /optimize- /out:obj/Debug/Mono.Linker.Tests.Cases.Expectations.dll Assertions/BaseInAssemblyAttribute.cs Assertions/IgnoreTestCaseAttribute.cs Assertions/KeptAssemblyAttribute.cs Assertions/KeptAttribute.cs Assertions/BaseExpectedLinkedBehaviorAttribute.cs Assertions/KeptBackingFieldAttribute.cs Assertions/KeptDelegateCacheFieldAttribute.cs Assertions/KeptEventAddMethodAttribute.cs Assertions/KeptEventRemoveMethodAttribute.cs Assertions/KeptMemberAttribute.cs Assertions/KeptMemberInAssemblyAttribute.cs Assertions/KeptResourceAttribute.cs Assertions/KeptResourceInAssemblyAttribute.cs Assertions/KeptSecurityAttribute.cs Assertions/KeptTypeInAssemblyAttribute.cs Assertions/RemovedAssemblyAttribute.cs Assertions/RemovedMemberInAssemblyAttribute.cs Assertions/RemovedResourceInAssemblyAttribute.cs Assertions/RemovedTypeInAssemblyAttribute.cs Assertions/SkipPeVerifyAttribute.cs Metadata/BaseMetadataAttribute.cs Metadata/SetupCompileAfterAttribute.cs Metadata/SetupCompileAssemblyNameAttribute.cs Metadata/SetupCompileArgumentAttribute.cs Metadata/SetupCompileBeforeAttribute.cs Metadata/DefineAttribute.cs Metadata/IncludeBlacklistStepAttribute.cs Metadata/Il8nAttribute.cs Metadata/KeepTypeForwarderOnlyAssembliesAttribute.cs Metadata/NotATestCaseAttribute.cs Metadata/ReferenceAttribute.cs Metadata/SandboxDependencyAttribute.cs Assertions/KeptBaseTypeAttribute.cs Assertions/KeptInterfaceAttribute.cs Assertions/KeptAttributeAttribute.cs Assertions/RemovedForwarderAttribute.cs Metadata/SetupLinkerActionAttribute.cs Metadata/SetupLinkerArgumentAttribute.cs Metadata/SetupLinkerCoreActionAttribute.cs Metadata/SetupCompileResourceAttribute.cs Metadata/SetupLinkerLinkSymbolsAttribute.cs obj/Debug/.NETFramework,Version=v4.0.AssemblyAttribute.cs /target:library /define:"DEBUG;TRACE" /nostdlib /reference:/usr/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll /reference:/usr/lib/mono/gac/Microsoft.CSharp/4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll /reference:/usr/lib/mono/gac/System.Data/4.0.0.0__b77a5c561934e089/System.Data.dll /reference:/usr/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll /reference:/usr/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll /warn:4
CSC: error CS0518: The predefined type `System.Object' is not defined or imported
CSC: error CS0518: The predefined type `System.ValueType' is not defined or imported
CSC: error CS0518: The predefined type `System.Attribute' is not defined or imported
CSC: error CS0518: The predefined type `System.Int32' is not defined or imported
CSC: error CS0518: The predefined type `System.UInt32' is not defined or imported
:
:

I am building using mono 4.6.2 on Ubuntu. 

Neale


_______________________________________________
Mono-devel-list mailing list
[hidden email]
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.dot.net%2Fmailman%2Flistinfo%2Fmono-devel-list&data=02%7C01%7Calkpli%40microsoft.com%7C8067cceeda054f61615f08d5675cbbdf%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C636528570381012916&sdata=yAsPakCUgSliKnBfJLgpL%2F0EKAxjdOtX05iKRxdbgNs%3D&reserved=0


_______________________________________________
Mono-devel-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/mono-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Building linker

Neale Ferguson
I got a clean build in mono build (check failed though). I also ran bootstrap & build in core build. Again, all clean. How do I test drive the linker?


The 16.04 repo should work fine on 17.10.

On 30 Jan 2018, at 03:20, Neale Ferguson <[hidden email]> wrote:

Can I install 5.4 on my Ubuntu 17.10 using the 16.04 repo or should I just build it from github.com using 5.8 tag? 

_______________________________________________
Mono-devel-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/mono-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Building linker

Ludovic Henry (XAMARIN) via Mono-devel-list
We just run "check" in monobuild in CI, that seems to work.


On 30 Jan 2018, at 18:52, Neale Ferguson <[hidden email]> wrote:

I got a clean build in mono build (check failed though). I also ran bootstrap & build in core build. Again, all clean. How do I test drive the linker?


The 16.04 repo should work fine on 17.10.

On 30 Jan 2018, at 03:20, Neale Ferguson <[hidden email]> wrote:

Can I install 5.4 on my Ubuntu 17.10 using the 16.04 repo or should I just build it from github.com using 5.8 tag? 


_______________________________________________
Mono-devel-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/mono-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Building linker

Neale Ferguson
Make check yields - 

Errors, Failures and Warnings


1) Invalid : /root/linker/linker/Tests/bin/Debug/Mono.Linker.Tests.dll

No suitable tests found in '/root/linker/linker/Tests/bin/Debug/Mono.Linker.Tests.dll'.

Either assembly contains no tests or proper test driver has not been found.


Test Run Summary

  Overall result: Failed

  Test Count: 0, Passed: 0, Failed: 0, Warnings: 0, Inconclusive: 0, Skipped: 0

  Start time: 2018-01-30 18:16:05Z

    End time: 2018-01-30 18:16:06Z

    Duration: 1.099 seconds



Note, I’m using NUnit.ConsoleRunner.3.8.0 instead of 3.6.1.

To use this in "real life”, for example if I had a simple HelloWorld.exe, what invocation would I use to process this with the linker?

From: Alexander Köplinger <[hidden email]>
Date: Tuesday, January 30, 2018 at 1:03 PM
To: Neale Ferguson <[hidden email]>
Cc: Mono-Devel <[hidden email]>
Subject: Re: [Mono-dev] Building linker

We just run "check" in monobuild in CI, that seems to work.


On 30 Jan 2018, at 18:52, Neale Ferguson <[hidden email]> wrote:

I got a clean build in mono build (check failed though). I also ran bootstrap & build in core build. Again, all clean. How do I test drive the linker?


The 16.04 repo should work fine on 17.10.

On 30 Jan 2018, at 03:20, Neale Ferguson <[hidden email]> wrote:

Can I install 5.4 on my Ubuntu 17.10 using the 16.04 repo or should I just build it from github.com using 5.8 tag? 


_______________________________________________
Mono-devel-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/mono-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Building linker

Ludovic Henry (XAMARIN) via Mono-devel-list
Can you post a full build log? Did you modify 3.6.1 to 3.8.0 everywhere?
It looks like the test dll wasn't built.

For real world use the readme here has examples: https://github.com/mono/linker/blob/master/linker/README


On 30 Jan 2018, at 19:18, Neale Ferguson <[hidden email]> wrote:

Make check yields - 

Errors, Failures and Warnings

1) Invalid : /root/linker/linker/Tests/bin/Debug/Mono.Linker.Tests.dll
No suitable tests found in '/root/linker/linker/Tests/bin/Debug/Mono.Linker.Tests.dll'.
Either assembly contains no tests or proper test driver has not been found.

Test Run Summary
  Overall result: Failed
  Test Count: 0, Passed: 0, Failed: 0, Warnings: 0, Inconclusive: 0, Skipped: 0
  Start time: 2018-01-30 18:16:05Z
    End time: 2018-01-30 18:16:06Z
    Duration: 1.099 seconds


Note, I’m using NUnit.ConsoleRunner.3.8.0 instead of 3.6.1.

To use this in "real life”, for example if I had a simple HelloWorld.exe, what invocation would I use to process this with the linker?

From: Alexander Köplinger <[hidden email]>
Date: Tuesday, January 30, 2018 at 1:03 PM
To: Neale Ferguson <[hidden email]>
Cc: Mono-Devel <[hidden email]>
Subject: Re: [Mono-dev] Building linker

We just run "check" in monobuild in CI, that seems to work.


On 30 Jan 2018, at 18:52, Neale Ferguson <[hidden email]> wrote:

I got a clean build in mono build (check failed though). I also ran bootstrap & build in core build. Again, all clean. How do I test drive the linker?


The 16.04 repo should work fine on 17.10.

On 30 Jan 2018, at 03:20, Neale Ferguson <[hidden email]> wrote:

Can I install 5.4 on my Ubuntu 17.10 using the 16.04 repo or should I just build it from github.com using 5.8 tag? 



_______________________________________________
Mono-devel-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/mono-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Building linker

Neale Ferguson


Can you post a full build log? Did you modify 3.6.1 to 3.8.0 everywhere?
It looks like the test dll wasn't built.

For real world use the readme here has examples: https://github.com/mono/linker/blob/master/linker/README

_______________________________________________
Mono-devel-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/mono-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Building linker

Ludovic Henry (XAMARIN) via Mono-devel-list
Hmm, it's building with xbuild. Did you override this since according to the Makefile it should use msbuild.

xbuild references /usr/lib/cli/nunit.framework-2.6.3/nunit.framework.dll instead of NUnit from the nuget package when building Mono.Linker.Tests.dll, maybe that's the issue.

On 30 Jan 2018, at 21:14, Neale Ferguson <[hidden email]> wrote:



Can you post a full build log? Did you modify 3.6.1 to 3.8.0 everywhere?
It looks like the test dll wasn't built.

For real world use the readme here has examples: https://github.com/mono/linker/blob/master/linker/README


_______________________________________________
Mono-devel-list mailing list
[hidden email]
http://lists.dot.net/mailman/listinfo/mono-devel-list