Dru has asked for the wisdom of the Perl Monks concerning the following question:

Monks,

This is a followup to this node. I have figured out this only happens when the file is larger then 2GB, so I did some searching and seen some posts where people recommended compiling perl with large file support. So I downloaded the latest version of Perl (5.8.4), the version I was using was 5.8.0. I was reading the INSTALL file before compiling and in it states:

"Since Perl 5.6.0, Perl has supported large files (files larger than 2 gigabytes), and in many common platforms like Linux or Solaris this support is on by default."

I'm still getting the same error message with 5.8.4 when trying to use File::Readbackwards with a file larger then 2GB.

Anyone have anyother ideas why this isn't working?

Thanks,
Dru

Replies are listed 'Best First'.
Re: Problem with Large Files
by iburrell (Chaplain) on Jun 11, 2004 at 19:18 UTC
    Check if your Perl was built with large files support with 'perl -V'. Look for uselargefiles in the Platform section, and any large files defines in the Compiler. If your Perl does not have large file support, you will need to find a package that does or build a new interpreter.

    What OS are you using? Recent Linux distros should have large file support in glibc, and the ones I know of build Perl with large file support.

      Some operating systems require you to explicitly mount the filesystem with large file support (man mount).

      No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

      Yeah, it does:
      [jdoe@pc]$ /opt/perl/bin/perl -V | grep large config_args='-d -Dprefix=/opt/perl -Duselargerfiles'
      It's a RH 9.0 machine. I'm going to be upgrading it soon to RH ES.

      Thanks.
        Please correct me if I am wrong, but is the configuration option not supposed to be -Duselargefiles (instead of -Duselargerfiles as shown in your post)? When checking the configuration on my own build of perl (which does have large file support), I receive the following output:
        rob@robc:~ > /opt/bin/perl -V | grep -i large useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef Compile-time options: USE_LARGE_FILES

         

        perl -le "print unpack'N', pack'B32', '00000000000000000000001011100011'"

Re: Problem with Large Files
by sweetblood (Prior) on Jun 11, 2004 at 19:42 UTC
    You may well have to turn on largefile support in you os. I did when we ran hpux 10x
    HTH
    Sweetblood