cryptsetup pulls in static libs for othr packages, no matter if they are needed. there is a hard dep on libgpg-error even for -gcrypt, while cryptetup does not use anything fro libgpgerror. Same holds for e2fsprogslibs, crptsetup dos no use anything from there (might be use flag dependant, but if so, the dep should depend on that particular flag) Reproducible: Always Steps to Reproduce: 1. try building static cryptsetup 2. 3. Actual Results: unused deps are enforced Expected Results: build with what's really needed
It's unclear what changes you want to see. Maybe you could attach a patch with your proposed changes.
I browsed quickly through sourcetree of cryptsetup-1.6.2, and when static cryptsetup is built, the configure.ac adds -lgpg-error to LIBS However when dynamic build is enabled, -lgpg-error isn't added to LIBS So looks like upstream is including -lgpg-error in LIBS just because some other library uses it to help the static build And couldn't find any reference to libss, libcom_error, lib... from e2fsprogs-libs, not even for static build So seems like dropping whole sys-libs/e2fsprogs-libs[static-libs(+)] and whole dev-libs/libgpg-error[static-libs(+)] from the ebuild seems like the correct approach, at most, leave static? ( dev-libs/libgpg-error[static-libs(+)] ) to the ebuild, and no e2fsprogs at all
I can't seem to find any usage of libgpgerror in the source (my best guess is it might be used for gcrypt backend) Is there any straighforward way to check on this? I.E.: modify source and try a build to check for missing references during linkage? Another thing, shouldn't ldd for a dynamic executeable list these dependencies aswell? (In reply to Samuli Suominen from comment #2) > I browsed quickly through sourcetree of cryptsetup-1.6.2, and when static > cryptsetup is built, the configure.ac adds -lgpg-error to LIBS > However when dynamic build is enabled, -lgpg-error isn't added to LIBS > So looks like upstream is including -lgpg-error in LIBS just because some > other library uses it to help the static build > > And couldn't find any reference to libss, libcom_error, lib... from > e2fsprogs-libs, not even for static build > > So seems like dropping whole sys-libs/e2fsprogs-libs[static-libs(+)] and > whole dev-libs/libgpg-error[static-libs(+)] from the ebuild seems like the > correct approach, at most, leave > static? ( dev-libs/libgpg-error[static-libs(+)] ) > to the ebuild, and no e2fsprogs at all
(In reply to Samuli Suominen from comment #2) i feel like i did a similar analysis at some point and came to same conclusion (re-overlinking) for e2fsprogs, that might be due to uuid usage ? it's been in there for quite a long time too, so it might just be outdated now.
should be all set now in the tree; thanks for the report! Commit message: Drop e2fsprogs-libs as it is not used http://sources.gentoo.org/sys-fs/cryptsetup/cryptsetup-1.6.2.ebuild?r1=1.14&r2=1.15 http://sources.gentoo.org/sys-fs/cryptsetup/cryptsetup-1.6.5.ebuild?r1=1.13&r2=1.14 http://sources.gentoo.org/sys-fs/cryptsetup/cryptsetup-1.6.6.ebuild?r1=1.6&r2=1.7