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

Make novendor feature the default #521

Conversation

mmullin-halcyon
Copy link

See: libbpf/libbpf-sys#64

The "static" feature will now get libbpf-sys to do all the static compilation of the libraries required by libbpf rather than the application developer statically compiling these libraries themselves, or relying on the distribution to provide static versions.

The default feature will no longer link libbpf statically. All libbpf libraries, including libbpf, will now be dynamically linked to distribution provided shared libraries

CHANGELOG NOTE #1: feature "static" allows libelf and zlib to be statically linked. Completely static binaries can now be compiled via the command RUSTFLAGS='-C target-feature=+crt-static' cargo build --target x86_64-unknown-linux-gnu.
CHANGELOG NOTE #2: "static" feature will not work with musl.

Thank you for considering a contribution!

In order to streamline review experience for contributors and reviewers, please
be sure to read and follow the Contributor's Guide. It
lays out basic best practices, which, if followed will reduce unnecessary back
and forth and, ultimately, minimize the time it takes to get your change into
the library.

@mmullin-halcyon
Copy link
Author

RE: #498

@mmullin-halcyon
Copy link
Author

Note on Changelog #2. I do not believe that libbpf ever compiled with musl. musl-gcc does not "play well" with Linux Kernel headers, and libbpf uses some of the headers that musl-gcc does not play well with. I believe that Alpine Linux has always required the "libbpf-sys/novendor" feature (now it should simply compile with default).

@mmullin-halcyon
Copy link
Author

Posting this in anticipation of approval of the libbpf-sys change.

Comment on lines 18 to 20
# When turned on, compile and link all libbpf library dependencies statically
# When turned off, dynamically link all libbpf library dependencies
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's please also mention that static implies vendoring of all C library dependencies? That is crucial from my perspective.

@danielocfb danielocfb marked this pull request as draft July 28, 2023 20:21
See: libbpf/libbpf-sys#64

The "static" feature will now get libbpf-sys to do all the static compilation
of the libraries required by libbpf rather than the application developer
statically compiling these libraries themselves, or relying on the
distribution to provide static versions.

The default feature will no longer link libbpf statically.  All libbpf
libraries, including libbpf, will now be dynamically linked to
distribution provided shared libraries

CHANGELOG NOTE libbpf#1: feature "static" allows libelf and zlib to be statically
linked. Completely static binaries can now be compiled via the command
`RUSTFLAGS='-C target-feature=+crt-static' cargo build --target
x86_64-unknown-linux-gnu`.
CHANGELOG NOTE libbpf#2: "static" feature will not work with musl.

Signed-off-by: Michael Mullin <[email protected]>
@mmullin-halcyon mmullin-halcyon force-pushed the origin/story/vendorize_dependencies branch from 73ff47e to 8cd1b2e Compare July 29, 2023 16:56
@danielocfb
Copy link
Collaborator

I think we are still blocked on waiting for a new libbpf-sys release before we can move forward here :-(

Copy link

This pull request is considered stale because it has been open 30 days with no activity. Remove stale label or comment or it will be closed in 5 days.

@github-actions github-actions bot added the Stale label Dec 28, 2023
Copy link

github-actions bot commented Jan 2, 2024

Closing pull request as it is stale.

@github-actions github-actions bot closed this Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants