I have been trying to make a static binary of sys-apps/flashrom and was having problems with missing dependencies, i.e. missing USE=static-libs in certain libraries. After some debugging, I realised that because virtual/libusb does NOT have IUSE="static-libs" it satisfies (somehow?) the requirement of sys-apps/flashrom-1.0 as found in the ebuild: pickit2_spi? ( virtual/libusb:0[static-libs(+)] ) However `USE=static emerge flashrom` build fails due to not having dev-libs/libusb and dev-libs/libusb-comat build with USE=static-libs I'll try to submit a PR with fixes for virtual/libusb and link it here.
Peter Stuge <peter@stuge.se> might be interested in this...
We don't encourage static-libs and you don't seem to have a very good case for needing them.
(In reply to Michał Górny from comment #2) > We don't encourage static-libs and you don't seem to have a very good case > for needing them. Ookey, that is a new view for me, but thank you for clarifying it. I understand the reasoning against static linking for normal packages that are meant to be used (present, built, updated) on the system; Here the case is using a Gentoo box as a development platform for other hardware (e.g. embedded). Sorry for not making it clear. Just for the record, the sole reason for static-libs here in this bug is having an easily transferable tool (flashrom) to various, less-powerful and limited hardware platforms, to work on a low-level (flash firmware). While the proposed solution in PR is the generic one, of course it may be tackled at sys-apps/flashrom ebuild level (by not depending on virtual/libusb, but directly on dev-libs/libusb and dev-libs/libusb-compat with proper USE). But I thought it will be kind of a hack and decided to fix the general case, since dev-libs/libusb and dev-libs/libusb-compat do support static-libs already. Are those comments grounds of reopening of this bug? If not - close it and I'll submit the other proposed solution on flashrom ebuild directly.
(In reply to Kalin KOZHUHAROV from comment #3) > (In reply to Michał Górny from comment #2) > > We don't encourage static-libs Gentoo is about enabling choice. > > and you don't seem to have a very good case for needing them. > > Here the case is using a Gentoo box as a development platform for > other hardware (e.g. embedded). I think this use case is very much valid. > Sorry for not making it clear. No need to apologize. > Just for the record, the sole reason for static-libs here in this bug is > having an easily transferable tool (flashrom) to various, less-powerful > and limited hardware platforms, to work on a low-level (flash firmware). It's perfectly reasonable to add IUSE=static-libs to the virtual. The library being LGPL means that static linking is explicitly allowed by the license, and there's no reason for Gentoo to add obstacles on that path. > While the proposed solution in PR is the generic one, of course it may be > tackled at sys-apps/flashrom ebuild level (by not depending on > virtual/libusb, but directly on dev-libs/libusb and dev-libs/libusb-compat > with proper USE). But I thought it will be kind of a hack and decided to fix > the general case, since dev-libs/libusb and dev-libs/libusb-compat do > support static-libs already. I agree. I think your proposed commit is an improvement over the status quo. I hope it gets committed quickly, and that we don't have to do the workaround in the flashrom ebuild. (I am proxy maint.) Thanks!
We will take another look at this.
See also: https://projects.gentoo.org/qa/policy-guide/installed-files.html#pg0302