[pdftex] Error building pdftex 1.30.6 on cygwin

gnwiii at gmail.com gnwiii at gmail.com
Sat Feb 25 13:21:11 CET 2006

On 2/25/06, Olivier Lefevre <lefevrol at yahoo.com> wrote:
> Both teTeX and MiKTex come with the ancient 1.21a and
> I could probably use the PNG-related improvements, so
> I tried upgrading but got:
> srcdir=../../../src/texk/web2c /bin/sh
> ../../../src/texk/web2c/web2c/convert tangleboot
> gcc -DHAVE_CONFIG_H  -I. -I../../../src/texk/web2c -I..
> -I../../../src/texk/web2
> c/..   -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/sys/stdio.h:31: error: previous declaration of 'getline'
> was here
> tangleboot.h:34: error: conflicting types for 'getline'
> /usr/include/sys/stdio.h:31: error: previous declaration of 'getline'
> was here
> make: *** [tangleboot.o] Error 1
> The stdio.h line in question is
> ssize_t _EXFUN(getline, (char **, size_t *, FILE *));
> Any advice would be much apreciated.

This problem was raised in the past few days on the tetex list.  Here is my
response again:

Comment out the offending line in stdio.h and file a bug report with
the Cygwin folks.

The Cygwin man page "portability" section says this is a glibc extension.
On my debian linux system, the relevant section of stdio.h is protected:

# ifdef __USE_GNU
/* Like `getdelim', but reads up to a newline.  */
__STDIO_INLINE _IO_ssize_t
getline (char **__lineptr, size_t *__n, FILE *__stream)
 return __getdelim (__lineptr, __n, '\n', __stream);
# endif /* GNU */

Fedora core 2 stdio.h has the same protection as well as a note that
getline is not in POSIX.  The linux man page for getline has:

      #define _GNU_SOURCE
      #include <stdio.h>

Additional comments.

The only Win32 distro with really current binaries is  Kakuto's
Win32TeX:  http://www.fsci.fuk.kindai.ac.jp/%E2%80%BEkakuto/win32-ptex/web2c75-e.html
This has pdftex-1.40-beta binaries which can also work with tetex
and/or texlive trees.  Win32 users should also look at dviout, which
is a very flexible (e.g., tricky to configure) dvi viewer.
Note that pdftex-1.40 merged pdfetex with pdftex and added a "-etex"
option for use with "-ini".  On linux, I use a hard link from pdftex
to pdfetex.  On Win32 you may need to fiddle with fmtutil.cnf.

Cygwin seems to have forked away from the way linux handles the
various standards (POSIX, c89, c99, ansi).   This makes it
increasingly difficult to build current versions of applications being
maintained on linux.

George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia

More information about the pdftex mailing list