Update for 5.0.102 and bootstrapping

This commit is contained in:
Omair Majid 2021-01-20 17:24:05 -05:00
parent 12422fd0a6
commit 96fb4c4fa9
3 changed files with 82 additions and 17 deletions

View File

@ -125,7 +125,7 @@ if [ ! -f "${unmodified_tarball_name}.tar.gz" ]; then
git submodule update --init --recursive git submodule update --init --recursive
clean_dotnet_cache clean_dotnet_cache
# FIXME remove contineuonprebuilterror # FIXME remove contineuonprebuilterror
./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true -p:UseSystemLibraries=true ./build.sh -p:SkipPrebuiltEnforcement=true -p:ContinueOnPrebuiltBaselineError=true -p:ArchiveDownloadedPackages=true -p:UseSystemLibraries=true -p:UseSystemLibunwind=false
./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true ./build-source-tarball.sh "${unmodified_tarball_name}" --skip-build -- -p:ContinueOnPrebuiltBaselineError=true -p:SkipPrebuiltEnforcement=true
if [[ ${build_bootstrap} == true ]]; then if [[ ${build_bootstrap} == true ]]; then

View File

@ -20,11 +20,11 @@
# until that's done, disable LTO. This has to happen before setting the flags below. # until that's done, disable LTO. This has to happen before setting the flags below.
%define _lto_cflags %{nil} %define _lto_cflags %{nil}
%global host_version 5.0.0 %global host_version 5.0.2
%global runtime_version 5.0.0 %global runtime_version 5.0.2
%global aspnetcore_runtime_version 5.0.0 %global aspnetcore_runtime_version 5.0.2
%global sdk_version 5.0.100 %global sdk_version 5.0.102
%global templates_version 5.0.0 %global templates_version %{runtime_version}
#%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }') #%%global templates_version %%(echo %%{runtime_version} | awk 'BEGIN { FS="."; OFS="." } {print $1, $2, $3+1 }')
%global host_rpm_version %{host_version} %global host_rpm_version %{host_version}
@ -63,15 +63,20 @@ URL: https://github.com/dotnet/
# The source is generated on a Fedora box via: # The source is generated on a Fedora box via:
# ./build-dotnet-tarball v%%{src_version}-SDK # ./build-dotnet-tarball v%%{src_version}-SDK
Source0: dotnet-9c4e5de-x64-bootstrap.tar.gz Source0: dotnet-v%{src_version}-SDK-x64-bootstrap.tar.gz
Source1: check-debug-symbols.py Source1: dotnet-v%{src_version}-SDK-arm64-bootstrap.tar.gz
Source2: dotnet.sh.in
Source10: check-debug-symbols.py
Source11: dotnet.sh.in
Patch1: source-build-runtime-fixup-linker-order.patch Patch1: source-build-runtime-fixup-linker-order.patch
# https://github.com/dotnet/runtime/pull/42094 # https://github.com/dotnet/runtime/pull/42094
# Fix linker order when linking with --as-needed # Fix linker order when linking with --as-needed
Patch100: runtime-linker-order.patch Patch100: runtime-linker-order.patch
# https://github.com/dotnet/runtime/pull/47020
# Fix build with gcc 11
Patch101: runtime-47020-gcc11.patch
# Disable telemetry by default; make it opt-in # Disable telemetry by default; make it opt-in
Patch500: sdk-telemetry-optout.patch Patch500: sdk-telemetry-optout.patch
@ -310,7 +315,16 @@ These are not meant for general use.
%prep %prep
%setup -q -n dotnet-9c4e5de-x64-bootstrap %if %{without bootstrap}
%setup -q -n dotnet-v%{src_version}-SDK
%else
%ifarch x86_64
%setup -q -T -b 0 -n dotnet-v%{src_version}-SDK-%{runtime_arch}-bootstrap
%endif
%ifarch aarch64
%setup -q -T -b 1 -n dotnet-v%{src_version}-SDK-%{runtime_arch}-bootstrap
%endif
%endif
%if %{without bootstrap} %if %{without bootstrap}
# Remove all prebuilts # Remove all prebuilts
@ -339,17 +353,13 @@ sed -i 's|skiptests|skiptests ignorewarnings|' repos/runtime.common.props
pushd src/runtime.* pushd src/runtime.*
%patch100 -p1 %patch100 -p1
%patch101 -p1
popd popd
pushd src/sdk.* pushd src/sdk.*
%patch500 -p1 %patch500 -p1
popd popd
%ifnarch x86_64
mkdir -p artifacts/obj/%{runtime_arch}/Release
cp artifacts/obj/x64/Release/PackageVersions.props artifacts/obj/%{runtime_arch}/Release/PackageVersions.props
%endif
cat source-build-info.txt cat source-build-info.txt
find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \; find -iname 'nuget.config' -exec echo {}: \; -exec cat {} \; -exec echo \;
@ -418,7 +428,7 @@ VERBOSE=1 ./build.sh \
%endif %endif
sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE2} > dotnet.sh sed -e 's|[@]LIBDIR[@]|%{_libdir}|g' %{SOURCE11} > dotnet.sh
%install %install
@ -473,7 +483,7 @@ install artifacts/%{runtime_arch}/Release/Private.SourceBuilt.Artifacts.*.tar.gz
# because native binaries are stripped by rpm-build after %%install. # because native binaries are stripped by rpm-build after %%install.
# So we need to do this check earlier. # So we need to do this check earlier.
echo "Testing build results for debug symbols..." echo "Testing build results for debug symbols..."
%{SOURCE1} -v %{buildroot}%{_libdir}/dotnet/ %{SOURCE10} -v %{buildroot}%{_libdir}/dotnet/
%check %check

