[pdftex-Support Requests][4297] conflicting types for 'getline'
![](https://secure.gravatar.com/avatar/9db2065037c299665ed1808a15bd2202.jpg?s=120&d=mm&r=g)
Support Requests item #4297, was opened at 2009-10-31 16:50 Status: Open Priority: 3 Submitted By: Bob Tennent (rdtennent) Assigned to: Nobody (None) Summary: conflicting types for 'getline' Category: Install Problem (example) Group: None Resolution: None Initial Comment: Building pdftex on a Fedora 11 system using build.sh fails: gcc -DHAVE_CONFIG_H -I. -I../../../src/texk/web2c -I.. -I../../../src/texk/web2c/.. -I../../libs/obsdcompat -I../../libs/obsdcompat/.. -I../../../src/texk/web2c/../../libs/obsdcompat -I../../../src/texk/web2c/../../libs/obsdcompat/.. -I../../../src/texk/web2c/../../libs/zlib -g -O2 -c tangleboot.c -o tangleboot.o In file included from tangleboot.c:94: tangleboot.h:34: error: conflicting types for 'getline' /usr/include/stdio.h:653: note: previous declaration of 'getline' was here tangleboot.c:2175: error: conflicting types for 'getline' /usr/include/stdio.h:653: note: previous declaration of 'getline' was here I've built pdftex often on other systems without running into this. What's wrong? ----------------------------------------------------------------------
Comment By: Taco Hoekwater (taco) Date: 2009-11-02 15:22
Message: Near the end of texk/web2c/cpascal.h: #ifdef getline #undef getline #endif #define getline web2c_getline ---------------------------------------------------------------------- Comment By: Bob Tennent (rdtennent) Date: 2009-11-02 15:08 Message: "there is a fix for this problem in texlive 2009" That won't help those of us using a distribution like Fedora 11 which is still at texlive-2007. Editing stdio.h isn't an option for most users. And editing the source of pdftex isn't straightforward because of the conversions. What exactly is the "fix" implemented in texlive 2009? ---------------------------------------------------------------------- Comment By: Martin Schröder (oneiros) Date: 2009-11-02 08:30 Message: POSIX 2008? That's new. It seems the glibc team likes to break old programs. http://blog.scottt.tw/2009/04/getline-is-in-posix-2008-and-exposed-in.html and numerous other hits. ---------------------------------------------------------------------- Comment By: Taco Hoekwater (taco) Date: 2009-11-02 08:13 Message: FWIW: there is a fix for this problem in texlive 2009. ---------------------------------------------------------------------- Comment By: Bob Tennent (rdtennent) Date: 2009-11-02 04:03 Message: This is the response at the Fedora bugzilla: getline is a standard POSIX 2008 function, and glibc headers by default offer POSIX 2008 namespace. See info libc 'Feature Test Macros' for details. You should just either fix pdftex to use a different name, not reserved by POSIX 2008, or use a namespace macro that doesn't provide POSIX 2008 stuff. https://bugzilla.redhat.com/show_bug.cgi?id=532230 ---------------------------------------------------------------------- Comment By: Bob Tennent (rdtennent) Date: 2009-10-31 17:50 Message: According to some reports on the web, the problem is in glibc-2.10.1. Apparently the non-standard definition of getline there should be "protected". Indeed, if I comment out that definition in /usr/include/stdio.h, pdftex builds normally. I'm willing to file a bug report in the Fedora bugzilla but I need some help: what exactly is the "protection" needed? ---------------------------------------------------------------------- You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=494&aid=4297&group_id=106
participants (1)
-
pdftex-supportrequests@sarovar.org