Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 751511 - sys-apps/gentoo-functions-0.13 on prefix: consoletype.c:16:10: fatal error: 'sys/sysmacros.h' file not found
Summary: sys-apps/gentoo-functions-0.13 on prefix: consoletype.c:16:10: fatal error: '...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 OS X
: Normal normal
Assignee: William Hubbs
URL:
Whiteboard:
Keywords: PATCH
: 727694 (view as bug list)
Depends on:
Blocks: 755644
  Show dependency tree
 
Reported: 2020-10-27 21:50 UTC by Alexander Bezrukov
Modified: 2020-11-20 01:31 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
A patch to fix compilation of sys-apps/gentoo-functions package on non-glibc systems (gentoo-functions.patch,3.70 KB, patch)
2020-10-27 21:50 UTC, Alexander Bezrukov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Bezrukov 2020-10-27 21:50:19 UTC
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
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-10-27 21:53:25 UTC
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.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-10-27 21:53:55 UTC
*** Bug 727694 has been marked as a duplicate of this bug. ***
Comment 3 Fabian Groffen gentoo-dev 2020-10-28 07:14:21 UTC
(I'm on the alias, don't want to receive everything double)
Comment 4 Fabian Groffen gentoo-dev 2020-10-28 07:53:38 UTC
@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?
Comment 5 Jacob Floyd 2020-11-19 17:05:55 UTC
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?
Comment 6 Jacob Floyd 2020-11-19 17:29:23 UTC
I just submitted https://github.com/gentoo/gentoo-functions/pull/8 to resolve this.
Comment 7 Mike Gilbert gentoo-dev 2020-11-19 17:36:34 UTC
Re-assigning this since the issue should be addressed by the maintainers of gentoo-functions.
Comment 8 Larry the Git Cow gentoo-dev 2020-11-19 18:20:51 UTC
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(+)
Comment 9 Larry the Git Cow gentoo-dev 2020-11-19 18:26:41 UTC
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(+)