Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 875830 - sys-libs/libsmbios: fails to build on riscv: fatal error: sys/io.h: No such file or directory
Summary: sys-libs/libsmbios: fails to build on riscv: fatal error: sys/io.h: No such f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: riscv Linux
: Normal normal (vote)
Assignee: RISCV project
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-10-07 09:39 UTC by WANG Xuerui
Modified: 2022-10-07 12:39 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description WANG Xuerui gentoo-dev 2022-10-07 09:39:38 UTC
Fails to compile on riscv, apparently because of one unconditionally included system header that doesn't exist on riscv:

src/libsmbios_c/cmos/cmos_linux.c:25:10: fatal error: sys/io.h: No such file or directory
   25 | #include <sys/io.h>
      |          ^~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:1954: src/libsmbios_c/cmos/out_libsmbios_c_la-cmos_linux.lo] Error 1

Found during test-building for ~loong keywording, but suspected the riscv keyword is wrong as well.
Comment 1 Larry the Git Cow gentoo-dev 2022-10-07 12:39:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3670f06a1fae8b4cf51223a540837a34cc286e07

commit 3670f06a1fae8b4cf51223a540837a34cc286e07
Author:     WANG Xuerui <xen0n@gentoo.org>
AuthorDate: 2022-10-07 12:28:27 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-10-07 12:38:50 +0000

    sys-libs/libsmbios: fix incorrect KEYWORDS
    
    Mark as -* until upstream is properly fixed to not require <sys/io.h>
    unconditionally. The ~arm64 and ~riscv keywords were added by mistake;
    they both fail to build due to absence of said header.
    
    Based on glibc availability of <sys/io.h>, alpha is the only other
    architecture that can build the package in any case, but SMBIOS is not
    relevant on alpha anyway so ~alpha is not tested or included.
    
    Closes: https://bugs.gentoo.org/875830
    Closes: https://github.com/gentoo/gentoo/pull/27672
    Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/libsmbios/libsmbios-2.4.3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47ba5845d0be4e4d0a60e92724ea4c96abce842f

commit 47ba5845d0be4e4d0a60e92724ea4c96abce842f
Author:     WANG Xuerui <xen0n@gentoo.org>
AuthorDate: 2022-10-07 12:12:13 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-10-07 12:38:50 +0000

    profiles/arch: mask useflags pulling in sys-libs/libsmbios on non-amd64/x86
    
    Bug: https://bugs.gentoo.org/875830
    Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/arch/amd64/package.use.mask | 5 +++++
 profiles/arch/base/package.use.mask  | 8 ++++++++
 profiles/arch/riscv/package.use.mask | 2 +-
 profiles/arch/x86/package.use.mask   | 5 +++++
 4 files changed, 19 insertions(+), 1 deletion(-)