Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 274965 - x11-wm/ratpoison fails to compile with glibc-2.10
Summary: x11-wm/ratpoison fails to compile with glibc-2.10
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Desktop WM Team (OBSOLETE)
URL: http://lists.gnu.org/archive/html/rat...
Whiteboard:
Keywords:
Depends on:
Blocks: glibc-2.10
  Show dependency tree
 
Reported: 2009-06-21 17:31 UTC by Robert Bradbury
Modified: 2009-08-01 23:49 UTC (History)
4 users (show)

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


Attachments
Patch allowing x11-wm/ratpoison-1.4.4 to build with glibc 2.10 (ratpoison-1.4.4-glibc210.patch,649 bytes, patch)
2009-06-21 18:44 UTC, Víctor Ostorga (RETIRED)
Details | Diff
Patch against current x11-wm/ratpoison-1.4.4-r1 ebuild (ratpoison-1.4.4-r1.ebuild.patch,380 bytes, patch)
2009-06-21 18:46 UTC, Víctor Ostorga (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Bradbury 2009-06-21 17:31:16 UTC
Ratpoison 1.4.4-r1 fails to compile with glibc-2.10 due to the redundant definition of getline() in history.c.

The ebuild needs to be changed such that if the glibc version is 2.10 or higher the definition "HAVE_GETLINE" is defined (or one of the other changes in Additional Information).

Reproducible: Always

Steps to Reproduce:
1. emerge ratpoison


Actual Results:  
gcc -DHAVE_CONFIG_H -I.   -I/usr/include/freetype2     -O2 -march=prescott -pipe -I/usr/X11R6/include -MT history.o -MD -MP -MF .deps/history.Tpo -c -o history.o history.c
history.c:78: error: static declaration of 'getline' follows non-static declaration
/usr/include/stdio.h:651: error: previous declaration of 'getline' was here


Expected Results:  
history.c should compile properly

Comment from the developer(s) was:

It seems glibc-2.10 defaults to IEEE 1003.1-2008 (which contains
getline()), unless __STRICT_ANSI__ , _POSIX_SOURCE or POSIX_C_SOURCE
are defined. Previous versions of glibc used IEEE 1003.1-2004 as a
default.
Comment 1 Robert Bradbury 2009-06-21 18:03:56 UTC
The command:
  CFLAGS+=" -DHAVE_GETLINE" emerge ratpoison
seems to allow the emerge to work with glibc-2.10.1.
Comment 2 Víctor Ostorga (RETIRED) gentoo-dev 2009-06-21 18:44:20 UTC
Created attachment 195377 [details, diff]
Patch allowing x11-wm/ratpoison-1.4.4 to build with glibc 2.10
Comment 3 Víctor Ostorga (RETIRED) gentoo-dev 2009-06-21 18:46:47 UTC
Created attachment 195378 [details, diff]
Patch against current x11-wm/ratpoison-1.4.4-r1 ebuild
Comment 4 Joost Ruis 2009-07-06 06:33:29 UTC
I can confirm the workaround suggested in #1

Comment 5 Víctor Ostorga (RETIRED) gentoo-dev 2009-08-01 23:49:15 UTC
Patch applied in portage