Summary: | x11-libs/libdrm-2.4.91 - In file included from /usr/include/sys/sysctl.h:63:0, from ../libdrm-2.4.91/xf86drmMode.c:50: /usr/include/bits/sysctl.h:19:3: error: #error "sysctl system call is unsupported in x32 kernel" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | EoD <EoD> |
Component: | Current packages | Assignee: | Gentoo X packagers <x11> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | baker.dylan.c+gentoobugs, nbowler, tsmksubc |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
libdrm-2.4.91:20180306-140037.log
workaround patch... |
Description
EoD
2018-03-06 14:12:53 UTC
Cc'ing Dylan, the author of the Meson build system in libdrm. Dylan, I switched to using Meson for 2.4.91 in Gentoo. Presumably the reporter did not see this bug with 2.4.90, using autotools. The contents of /usr/include/bits/sysctl.h are just #if defined __x86_64__ && defined __ILP32__ # error "sysctl system call is unsupported in x32 kernel" #endif so it will not compile on x32. configure.ac has AC_CHECK_HEADERS([sys/sysctl.h sys/select.h]) meson.build has if cc.has_header('sys/sysctl.h') config.set10('HAVE_SYS_SYSCTL_H', true) endif The docs for AC_CHECK_HEADER [1] indicate that the files are tested to see whether they are "compilable" rather than just for existence. That looks to be the difference causing this bug -- autotools tries to compile sys/sysctl.h and fails while Meson just checks that the file exists. [1] https://www.gnu.org/software/autoconf/manual/autoconf-2.62/html_node/Generic-Headers.html Interesting, meson's compiler.has_header does do a compilation on the header in question, but I think it's not getting the -mx32 flag passed for some reason How is the -m32 and -mx32 being passed, is that part of the compiler alias, it doesn't look like it's being passed as C{XX,PP}FLAGS. if -m32 is passed either in a cross file or as a C{XX,PP}FLAG then it should work. Created attachment 522628 [details, diff]
workaround patch...
Is that tested? if it is this is a meson bug. Also, I don't have x32 in my kernel so this is hard for me to test, could someone attach the meson log in <builddir>/meson-logs/meson-log.txt? Okay, this is a meson bug, although I don't think they see at as one. https://github.com/mesonbuild/meson/issues/2246 I'll update libdrm and mesa to stop using cc.has_header. (In reply to Dylan from comment #6) > Okay, this is a meson bug, although I don't think they see at as one. > > https://github.com/mesonbuild/meson/issues/2246 > > I'll update libdrm and mesa to stop using cc.has_header. Can we use autotools in Gentoo until a new version without cc.has_header has been released? The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24ff291d7990d3bf7c8706f37fd8eb92b919e641 commit 24ff291d7990d3bf7c8706f37fd8eb92b919e641 Author: Matt Turner <mattst88@gentoo.org> AuthorDate: 2018-05-09 22:39:57 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2018-05-09 22:42:04 +0000 x11-libs/libdrm: Version bump to 2.4.92 Closes: https://bugs.gentoo.org/649746 x11-libs/libdrm/Manifest | 1 + x11-libs/libdrm/libdrm-2.4.92.ebuild | 77 ++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) This isn't really fixed yet because 2.4.91 is still the latest stable on amd64, right? |