Skip to content

v10.0.0-preview.5.25277.114 fails to build for linux-x64 using Docker #1467

@alexrp

Description

@alexrp

Not entirely sure if I should be filing this issue on this repo; please redirect appropriately if not.

The following commands fail in GitHub Actions on ubuntu-latest:

  git clone --branch v10.0.0-preview.5.25277.114 --depth 1 --single-branch https://github.com/dotnet/dotnet
  docker run \
    --rm \
    --platform linux/amd64 \
    --volume /home/runner/work/dotnet-builds/dotnet-builds/dotnet:/dotnet \
    --workdir /dotnet \
    --env ROOTFS_DIR=/crossrootfs/x64 \
    mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-amd64 \
    ./build.sh \
      --clean-while-building \
      --prep \
      --source-only \
      --arch x64 \
      --os linux \
      -property:OfficialBuildId=$(date +%Y%m%d).99

Output:

    Executing /dotnet/src/runtime/src/coreclr/"build-runtime.sh" -x64 -release -portablebuild=false -keepnativesymbols -os linux -outputrid azurelinux.3.0-x64 -cmakeargs "-DCLR_DOTNET_RID=linux-x64" -cmakeargs "-DCLR_DOTNET_HOST_PATH=/dotnet/.dotnet/dotnet" -component nativeaot
    Commencing CoreCLR Repo build
    __OutputRid: azurelinux.3.0-x64
    Setting up directories for build
    Checking prerequisites...
    Commencing build of "  nativeaot " target in "CoreCLR component" for linux.x64.Release in /dotnet/src/runtime/artifacts/obj/coreclr/linux.x64.Release
    Invoking "/dotnet/src/runtime/eng/native/gen-buildsys.sh" "/dotnet/src/runtime/src/coreclr" "/dotnet/src/runtime/artifacts/obj/coreclr/linux.x64.Release" x64 linux clang Release ""  -DCLR_CMAKE_PGO_INSTRUMENT=0 -DCLR_CMAKE_OPTDATA_PATH= -DCLR_CMAKE_PGO_OPTIMIZE=0 -DCLI_CMAKE_FALLBACK_OS="azurelinux.3.0" -DFEATURE_DISTRO_AGNOSTIC_SSL=0 -DCLR_DOTNET_HOST_PATH=/dotnet/.dotnet/dotnet -DCLR_DOTNET_RID=linux-x64  -DCLR_CMAKE_KEEP_NATIVE_SYMBOLS=true
    Not searching for unused variables given on the command line.
    -- The C compiler identification is Clang 20.1.6
    -- The CXX compiler identification is Clang 20.1.6
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /usr/local/bin/clang-20 - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/local/bin/clang++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- The linker identification is LLD 20.1.6 (compatible with GNU linkers)
    Detected Linux x86_64
    -- Performing Test COMPILER_SUPPORTS_F_STACK_PROTECTOR_STRONG
    -- Performing Test COMPILER_SUPPORTS_F_STACK_PROTECTOR_STRONG - Success
    -- Performing Test COMPILER_SUPPORTS_W_IMPLICIT_FALLTHROUGH
    -- Performing Test COMPILER_SUPPORTS_W_IMPLICIT_FALLTHROUGH - Success
    -- Performing Test COMPILER_SUPPORTS_W_RESERVED_IDENTIFIER
    -- Performing Test COMPILER_SUPPORTS_W_RESERVED_IDENTIFIER - Success
    -- The ASM compiler identification is Clang 20.1.6 with GNU-like command-line
    -- Found assembler: /usr/local/bin/clang-20
    -- Performing Test COMPILER_SUPPORTS_F_ALIGNED_NEW
    -- Performing Test COMPILER_SUPPORTS_F_ALIGNED_NEW - Success
    -- Performing Test HAVE_DIRENT_D_TYPE
    -- Performing Test HAVE_DIRENT_D_TYPE - Success
    -- Looking for getauxval
    -- Looking for getauxval - found
    -- Looking for include file GSS/GSS.h
    -- Looking for include file GSS/GSS.h - not found
    -- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) 
    CMake Error at /dotnet/src/runtime/src/native/libs/System.Security.Cryptography.Native/extra_libs.cmake:30 (message):
      !!! Cannot find libssl and System.Security.Cryptography.Native cannot build
      without it.  Try installing libssl-dev (on Linux, but this may vary by
      distro) or openssl (on macOS) !!!.  See the requirements document for your
      specific operating system:
      https://github.com/dotnet/runtime/tree/main/docs/workflow/requirements.
    Call Stack (most recent call first):
      /dotnet/src/runtime/src/native/corehost/apphost/static/CMakeLists.txt:210 (append_extra_cryptography_libs)
    
    
    -- Configuring incomplete, errors occurred!
    Failed to generate "CoreCLR component" build project!
  /dotnet/src/runtime/src/coreclr/runtime.proj(119,5): error MSB3073: The command "/dotnet/src/runtime/src/coreclr/"build-runtime.sh" -x64 -release -portablebuild=false -keepnativesymbols -os linux -outputrid azurelinux.3.0-x64 -cmakeargs "-DCLR_DOTNET_RID=linux-x64" -cmakeargs "-DCLR_DOTNET_HOST_PATH=/dotnet/.dotnet/dotnet" -component nativeaot" exited with code 1.
  
  Build FAILED.
  
  /dotnet/src/runtime/src/coreclr/runtime.proj(119,5): error MSB3073: The command "/dotnet/src/runtime/src/coreclr/"build-runtime.sh" -x64 -release -portablebuild=false -keepnativesymbols -os linux -outputrid azurelinux.3.0-x64 -cmakeargs "-DCLR_DOTNET_RID=linux-x64" -cmakeargs "-DCLR_DOTNET_HOST_PATH=/dotnet/.dotnet/dotnet" -component nativeaot" exited with code 1.
      0 Warning(s)
      1 Error(s)
  
  Time Elapsed 00:00:32.65
  Build failed with exit code 1. Check errors above.

This is fairly odd as linux-{arm,arm64,loongarch64,ppc64le,riscv64,s390x} all work just fine (with --use-mono-runtime for ppc64le and s390x).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions