-
Notifications
You must be signed in to change notification settings - Fork 305
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
sdjournal: pkg-config isn't queried for include paths #351
Comments
@flokli Thanks for all the digging (and nixpkgs work detailing your intermediate workarounds that led me here). Much <3 from a NixOS noob. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Moved over from #141 (comment)
#141 moved libsystemd from being linked at build time to being
dlopen
-ed at runtime.However, that PR entirely removed the
pkg-config
directive.As
pkg-config
isn't only used for linker flags, but also for include paths, this breaks the build on systems that don't ship the systemd headers in the default include paths (such as NixOS):One option might be to keep using pkg-config to discover include dirs, or ship the header files inline if we're relying on them.
Frankly, I'm not entirely sure about whether
dlopen
-ing libsystemd insidego-systemd
is a good idea.Usually, package managers use the library paths and
NEEDED
symbols in ELF headers to reason about runtime depenencies.Switching from linking to dlopen causes this to not happen anymore, and leads to sudden, unexpected failures at runtime in any binaries that use go-systemd somewhere, if the dynamic linker can't find the library in the "common library paths" at runtime. Propagating these dependencies through sounds more desirable IMHO.
#141 originally just wanted to avoid linking against libsystemd at runtime, I wonder if this can be accomplished by passing some flags at build time, or is only required when compiling in the components that require libsystemd functionality in first place.
The text was updated successfully, but these errors were encountered: