Menu

#124 need gcc option for huge input files

0.5.x
closed
5
2012-09-15
2007-04-23
Ed Spittles
No

Hi Trevor
I'm not sure if you intend to support input files over 2G in size, but they don't work for me (on linux)

What happens is that the call to stat() in file_exists() fails. It's fine for a normal-sized file.

However, if I add an option to gcc in the src/Makefile:
CC = gcc -D_FILE_OFFSET_BITS=64
then it does seem to work.

I'm afraid I don't know how one should fix this in a configure-friendly way.

Cheers
Ed

Discussion

  • Trevor Williams

    Trevor Williams - 2007-08-01

    Logged In: YES
    user_id=512771
    Originator: NO

    Ed,

    I believe the appropriate way to fix this in a configure-friendly way is to specify

    AC_SYS_LARGEFILE

    in the configure.in file. Then run autoconf and do a 'configure' to rebuild the build files. If everything works as advertised, you should see _FILE_OFFSET_BITS=64 defined in config.h.

    Let me know if this works on your end. I have modified the appropriate files in my CVS view, but I don't have an input file large enough to test it.

    Thanks,
    Trevor

     
  • Ed Spittles

    Ed Spittles - 2007-08-01

    Logged In: YES
    user_id=1559380
    Originator: YES

    Thanks for the tip - I'll give this a go on the 13th/14th (I'm away until then)

    Cheers
    Ed

     
  • Trevor Williams

    Trevor Williams - 2007-08-07

    Logged In: YES
    user_id=512771
    Originator: NO

    Added AC_SYS_LARGEFILE to configure.in which defines the appropriate defines needed for
    reading in files larger than 2GB. Change has been made to CVS development branch and will be made available in a 0.5.1 stable release as well.

     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.

MongoDB Logo MongoDB