Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 567634 - x11-drivers/xf86-input-keyboard-1.8.1 fails to build on sys-libs/uclibc
Summary: x11-drivers/xf86-input-keyboard-1.8.1 fails to build on sys-libs/uclibc
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on: 416069
Blocks: uclibc-porting
  Show dependency tree
 
Reported: 2015-12-06 10:44 UTC by René Rhéaume
Modified: 2017-02-01 06:44 UTC (History)
1 user (show)

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


Attachments
emerge --info (emerge-info.txt,6.10 KB, text/plain)
2015-12-06 10:45 UTC, René Rhéaume
Details
build.log from emerge (build.log,16.14 KB, text/plain)
2015-12-06 10:45 UTC, René Rhéaume
Details
xf86-input-keyboard-1.8.1.ebuild.patch (xf86-input-keyboard-1.8.1.ebuild.patch,722 bytes, patch)
2016-02-02 05:10 UTC, René Rhéaume
Details | Diff
Simpler ebuild patch (xf86-input-keyboard-1.8.1.ebuild.patch,426 bytes, patch)
2016-02-05 11:15 UTC, René Rhéaume
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.