55
runtime-47020-gcc11.patch Normal file
View File

@ -0,0 +1,55 @@
From 7123b8344ddc1c883483f13d34abbd22d4170452 Mon Sep 17 00:00:00 2001
From: Omair Majid <omajid@redhat.com>
Date: Tue, 5 Jan 2021 18:50:18 -0500
Subject: [PATCH] Fix build errors using GCC 11 (#46334)
Building runtime with GCC 11 leads to some new errors. The errors are
consistent with the "Header dependency changes" section documented at
https://gcc.gnu.org/gcc-11/porting_to.html
The first set of errors looks like this:
runtime/src/coreclr/pal/src/misc/cgroup.cpp:403:29:
error: no member named 'numeric_limits' in namespace 'std'
if (temp > std::numeric_limits<size_t>::max())
~~~~~^
Fix that by including <limits>.
The second set of errors looks like this:
runtime/src/installer/corehost/cli/test/nativehost/host_context_test.cpp:634:31:
error: no member named 'sleep_for' in namespace 'std::this_thread'
std::this_thread::sleep_for(std::chrono::milliseconds(100));
~~~~~~~~~~~~~~~~~~^
Fix that by including <thread>.
---
src/coreclr/src/pal/src/misc/cgroup.cpp | 1 +
src/installer/corehost/cli/test/nativehost/host_context_test.cpp | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/coreclr/src/pal/src/misc/cgroup.cpp b/src/coreclr/src/pal/src/misc/cgroup.cpp
index f3e20012c539..24617359a21b 100644
--- a/src/coreclr/src/pal/src/misc/cgroup.cpp
+++ b/src/coreclr/src/pal/src/misc/cgroup.cpp
@@ -14,6 +14,7 @@ Module Name:
#include "pal/dbgmsg.h"
SET_DEFAULT_DEBUG_CHANNEL(MISC);
#include "pal/palinternal.h"
+#include <limits>
#include <limits.h>
#include <sys/resource.h>
#include "pal/virtual.h"
diff --git a/src/installer/corehost/cli/test/nativehost/host_context_test.cpp b/src/installer/corehost/cli/test/nativehost/host_context_test.cpp
index cea98db6673a..371ec2d7e2aa 100644
--- a/src/installer/corehost/cli/test/nativehost/host_context_test.cpp
+++ b/src/installer/corehost/cli/test/nativehost/host_context_test.cpp
@@ -11,6 +11,7 @@
#include <corehost_context_contract.h>
#include "hostfxr_exports.h"
#include "host_context_test.h"
+#include <thread>
#include <utils.h>
namespace