Created attachment 668840 [details, diff] A patch to fix compilation of sys-apps/gentoo-functions package on non-glibc systems I am trying to bootstrap prefix on MacOS 10.14 and 10.15. So far I made stage1 to pass cleanly, now I switched to stage2. Stage2 bootstrapping produces a bunch of show-stopper errors and I am trying to fix them one by one. The previous bug reports in the series are these: bug 751037, bug 751067, bug 751406, bug 751412, bug 751421. This bug reports deals with build failure of sys-apps/gentoo-functions-0.13 with the error in summary. 'sys/sysmacros.h' is a non-standard [0] and non-portable[1] header file installed by glibc. It is absent on other platforms. Fortunately, on non-Linux platforms no entities from this header ever referenced in consoletype.c so the fix is easy.I am attaching a patch which fixes the build failure. [0]: https://wiki.gentoo.org/wiki/Glibc_2.26_porting_notes/sysmacros.h [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=569092
It's actually a duplicate of bug 727694 but it looks like the mask didn't apply (possibly related to the profile issues we saw earlier, or got dropped). But I guess I will mark the other as a duplicate of this just to make the bug series simpler and you attached a patch.
*** Bug 727694 has been marked as a duplicate of this bug. ***
(I'm on the alias, don't want to receive everything double)
@maintainers, how do you feel about the given patch? Given there is no autoconf here, is there another way to work around this such that it also works when glibc removes the header?
sysmacros.h defines major() which is used on line 59. But, that is already within an #if defined(__linux__) block, so putting the sysmacros.h include in a #if defined(__linux__) condition makes sense. In fact, I'd recommend making this change in gentoo-functions itself, and not relying on the ebuild to patch it. Can we add this and release it as 0.14?
I just submitted https://github.com/gentoo/gentoo-functions/pull/8 to resolve this.
Re-assigning this since the issue should be addressed by the maintainers of gentoo-functions.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=9d503ef40a6d73eea14b6f5015cb2abd9eee292b commit 9d503ef40a6d73eea14b6f5015cb2abd9eee292b Author: Jacob Floyd <cognifloyd@gmail.com> AuthorDate: 2020-11-19 17:20:01 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2020-11-19 18:16:42 +0000 Only include sysmacros.h on linux sysmacros.h is only needed for major() which is only used within an `#if defined(__linux__)` block. So, this header is only needed on linux. Bug: https://bugs.gentoo.org/751511 Signed-off-by: Jacob Floyd <cognifloyd@gmail.com> Signed-off-by: Mike Gilbert <floppym@gentoo.org> consoletype.c | 2 ++ 1 file changed, 2 insertions(+)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0809e838cef2f519482dddc0189774d33305914 commit b0809e838cef2f519482dddc0189774d33305914 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2020-11-19 18:25:20 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2020-11-19 18:26:39 +0000 sys-apps/gentoo-functions: bump to 0.14 Closes: https://bugs.gentoo.org/751511 Signed-off-by: Mike Gilbert <floppym@gentoo.org> sys-apps/gentoo-functions/Manifest | 1 + .../gentoo-functions/gentoo-functions-0.14.ebuild | 28 ++++++++++++++++++++++ 2 files changed, 29 insertions(+)