[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#618033: texlive-bin-2009: Missing -D_FILE_OFFSET_BITS=64 leads to files not opening (x86 /32bit)



On 13.03.11 Pierre SCHNIZER <p.schnizer@gsi.de> (p.schnizer@gsi.de) wrote:

> The error occurs in the kpathsea library (texk/kpathsea/readable.c),
> where the stat fails with the errno set to EOVERFLOW. It fails
> because the offset is to large. After I added manually
> -D_FILE_OFFSET_BITS=64 (following the stat 2 man page),
> kpathsea/pdflatex finds the file and compiles it happily. I added "a
> patch", which illustrates my hack to find and circumvent the
> problem.
> 
For the records: regarding LFS support there is
http://www.suse.de/~aj/linux_lfs.html

In a nutshell for using LFS you can choose either of the following:

    * Compile your programs with "gcc -D_FILE_OFFSET_BITS=64". This
      forces all file access calls to use the 64 bit variants.
      Several types change also, e.g. off_t becomes off64_t. It's
      therefore important to always use the correct types and to not
      use e.g. int instead of off_t. For portability with other
      platforms you should use getconf LFS_CFLAGS which will return
      -D_FILE_OFFSET_BITS=64 on Linux platforms but might return
      something else on e.g. Solaris. For linking, you should use
      the link flags that are reported via getconf LFS_LDFLAGS. On
      Linux systems, you do not need special link flags.
    * Define _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE. With these
      defines you can use the LFS functions like open64 directly.
    * Use the O_LARGEFILE flag with open to operate on large files.

H.
-- 
sigmentation fault



Reply to: