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

Bug 474686

Summary: x11-apps/xdm with sys-devel/gcc-4.8 when dev-libs/libbsd is present - .../work/xdm-1.1.11/xdm/genauth.c:350:5: error: implicit declaration of function ‘arc4random’ [-Werror=implicit-function-declaration]
Product: Gentoo Linux Reporter: Aleksander <spider.ch>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED FIXED    
Severity: normal CC: candrews, esigra, joakim, rhill, spider.ch, tdalman
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=73326
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 416069    
Bug Blocks: 260867, 461954    
Attachments: build.log
emerge --info
build.log_with_V=1
config.log

Description Aleksander 2013-06-25 08:00:42 UTC
Created attachment 351874 [details]
build.log

Cannot build x11-apps/xdm(1.1.11-r1 1.1.11-r2) with sys-devel/gcc(4.8.0 4.8.1).
Comment 1 Aleksander 2013-06-25 08:01:44 UTC
Created attachment 351876 [details]
emerge --info
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2013-06-25 17:03:11 UTC
Hmm, it builds fine here, and I can't see where -Werror=implicit-function-declaration comes from.  Can you attach a build log with V=1 in MAKEOPTS and config.log from the xdm-1.1.11_build directory?
Comment 3 Aleksander 2013-06-26 01:41:29 UTC
Created attachment 351974 [details]
build.log_with_V=1
Comment 4 Aleksander 2013-06-26 01:42:41 UTC
Created attachment 351976 [details]
config.log
Comment 5 Aleksander 2013-06-26 01:43:12 UTC
Added build log with V=1 in MAKEOPTS and config.log
Comment 6 Ryan Hill (RETIRED) gentoo-dev 2013-06-26 04:09:24 UTC
-Werror=implicit implies -Werror=implicit-function-declaration and that's getting added by xorg-macros.m4.

X11 guys, please add --disable-selective-werror to your configure options.  Building with -Werror is against our policies.  Feel free to fix the underlying problem of course.
Comment 7 Tolga Dalman 2013-07-28 09:06:12 UTC
 I can't reproduce this bug. If it is a Werror problem, this bug should be marked RESOLVED INVALID, right ?
Comment 8 Ryan Hill (RETIRED) gentoo-dev 2013-07-28 09:19:51 UTC
No, I can't reproduce it either, but it doesn't matter.  People are hitting it.
Comment 9 Aleksander 2013-12-08 05:51:48 UTC
I think I've found the solution. 

Create file: /etc/portage/env/xdm_no_error.conf
With: CFLAGS="${CFLAGS} -Wno-all"  In it.

Then, add: x11-apps/xdm xdm_no_error.conf 
into file: /etc/portage/package.env

After that xdm should build successfully.
Maybe that ugly solution, but at least now i can build xdm.
Comment 10 Chí-Thanh Christopher Nguyễn gentoo-dev 2014-01-06 16:00:59 UTC
The problem does only manifest if libbsd is installed, because arc4random (and setproctitle too) are used without proper #include directives. xdm does not attempt to use arc4random if libbsd is not installed on Linux systems.

Patch was applied to 1.1.11-r3 and also sent upstream.