in reply to Re^2: File test (-e) fails on files > 2G, uselargefiles=define
in thread File test (-e) fails on files > 2G, uselargefiles=define

I suspect you should also have -D_FILE_OFFSET_BITS=64 in addition to -D_LARGEFILE_SOURCE ...

Maybe the problem is that this version had been built in a 32-bit build environment (gcc version), at least the README.hpux that comes with the Perl sources states that (emphasis added)

Using Large Files with Perl on HP-UX

... Three separate methods of doing this are available. Of these methods, the best method for Perl is to compile using the -Duselargefiles flag to Configure. This causes Perl to be compiled using structures and functions in which these are 64 bits wide, rather than 32 bits wide. (Note that this will only work with HP's ANSI C compiler. If you want to compile Perl using gcc, you will have to get a version of the compiler that supports 64-bit operations. See above for where to find it.)

Anyhow, before you go to the trouble of building your own version, you might try one the binaries generously offered for download by our very own cbu.

According to the uname signature "hp-ux waves b.11.23 u 9000800 2510705975 ..." the perl you have seems to come from the HP archive... (so there's probably no point in giving that one another try).

Replies are listed 'Best First'.
Re^4: File test (-e) fails on files > 2G, uselargefiles=define
by Tux (Canon) on Aug 08, 2007 at 08:13 UTC

    I more suspect gcc-4.1.1. I currently build perl on HP-UX 11.23/pa with gcc-4.2.1 (when building with gcc).

    The perl from which the -V is shown is a 32bit perl. I agree that -e should not fail, but it means that you cannot address the region beyond 2G unless you're reding it as a stream. Offsets to seek () and such still are 32bit only. I see more and more use for 64bit perls on 11i v2 all along the line. I only use 64bit perl on 11i v1 and up (still on 32bit perl on 10.20 and 11.00)

    Do not build 64bit perl with gcc-4 on 11.11. Maybe 4.2.1 has the issues fixed by now, but otherwise you are heading for trouble.

    The 64bit perl I have running on 11.23/pa does not have -D_FILE_OFFSET_BITS=64 defined, but I build with HP C-ANSI-C and -Ae


    Enjoy, Have FUN! H.Merijn
Re^4: File test (-e) fails on files > 2G, uselargefiles=define
by perlofwisdom (Pilgrim) on Aug 07, 2007 at 19:32 UTC
    Thanks for your help -- I will pass the info along to our Unix SAs. We're in a controlled environment, so I can't make any changes without going through them.