-
Notifications
You must be signed in to change notification settings - Fork 424
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
fix(build): static build might require zstd lib #4059
Conversation
libelf might be built with zstd support in some environments, so for static builds (mainly) it is necessary to ensure that the zstd library is available. https://sourceware.org/git/?p=elfutils.git;a=commit;h=ed688a59b4d4f5ccf6ef15244e5a9139f71769a3
This would make room for aquasecurity/btfhub#117. |
https://github.com/aquasecurity/tracee/actions/runs/9166787615/job/25202867174?pr=4059
|
AMIs have to be updated and installations like this commented out.
install_libzstd_os_packages() { | ||
case $ID in | ||
"ubuntu") | ||
wait_for_apt_locks | ||
apt-get install -y libzstd-dev | ||
;; | ||
"almalinux") | ||
yum install -y libzstd-devel | ||
;; | ||
*) | ||
echo "Unsupported OS: $ID" | ||
exit 1 | ||
;; | ||
esac | ||
} | ||
|
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.
All this would be unnecessary if we opted for an easier way of updating the AMIs bunch in a single shot. Anyway, after its future upgrade, those steps should be commented/removed.
@@ -95,7 +95,7 @@ Vagrant.configure("2") do |config| | |||
ln -s "$path" "${path%-*}" | |||
done | |||
|
|||
apt-get install --yes zlib1g-dev libelf-dev | |||
apt-get install --yes zlib1g-dev libelf-dev libzstd-dev |
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.
As we discussed @rscampos, the setup of the bpftool in Vagrantfile must be done in a further PR (since it requires a system upgrade). Thanks for noticing that. 👍🏼
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'll upgrade Vagrantfile in order use compiled version of bpftool :)
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.
LGTM
Close: #4060
1. Explain what the PR does
ac9bdb1 chore: temp fix for install libzstd on AMIs
656df9a chore: install required bpftool from btfhub
e40109f fix(build): static build might require zstd lib
ac9bdb1 chore: temp fix for install libzstd on AMIs
e40109f fix(build): static build might require zstd lib
2. Explain how to test it
3. Other comments