Skip to content
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 CGO_LDFLAGS* #434

Merged
merged 2 commits into from
May 28, 2024
Merged

Fix CGO_LDFLAGS* #434

merged 2 commits into from
May 28, 2024

Conversation

geyslan
Copy link
Member

@geyslan geyslan commented May 28, 2024

Close: #429

commit 56601b4

fix(build): add libzstd-dev as required dependency

libzstd may be a dependency on libelf, which is a dependency on libbpf.

commit 85ef759

fix(build): set required ldflags

For static build, get pc info from the freshly built libbpf.a instead of
the system one.
For dynamic build, set only the required ldflags for the system libbpf.

For static build, get pc info from the freshly built libbpf.a instead of
the system one.
For dynamic build, set only the required ldflags for the system libbpf.
@geyslan geyslan added the bug Something isn't working label May 28, 2024
@geyslan geyslan requested a review from rscampos May 28, 2024 14:28
@geyslan geyslan self-assigned this May 28, 2024
@geyslan geyslan marked this pull request as ready for review May 28, 2024 14:34
@geyslan geyslan force-pushed the fix-pkg-conf branch 2 times, most recently from 63c7b91 to ca439ef Compare May 28, 2024 17:21
libzstd may be a dependency on libelf, which is a dependency on libbpf.
Copy link
Collaborator

@rscampos rscampos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@geyslan geyslan merged commit 4f44733 into aquasecurity:main May 28, 2024
17 checks passed
@@ -20,7 +20,7 @@ runs:
sudo apt-get install --yes pkgconf
sudo apt-get install --yes llvm-12 clang-12
sudo apt-get install --yes clang-format-12
sudo apt-get install --yes zlib1g-dev libelf-dev
sudo apt-get install --yes libelf-dev libzstd-dev zlib1g-dev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you only really need libelf-dev, the rest is automatically pulled in:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's indeed. In fact, it could just be the main libbpf-dev, but it might be good to have them listed so that users from different environments (even tarball ones) can take a look at what is needed. @rscampos FYI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Static builds with newer libelf require -l zstd
3 participants