0

I'm trying to build Azure Agent for rhel7.6/aarch64.

But .Net SDK is built with higher glibc version and I'm getting an error:

$ 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 =

Next I'm trying to build .Net SDK for the same platform. But it also pulls .Net SDK to build itself. Loop ended.

$ 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').

I've looked into the building scripts and looks like .Net SDK can't be built without dotnet-cli of a specific version.

So, how can I build .Net SDK with native build tools? Is it possible?

amaslenn
  • 797
  • 9
  • 16

1 Answers1

1

For bootstrapping the SDK on a new OS, follow the corresponding source link guide at Adding support for a new OS.

Martin Ullrich
  • 94,744
  • 25
  • 252
  • 217