question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fail to copy core-sdk files in ubuntu.16.04-arm build

See original GitHub issue

Steps to reproduce

Build Command:

./build.sh -c Release /p:CLIBUILD_SKIP_TESTS=true /p:DISABLE_CROSSGEN=1 /p:Rid=ubuntu.16.04-arm /p:IncludeAdditionalSharedFrameworks=false

Related patch:

--- a/build/Branding.props
+++ b/build/Branding.props
@@ -12,7 +12,7 @@
     <SharedFrameworkName>Microsoft.NETCore.App</SharedFrameworkName>
     <SharedFrameworkNugetName>$(SharedFrameworkName)</SharedFrameworkNugetName>
 
-    <ProductMonikerRid Condition=" '$(Rid)' == 'ubuntu.16.04-x64' Or '$(Rid)' == 'fedora.23-x64' Or '$(Rid)' == 'opensuse.13.2-x64' ">$(Rid)</ProductMonikerRid>
+    <ProductMonikerRid Condition=" '$(Rid)' == 'ubuntu.16.04-x64' Or '$(Rid)' == 'fedora.23-x64' Or '$(Rid)' == 'opensuse.13.2-x64' Or '$(Rid)' == 'ubuntu.16.04-arm'">$(Rid)</ProductMonikerRid>
     <ProductMonikerRid Condition=" '$(ProductMonikerRid)' == '' ">$(OSName)-$(Architecture)</ProductMonikerRid>
     
     <ArtifactNameSdk>dotnet-sdk</ArtifactNameSdk>
--- a/build/BundledRuntimes.props
+++ b/build/BundledRuntimes.props
@@ -53,21 +53,21 @@
       </_DownloadAndExtractItem>
 
       <_DownloadAndExtractItem Include="DownloadedSharedFrameworkInstallerFile"
-                               Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedSharedFrameworkInstallerFile)') And '$(InstallerExtension)' != ''">
+                               Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedSharedFrameworkInstallerFile)') And '$(InstallerExtension)' != '' And '$(IsCross)' == 'False'">
         <Url>$(CoreSetupInstallerBlobRootUrl)/$(SharedFrameworkVersion)/$(DownloadedSharedFrameworkInstallerFileName)</Url>
         <DownloadFileName>$(DownloadedSharedFrameworkInstallerFile)</DownloadFileName>
         <ExtractDestination></ExtractDestination>
       </_DownloadAndExtractItem>
 
       <_DownloadAndExtractItem Include="DownloadedSharedHostInstallerFile"
-                               Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedSharedHostInstallerFile)') And '$(InstallerExtension)' != ''">
+                               Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedSharedHostInstallerFile)') And '$(InstallerExtension)' != '' And '$(IsCross)' == 'False'">
         <Url>$(CoreSetupInstallerBlobRootUrl)/$(SharedHostVersion)/$(DownloadedSharedHostInstallerFileName)</Url>
         <DownloadFileName>$(DownloadedSharedHostInstallerFile)</DownloadFileName>
         <ExtractDestintation></ExtractDestintation>
       </_DownloadAndExtractItem>
 
       <_DownloadAndExtractItem Include="DownloadedHostFxrInstallerFile"
-                               Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedHostFxrInstallerFile)') And '$(InstallerExtension)' != ''">
+                               Condition="'$(SkipBuildingInstallers)' != 'true' And !Exists('$(DownloadedHostFxrInstallerFile)') And '$(InstallerExtension)' != '' And '$(IsCross)' == 'False'">
         <Url>$(CoreSetupInstallerBlobRootUrl)/$(HostFxrVersion)/$(DownloadedHostFxrInstallerFileName)</Url>
         <DownloadFileName>$(DownloadedHostFxrInstallerFile)</DownloadFileName>
         <ExtractDestintation></ExtractDestintation>
