File lsb_release in package sys-apps/lsb-release uses the wrong flag for 'long' options. It uses --long which seems invalid. Either -l or --longoptions are valid. The inproper usage of getopt in this case causes a failure to merge lsb-release. My system is musl gentoo hardened, on ARM. The issue is partially explained here: http://www.openwall.com/lists/musl/2014/07/26/10 Either way, I see no harm in changing --long to --longoptions for better compatibility and being more compliant. The same problem occurs with lsb-release-1.4-r1 and 1.4-r2. Reproducible: Always Steps to Reproduce: 1. emerge sys-apps/lsb-release 2. 3. Actual Results: Build fails due to improper getopt usage Expected Results: Build should not fail The getopt call is done in the file lsb_release, in the function EnhancedGetopt around line 124. The actual call is done on line 128.
The alternative is waiting for musl people to change this behaviour in musl itself (if they are going to change it). I'm fine with either and fixed this locally for myself by changing the option. It seemed sensible to file a bug regardless. Feel free to close if this is not deemed sensible.
Note: the one installed by sys-apps/util-linux seems fine with this: # /usr/bin/getopt --long /usr/bin/getopt: option '--longoptions' requires an argument Fixed in -r3.
Thank you for fixing this. FWIW: The one from util-linux is the same one I use; it's just that the flag --long only works when linked with glibc. But now it also works when linked with musl. Thank you! (For completeness sake, I think that the musl developers are now also implementing this non-standard functionality)