runtime: Arch Linux: Build.sh Managed Is Broken With Wrong Paths

$ ./build.sh x64 release
Unsupported Linux distribution 'arch' detected. Configuring as if for Ubuntu.
Setting up directories for build
Restoring NuGet.exe...
Unsupported Linux distribution 'arch' detected. Downloading ubuntu-x64 tools.
Installing dotnet cli...
Restoring BuildTools version 1.0.25-prerelease-00190...
Failed to initialize CoreCLR, HRESULT: 0x80131500
ERROR: Could not restore build tools correctly. See '<corefxPath>/init-tools.log' for more details.
Initializing BuildTools...
<corefxPath>/init-tools.sh: line 83: <corefxPath>/packages/Microsoft.DotNet.BuildTools/1.0.25-prerelease-00190/lib/init-tools.sh: No such file or directory
Done initializing tools.
./build.sh: line 108: <corefxPath>/Tools/corerun: No such file or directory

tail: cannot open '<corefxPath>/msbuild.log' for reading: No such file or directory
Build Exit Code = 127

“dotnet-ubuntu-x64.1.0.0.001504.tar.gz” does not contain ANY .sh Files are extracted to “./Tools/dotnetcli/bin/”, so corerun will not be found in ./Tools.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

@vindicatorr, here is the quick / rough recipe for porting dotnet core:

# Step 1 - Build CoreCLR (Debug)
git clone https://github.com/dotnet/coreclr ~/projects/coreclr; cd coreclr ; ./build.sh

# Step 2 - Build CoreFX Native Libraries (Debug)
git clone https://github.com/dotnet/corefx ~/projects/corefx ; cd coreclr ; ./build.sh native

# Step 3 [Option 1 - From source] - Build mscorlib - the primary 'dotnet assembly' (Debug)
# You can't on Arch, so you need to use Windows VM to build:
git clone https://github.com/dotnet/coreclr
coreclr/build.cmd linuxmscorlib # windows
# then scp onto Arch:
scp -r coreclr/bin/Product/Linux.x64.Debug/mscorlib.dll \
user@ip:~/projects/coreclr/bin/Product/Linux.x64.Debug/mscorlib.dll

# Step 3 [Option 2 - Grab mscorlib from latest CI artifacts] (Debug)
#
# 1. Click the debug badge of the closest distro from
#      https://github.com/dotnet/coreclr/blob/master/README.md#build-status
# 2. Click on 'Last successful artifacts' and grab the .zip URL
#     e.g. http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/debug_debian8.2/lastSuccessfulBuild/artifact/
# 3. Extract to /tmp and then copy mscorlib.dll to
#     ~/projects/coreclr/bin/Product/Linux.x64.Debug/mscorlib.dll.

# Step 4: Build CoreFX' managed assemblies
# This needs to do on Windows, Ubuntu, Debian or any supported distro
corefx/build.cmd /p:OSGroup=Linux  # Windows
corefx/build.sh  # Ubuntu et al
scp -r corefx/bin user@ip:~/projects/corefx

# Step 5: Run CoreFX tests
# and finally run tests with already built managed assemblies (that were copied from Windows)
corefx/run-test.sh \
    --coreclr-bins           ../coreclr/bin/Product/Linux.x64.Debug/   \
    --mscorlib-bins          ../coreclr/bin/Product/Linux.x64.Debug/   \
    --corefx-tests            ./bin/tests/Linux.AnyCPU.Debug/          \
    --corefx-native-bins      ./bin/Linux.x64.Debug/Native/

If you stuck on any step, open the issue in either CoreFX or CoreCLR repos or go to corresponding gitter channel http://gitter.im/dotnet/core[fx/clr].

  • Good Luck! ⭐

Edit: Updated Step 3.1 (mscorlib can only build on Windows), added new Step 4 and old Step 4 is now Step 5

No explicit work has been done to enable Arch Linux. We’d welcome you submitting PRs to fix places where things are currently broken, but other than reviewing such PRs and helping to get them merged, we’re not currently focused on enabling it. You may need to build all of the managed components on another OS (e.g. RedHat, Ubuntu, CentOS, OS X, Windows, etc.) and copy them over to your Arch Linux install, as there’s no dotnet-cli or platform-specific packages built for it currently.