LDFLAGS="--as-needed" causes test failures when compiling the latest stable libidn.
Created attachment 395922 [details, diff] libidn-1.29.ebuild.patch
I have contacted the developers about this issue in an effort to get it resolved for the next release. Unfortunately they do not have a bug tracker to provide a public reference to the correspondence.
Comment on attachment 395922 [details, diff] libidn-1.29.ebuild.patch 1) Please post your `emerge --info' output in a comment. 2) Please attach the entire build log to this bug report.
Comment on attachment 395922 [details, diff] libidn-1.29.ebuild.patch This change would overreach your goal by a long way. If the problem happens in src_test(), then we shouldn't need to change the way /everything/ is installed.
You may be correct. My reason for changing the installation of the entire library is that the tests are intended to evaluate the behavior of the program in a way it would be used by other programs. This particular failure may indicate either an issue in the test suite or an issue in the entire library that will cause obscure problems in other programs. The only way I can see to properly determine which case it is, would be to link the library with --as-needed and the test suite with --no-as-needed to see if the tests are still failing. I should have done this prior to filing this bug report.
Created attachment 395986 [details] emerge --info
Created attachment 395988 [details] build.log
A note about the emerge --info output. It says LDLAGS is empty. I compiled set the LDFLAGS for this package only to verify. LDFLAGS="-Wl,--as-needed" emerge --oneshot libidn
I have just concluded some testing on the library specifically using different LDFLAGS in the library compliation and the test suite compilation and it appears to have confirmed my suspicon that this is a problem in the library and not the test suite and my initial proposed solution is the only sensible one here. I will log files from my local testing so you can verify or dispute my findings.
Created attachment 395990 [details] Checking if the problem is in the testsuite All of the tests passed when the tests were compiled with as-needed and the library was compiled with no-as-needed.
Created attachment 395992 [details] Checking if the problem is in the library The expected tests failed when the library was compiled with as-needed and the tests were compiled with no-as-needed.
These are problems in gnulib, not libidn. They should be allowed to fail all they like. The only problem I see is that they are run /before/ the libidn specific tests in <tests/>. The gnulib issues are known upstream and might even have been fixed. The issue is fixed by not simply running the gnulib tests.`
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00435780c75e8a0d728bd1aaf69acc86c77fbd1b commit 00435780c75e8a0d728bd1aaf69acc86c77fbd1b Author: Sam James <sam@gentoo.org> AuthorDate: 2024-01-14 02:43:35 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-01-14 02:44:36 +0000 net-dns/libidn: add 1.42 Note that I've gone back to the default src_test implementation. Ignoring gnulib test failures isn't ideal at all, so let's not do that, given it could affect how the program operates and we've found other bugs that way in other packages before. I'm not aware of any other packages where we make an effort to skip the gnulib tests. Bug: https://bugs.gentoo.org/500662 Bug: https://bugs.gentoo.org/539356 Closes: https://bugs.gentoo.org/898348 Signed-off-by: Sam James <sam@gentoo.org> net-dns/libidn/Manifest | 2 + net-dns/libidn/libidn-1.42.ebuild | 96 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+)