New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more complete linux build instructions #101631
base: main
Are you sure you want to change the base?
Conversation
I'm trying to make it slightly easier to install the needed requirements, and add some validation if a user hasn't installed the requirements. Also, I validated that these instructions still work for Ubuntu 24.04 and have noted that other installs are only community-supported.
I'm using |
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
I didn't know about that entry point. I'm happy to integrate with that. |
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
I think it would be good to just point to the (self-documenting) helper script. On fresh machine (baremetal, cloud VM, CI, container) it installs the prereqs in a few second enough to build all default subsets. # replace 'ubuntu' with 'alpine' without changing the steps
$ docker run --rm -v$(pwd):/runtime -w /runtime --platform linux/arm64/v8 ubuntu sh -c '
eng/install-native-dependencies.sh;
./build.sh -c Release' |
I'm fine with this but the lists are currently inconsistent. Our docs:
Script
Diff: build-essential
clang
cmake
-curl
-git
+gettext
libicu-dev
libkrb5-dev
+liblldb-dev
liblttng-ust-dev
libssl-dev
-lld
+libunwind8-dev
lldb
llvm
-ninja-build
-python-is-python3
+locales
zlib1g-dev Thoughts? I personally think ninja-build should be in there even if it's not strictly necessary. |
Yup, agreed.
|
OK, I took the most conservative approach of just taking the union, since I'm not sure what's actually necessary. Also, docs have been updated to point to the shell script. |
@@ -39,6 +39,9 @@ check_prereqs() | |||
# We try again with the PKG_CONFIG_PATH in place, if pkg-config still can't find OpenSSL, exit with an error, cmake won't find OpenSSL either | |||
pkg-config openssl || { echo >&2 "Please install openssl before running this script, see https://github.com/dotnet/runtime/blob/main/docs/workflow/requirements/macos-requirements.md"; exit 1; } | |||
fi | |||
elif [[ "$__HostOS" == "linux" ]]; then | |||
# Check presence of cmake on the path | |||
command -v cmake 2>/dev/null || { echo >&2 "Please install cmake before running this script, see https://github.com/dotnet/runtime/blob/main/docs/workflow/requirements/linux-requirements.md"; exit 1; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are already testing it in gen-buildsys.sh. Also why is this linux only?
. /etc/os-release | ||
fi | ||
|
||
if [ "$ID" = "debian" ] || [ "$ID_LIKE" = "debian" ]; then | ||
apt update | ||
|
||
apt install -y build-essential gettext locales cmake llvm clang lldb liblldb-dev libunwind8-dev libicu-dev liblttng-ust-dev \ | ||
libssl-dev libkrb5-dev zlib1g-dev | ||
xargs apt-get install -y < eng/debian-reqs.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is what we discussed? Please keep this simple script as it was, add the missing deps and link in the docs.
I'm trying to make it slightly easier to install the needed requirements, and add some validation if a user hasn't installed the requirements.
Also, I validated that these instructions still work for Ubuntu 24.04 and have noted that other installs are only community-supported.