-
Notifications
You must be signed in to change notification settings - Fork 139
Description
The model used by CBL Mariner (the distro we use to build all official builds) is a minimal OS providing a compiler and tools, combined with a sysroot folder containing libraries and headers to compile/link against. This lets us use a consistent compiler, toolchain, etc, regardless of the target architecture or distribution, and easily use a compiler version which is newer than the old version bundled with the old distros we link against (for older glibc compatibility).
Right now, the VMR fails to build on mariner for two reasons:
- There's no easy way to pass through the sysroot to the relevant repo builds which expect it (they're looking for a
ROOTFS_DIRenvironment variable) - We need to make sure repos are coping with CBL Mariner eccentricities, particularly the lack of GNU
ldlinker (only LLVMlldis provided, and it must be opted in for every repo by passing-fuse-ld=lldto the linker flags)
Right now, attempting to build with Mariner fails as follows:
$ docker run -e ROOTFS_DIR=/crossrootfs/x64 -w `pwd` --platform linux/amd64 -v `pwd`:`pwd` -it mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-amd64 ./prep.sh
[..]
$ docker run -e ROOTFS_DIR=/crossrootfs/x64 -w `pwd` --platform linux/amd64 -v `pwd`:`pwd` -it mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-amd64 ./build.sh --online -- /p:PortableBuild=true
[..]
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_INCLUDE_DIR)
CMake Error at /home/directhex/Projects/dotnet/src/runtime/artifacts/source-build/self/src/src/native/libs/System.Security.Cryptography.Native/extra_libs.cmake:29 (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.
[..]
$ cat /home/directhex/Projects/dotnet/src/runtime/artifacts/source-build/self/src/artifacts/obj/coreclr/linux.x64.Release/CMakeFiles/CMakeError.log
[..]
clang-16: error: unable to execute command: Executable "ld" doesn't exist!
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
[..]
We also need to either check whether we need to be building the subsets we currently build, OR add the needed files to the sysroot folder, to ensure every expected lib/header is available (e.g. GSS.h isn't in our images)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status