Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 567634

Summary: x11-drivers/xf86-input-keyboard-1.8.1 fails to build on sys-libs/uclibc
Product: Gentoo Linux Reporter: René Rhéaume <rene.rheaume>
Component: [OLD] UnspecifiedAssignee: Gentoo X packagers <x11>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: embedded
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 416069    
Bug Blocks: 570544    
Attachments: emerge --info
build.log from emerge
xf86-input-keyboard-1.8.1.ebuild.patch
Simpler ebuild patch

Description René Rhéaume 2015-12-06 10:44:52 UTC
The build failure is with lnx_kbd.c . An implicit declaration of the function getpgid is treated as an error.  It seems to be a missing include, because POSIX and uclibc have it.

Reproducible: Always

Steps to Reproduce:
1. emerge -u1 x11-drivers/xf86-input-keyboard
2.
3.
Actual Results:  
 * ERROR: x11-drivers/xf86-input-keyboard-1.8.1::gentoo failed (compile phase):
 *   emake failed

Expected Results:  
xf86-input-keyboard updated on system
Comment 1 René Rhéaume 2015-12-06 10:45:11 UTC
Created attachment 418658 [details]
emerge --info
Comment 2 René Rhéaume 2015-12-06 10:45:58 UTC
Created attachment 418660 [details]
build.log from emerge
Comment 3 René Rhéaume 2016-02-02 05:06:41 UTC
Adding <unistd.h> does not help unfortunately. The implicit declaration still exists. It still exists with a simple test C program. To get rid of it, I must avoid unistd.h at all costs, as in my minimal test:

/*#include <unistd.h>*/
#include <sys/types.h>
extern pid_t getpgid(pid_t id);
#include <stdio.h>

int main(int argc, char** argv)
{
	printf("%d\n", getpgid(0));
	return 0;
}

This is something not possible with xf86-input-keyboard source. However, its configure checks for -Werror=implicit, making the implicit declaration an error. In case of uclibc, which has a getpgid symbol, we can simply revert back to a warning with append-cflag in the ebuild. Ugly, but works.
Comment 4 René Rhéaume 2016-02-02 05:10:41 UTC
Created attachment 424440 [details, diff]
xf86-input-keyboard-1.8.1.ebuild.patch

On uclibc, disable -Werror=implicit-function-declaration with append-cflags
Comment 5 SpanKY gentoo-dev 2016-02-02 05:42:18 UTC
packages shouldn't be building with -Werror flags in the first place, so the fix is to disable all of those for this package
Comment 6 René Rhéaume 2016-02-05 11:15:18 UTC
Created attachment 424662 [details, diff]
Simpler ebuild patch

I found out the configure script provides a way to disable all those errors, so this new ebuild patch uses the option.
Comment 7 Matt Turner gentoo-dev 2017-02-01 06:44:28 UTC
This should be fixed by

commit 6aaaf15f8882dd112d22454600294e37969fa822
Author: Matt Turner <mattst88@gentoo.org>
Date:   Sun Jan 29 11:30:39 2017 -0800

    xorg-2.eclass: Use --disable-selective-werror.

Please confirm.