0

我正在尝试为/构建Azure 代理rhel7.6aarch64

但是 .Net SDK 是用更高glibc版本构建的,我收到一个错误:

$ git clone https://github.com/microsoft/azure-pipelines-agent.git
$ cd azure-pipelines-agent
$ cd src
$ ./dev.sh layout
...
-----------------------------------------
  Install .NET SDK
-----------------------------------------
Download dotnetsdk into /source-build/azure-pipelines-agent/src/../_dotnetsdk/3.1.100
dotnet_install: Warning: Unable to locate zlib. Probable prerequisite missing; install zlib.
dotnet_install: Warning: Unable to locate liblttng. Probable prerequisite missing; install libcurl.
dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.100/dotnet-sdk-3.1.100-linux-arm64.tar.gz
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.100/dotnet-sdk-3.1.100-linux-arm64.tar.gz
dotnet-install: Binaries of dotnet can be found in /source-build/azure-pipelines-agent/_dotnetsdk/3.1.100
dotnet-install: Installation finished successfully.


-----------------------------------------
  .NET SDK to path
-----------------------------------------
Adding .NET to PATH (/source-build/azure-pipelines-agent/src/../_dotnetsdk/3.1.100)
Path = /source-build/azure-pipelines-agent/src/../_dotnetsdk/3.1.100:/usr/lib64/qt-3.3/bin:/labhome/andreyma/perl5/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/ibutils/bin:/labhome/andreyma/bin
dotnet: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by dotnet)
dotnet: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by dotnet)
.NET Version =

接下来,我正在尝试为同一平台构建.Net SDK 。但它也拉动 .Net SDK 来构建自己。循环结束。

$ git clone https://github.com/dotnet/sdk.git
$ cd sdk
$ ./build.sh
Downloading 'https://dot.net/v1/dotnet-install.sh'
Trying to run 'curl https://dot.net/v1/dotnet-install.sh -sSL --retry 10 --create-dirs -o /source-build/sdk/.dotnet/dotnet-install.sh' for maximum of 5 attempts.
Ran 'curl https://dot.net/v1/dotnet-install.sh -sSL --retry 10 --create-dirs -o /source-build/sdk/.dotnet/dotnet-install.sh' successfully.
dotnet_install: Warning: Unable to locate zlib. Probable prerequisite missing; install zlib.
dotnet_install: Warning: Unable to locate liblttng. Probable prerequisite missing; install libcurl.
dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.100-preview.2.20152.7/dotnet-sdk-5.0.100-preview.2.20152.7-linux-arm64.tar.gz
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.100-preview.2.20152.7/dotnet-sdk-5.0.100-preview.2.20152.7-linux-arm64.tar.gz
dotnet-install: Adding to current process PATH: `/source-build/sdk/.dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Installation finished successfully.
/source-build/sdk/.dotnet/dotnet: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /source-build/sdk/.dotnet/dotnet)
/source-build/sdk/.dotnet/dotnet: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /source-build/sdk/.dotnet/dotnet)
Build failed (exit code '1').

我查看了构建脚本,看起来dotnet-cli如果没有特定版本就无法构建 .Net SDK 。

那么,如何使用本机构建工具构建 .Net SDK?可能吗?

4

1 回答 1

1

要在新操作系统上引导 SDK,请遵循添加对新操作系统的支持中的相应源链接指南。

于 2020-04-08T12:09:59.903 回答