Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 agree, libraries belong in
lib
.Unfortunately a ton of packages that have a
$lib
output are putting their.a
files in$out
. I think autotools even does this by default when you build both static and dynamic libraries (i.e. it doesn't use--libdir
for the.a
files). On my system, when scanning/nix/store/*-lib/
for.a
files, the only hits are things that don't use autotools. Or it might be the way nixpkgs invokes./configure
. Anyways, the problem affects a lot more than justgcc
.This should probably be fixed nixpkgs-wide in
setup.sh
someday.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.
From what I understand how library lookup works splitting
.a
and.so
into different directories will effectively cause only one of them to be used asld
will use first found. I would expect most of the packages to put both together in a single directory.My understanding is that
nixpkgs
tries hard not to build both if possible (--enable-shared --disable-static
/--disable-shared --enable-static
).autotools
should put both into--libdir
. EvenFHS
distributions rely a lot on--libdir
correct handling to put 32-vs-64 bit code into a correct location to make-m32
/-m64
just work.Sure. Though most programs don't implement the split between host/target libraries. For simpler programs it should be only a matter of fixing build system to put results into a correct directory (
--libdir
or equivalent).gcc
case is slightly more complicated than that. Otherwise we would not need this huge driver-wrapper that incorrectly reimplements gcc's assumed library search.