--- a/build/DependencyVersions.props
+++ b/build/DependencyVersions.props
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <CLI_SharedFrameworkVersion>2.0.0-beta-001509-00</CLI_SharedFrameworkVersion>
+    <CLI_SharedFrameworkVersion>2.0.0-beta-001650-00</CLI_SharedFrameworkVersion>^M
     <CLI_MSBuild_Version>15.2.0-preview-000002-01</CLI_MSBuild_Version>
     <CLI_Roslyn_Version>2.0.0-rc4-61325-08</CLI_Roslyn_Version>
     <CLI_NETSDK_Version>1.1.0-alpha-20170209-1</CLI_NETSDK_Version>
--- a/build/Prepare.targets
+++ b/build/Prepare.targets
@@ -26,10 +26,14 @@
       <OverwriteExtractionDestination Condition="'$(OverwriteExtractionDestination)' == ''">True</OverwriteExtractionDestination>
     </PropertyGroup>
     
-    <DownloadFile Condition=" '@(_DownloadAndExtractItem)' != '' "
+    <DownloadFile Condition=" '@(_DownloadAndExtractItem)' != '' And '$(IsCross)' == 'False'"
                   Uri="%(_DownloadAndExtractItem.Url)"
                   DestinationPath="%(_DownloadAndExtractItem.DownloadFileName)" />
 
+    <Copy Condition=" '$(IsCross)' == 'True' "
+          SourceFiles="$(RepoRoot)/testsource/$(CombinedFrameworkHostCompressedFileName)"
+          DestinationFiles="$(CombinedSharedHostAndFrameworkArchive)" />
+
     <ZipFileExtractToDirectory Condition=" '%(_DownloadAndExtractItem.ExtractDestination)' != '' AND '$(OSName)' == 'win' "
                                SourceArchive="%(_DownloadAndExtractItem.DownloadFileName)"
                                DestinationDirectory="%(_DownloadAndExtractItem.ExtractDestination)"
--- a/build/Stage0.props
+++ b/build/Stage0.props
@@ -5,6 +5,8 @@
       <DotnetStage0>$(Stage0Directory)/dotnet$(ExeExtension)</DotnetStage0>
       <IsDesktopAvailable>False</IsDesktopAvailable>
       <IsDesktopAvailable Condition=" '$(OSName)' == 'win' ">True</IsDesktopAvailable>
+      <IsCross>False</IsCross>
+      <IsCross Condition=" !$(Rid.Contains('$(OSName)')) Or !$(Rid.Contains('$(Architecture)')) ">True</IsCross>
       <CoreCLRRid>$(Rid)</CoreCLRRid>
       <CoreCLRRid Condition=" '$(OSName)' == 'win' ">win7-$(Architecture)</CoreCLRRid>
       <CoreCLRRid Condition=" '$(OSName)' == 'osx' ">osx.10.10-x64</CoreCLRRid>

Expected behavior

Build successful

Actual behavior

Occurred the following errors:

                   "/home/jyoung/git/dotnet/cli-jy/build.proj" (default target) (1) ->
                   (CompileCLI target) -> 
                     /home/jyoung/git/dotnet/cli-jy/build/Compile.targets(50,7): error MSB3680: The source file "/home/jyoung/git/dotnet/cli-jy/artifacts/ubuntu.16.04-arm/stage2/sdk/2.0.0-alpha-005111/System.ComponentModel.Primitives.dll" does not exist. [/home/jyoung/git/dotnet/cli-jy/build.proj]
                     /home/jyoung/git/dotnet/cli-jy/build/Compile.targets(50,7): error MSB3680: The source file "/home/jyoung/git/dotnet/cli-jy/artifacts/ubuntu.16.04-arm/stage2/sdk/2.0.0-alpha-005111/System.Collections.Specialized.dll" does not exist. [/home/jyoung/git/dotnet/cli-jy/build.proj]
                     /home/jyoung/git/dotnet/cli-jy/build/Compile.targets(50,7): error MSB3680: The source file "/home/jyoung/git/dotnet/cli-jy/artifacts/ubuntu.16.04-arm/stage2/sdk/2.0.0-alpha-005111/System.Collections.NonGeneric.dll" does not exist. [/home/jyoung/git/dotnet/cli-jy/build.proj]
                     /home/jyoung/git/dotnet/cli-jy/build/Compile.targets(50,7): error MSB3680: The source file "/home/jyoung/git/dotnet/cli-jy/artifacts/ubuntu.16.04-arm/stage2/sdk/2.0.0-alpha-005111/System.Private.DataContractSerialization.dll" does not exist. [/home/jyoung/git/dotnet/cli-jy/build.proj]

I’m trying to build cli project for Ubuntu.16.04-arm. I already had a tarball for Ubuntu.16.04-arm but there wasn’t in Azure server so I added some patch to copy the local tarball for testing. The copy and decompression worked fine, but fails to copy the core-sdk dlls. Related code:

in build/Compile.targets
      <!-- copy core sdk -->                                                    
      <Copy SourceFiles="@(MSBuildImportsContent)"                              
            DestinationFolder="$(SdkOutputDirectory)/%(RecursiveDir)" /> 

What does that MSBuildImportsContent mean? When I look at the Ubuntu.14.04-x64 log, it looks like there are not any files to copy at that stage, but I can not find any part of it that copies files to SdkOutputDirectory.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:15 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
jyoungyuncommented, Apr 4, 2017

Finally, I got below results!

pi3@raspberry:~/Downloads/c$ time NUGET_PACKAGES=/home/pi3/Downloads/c/p dotnet build
Microsoft (R) Build Engine version 15.2.47.30403
Copyright (C) Microsoft Corporation. All rights reserved.

  c -> /home/pi3/Downloads/c/bin/Debug/netcoreapp2.0/c.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:27.08

real	0m40.917s
user	0m43.890s
sys	0m1.390s

pi3@raspberry:~/Downloads/c$ time NUGET_PACKAGES=/home/pi3/Downloads/c/p dotnet run
Hello World!

real	0m51.861s
user	0m54.380s
sys	0m1.870s

Build Command: (in jyoung:arm/build_ubuntu_arm branch)

./build.sh --runtime-id ubuntu.16.04-arm -c Release /p:CLIBUILD_SKIP_TESTS=true

I need to change sdk to get upper results, my changes are like below:

+++ b/src/Tasks/Microsoft.NET.Build.Tasks/LockFileLookup.cs
@@ -16,11 +16,17 @@ internal class LockFileLookup
 
         public LockFileLookup(LockFile lockFile)
         {
             _packages = new Dictionary<KeyValuePair<string, NuGetVersion>, LockFileLibrary>(PackageCacheKeyComparer.Instance);
             _projects = new Dictionary<string, LockFileLibrary>(StringComparer.OrdinalIgnoreCase);
 
             foreach (var library in lockFile.Libraries)
             {
+                if (library.Type == null)
+                    throw new ArgumentNullException(library.Type);
+
                 var libraryType = LibraryType.Parse(library.Type);
 
                 if (libraryType == LibraryType.Package)

I’m not clear where lockFile.Libraries come from and why the Type is null in arm target. Who can review this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to copy files from root directory of a failed ubuntu drive
Issue starts when I try to copy anything that's not under /home/user directory. I am trying to copy certain files from /var/lib but...
Read more >
petalinux 2019.2, ubuntu 16.04.6 failure to copy files to /tftpboot
While copying files to /tftpboot, the build terminates early due to one of the 'files' being created as a folder by Petalinux build....
Read more >
Troubleshoot directory path error in COPY command ...
I am using COPY command in my docker file on top of ubuntu 16.04. I am getting error as no such file or...
Read more >
ARM/RaspberryPi
Create a partition with pi firmware/bootloader files; Compile U-boot; Copy the device tree blob; Copy the ISO contents to the FAT partition ...
Read more >
Unable to copy and paste between Mac and Ubuntu Linux ...
I run macOS 12.4 Monterey and installed Parallels 17.1.2 cannot copy and paste between MacOS and Kali machine, using Command-C and Control-V or ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found