pkg-config files are wrong for static builds #789
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#789
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
When building a Lix package for static linkage, its pkg-config files do not contain explicit instructions to link against the dependencies, even though they should. (The behaviour is the same for dynamic linkage, but there it is actually correct since transitive dependencies are encoded in the shared libraries themselves.)
Steps To Reproduce
The reproducer is on stable Lix as packaged in nixpkgs for simplicity, but the issue remains on the main branch.
nix-build -A pkgsStatic.lixPackageSets.latest.lix.devcat result-dev/lib/pkgconfig/lix-util.pcLibs.privatefor linking against the dependenciesExpected behavior
There are
Libs.privatefor linking against the dependencies (libarchive etc.)nix --versionoutputAdditional context
The pkg-config files are created manually with code like the following:
configure_file(input : 'lix-util.pc.in',output : 'lix-util.pc',install_dir : libdir / 'pkgconfig',configuration : {'prefix' : prefix,'libdir' : libdir,'includedir' : includedir,'PACKAGE_VERSION' : meson.project_version(),},). If no way is found to make meson's automatic generation behave reasonably, the static case needs to be handled separately.
This issue was mentioned on Gerrit on the following CLs: