In sys-devel/binutils-config, in ld/gnuplugin.c (~ line 130), library paths are removed if they are provided by -rpath to ld. However, this is apparently ng on Interix, where apparently -rpath foo_dir does not imply -Lfoo_dir. The end result is that libtool builds fail to relink during portage staging ("cannot find -lfoobarbaz"). Perhaps this is because Interix uses an ancient ld. I hope I have understood the problem correctly... regardless, the enclosed patches fix it, whatever the true etiology :) Reproducible: Always Steps to Reproduce: i.e.: emerge orbit Actual Results: cannot find -lgmodule-2.0 or similar during install phase ("please relink with above options"). Expected Results: success
Created attachment 217545 [details, diff] dont filter libpaths on interix
Created attachment 217547 [details, diff] ebuild patch
hey :) thanks for the patch. i'm thinking about resolving this problem somewhere else (sys-devel/binutils brings a shell script wrapper specifically for interix, look at sys-devel/binutils/files/2.18-ldwrap-interix.sh, and/or the binutils-2.18 ebuild). also, i suspect that something must have gone wrong somewhere: 1) it always worked, until now (i just had the same problem, when i saw the bug) 2) in the binutils ebuild, there is a comment about inserting the PREFIX as search dir in the linker scripts, but it is not done (anymore?). ... searching the files history ... :) hmm... nothing found. could be that this part is missing ever since. i added something. could you update binutils, and try again?
aww... i just realized what caused this problem, and why this is not with every single package: older libtool (older than 2.2.6) did not relink on interix! pfff... a very well hidden bug ;) should be fixed with the linker scripts now though...
Erhm, there is nothing Interix specific here. This is just a bug introduced in the last version because we tried to optimize things here. The "don't add" block should be removed completely, because no platform I know implicitly adds -L for -rpath/-R entries.
presumably fixed in binutils-config-2-r00.2.ebuild