- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Using Large Files (>2GB) with Perl
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 04:41 AM
тАО03-22-2005 04:41 AM
Using Large Files (>2GB) with Perl
I am having some difficulty working with files larger than 2GB with Perl 5.8.5 (which I installed via a depot from the HP-UX Porting and Archive Center). I don't have any problems manually moving files with FTP nor do I have problems loading these files into Oracle but when I try to use Perl things fail. These scripts same scripts work successfully with any file that is smaller than 2GB. I suspect that this problem is related to how Perl was compiled but I am not sure.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 04:59 AM
тАО03-22-2005 04:59 AM
Re: Using Large Files (>2GB) with Perl
Its more likely a problem with the filesystem.
if its not set up for largefiles fsadm must be used to covert it.
A newly created filesystem needs to have this set up explicitly
newfs -F vxfs -o largefiles
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 05:14 AM
тАО03-22-2005 05:14 AM
Re: Using Large Files (>2GB) with Perl
/dev/clarvg/clarity /clarity vxfs delaylog,largefiles 0 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 05:27 AM
тАО03-22-2005 05:27 AM
Re: Using Large Files (>2GB) with Perl
zeus:/root # fsadm -F vxfs /dev/clarvg/rclarity
largefiles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 05:29 AM
тАО03-22-2005 05:29 AM
Re: Using Large Files (>2GB) with Perl
What exact perl command are you having issues with?
A code snippet would help.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 06:11 AM
тАО03-22-2005 06:11 AM
Re: Using Large Files (>2GB) with Perl
The command you have used shows that it supports largefiles, this might be related to perl, what are you trying to execute in perl.
Rgds
HGN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 06:55 AM
тАО03-22-2005 06:55 AM
Re: Using Large Files (>2GB) with Perl
-D_FILE_OFFSET_BITS=64
According to the documentation on the HP-UX Porting and Archive Center their version of Perl was compiled with the above flag removed with the comment that it wasn't needed.
I really don't want to have to go through the trouble of compiling when I don't even know if that is the problem.
I can say that these scripts have worked fine for years with the same files on a Tru64 server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 05:37 PM
тАО03-22-2005 05:37 PM
Re: Using Large Files (>2GB) with Perl
www.xav.com/perl/lib/Pod/perlhpux.html
Using Large Files with Perl
---------------------------
Beginning with HP-UX version 10.20, files larger than 2GB (2^31) may be created and manipulated. Three separate methods of doing this are available. Of these methods, the best method for Perl is to compile using the -D_FILE_OFFSET_BITS=64 compiler flag. This causes Perl to be compiled using structures and functions in which these are 64 bits wide, rather than 32 bits wide.
There are only two drawbacks to this approach: the first is that the seek and tell functions (both the builtin version and the POSIX module's version) will not correctly function for these large files (the offset arguments in seek and tell are implemented as type long). The second is that any extension which calls any file-manipulating C function will need to be recompiled using the above-mentioned -D_FILE_OFFSET_BITS=64 flag. The list of functions that will need to recompiled is: creat, fgetpos, fopen, freopen, fsetpos, fstat, fstatvfs, fstatvfsdev, ftruncate, ftw, lockf, lseek, lstat, mmap, nftw, open, prealloc, stat, statvfs, statvfsdev, tmpfile, truncate, getrlimit, setrlimit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2005 05:49 PM
тАО03-22-2005 05:49 PM
Re: Using Large Files (>2GB) with Perl
You can check that with the -V (capital V) option:
a5:/u/usr/merijn 102 > perl -V | grep 64
use64bitint=undef use64bitall=undef uselongdouble=undef
cc='cc', ccflags =' -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 ',
a5:/u/usr/merijn 103 >
or for builds created with GNU gcc:
a5:/u/usr/merijn 103 > gperl -V | grep 64
use64bitint=undef use64bitall=undef uselongdouble=undef
cc='gcc', ccflags ='-mpa-risc-2-0 -D_HPUX_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
a5:/u/usr/merijn 104 >
Or even shorter:
a5:/u/usr/merijn 104 > perl -V:ccflags
ccflags=' -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 ';
a5:/u/usr/merijn 105 > gperl -V:ccflags
ccflags='-mpa-risc-2-0 -D_HPUX_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64';
a5:/u/usr/merijn 106 >
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-23-2005 02:33 AM
тАО03-23-2005 02:33 AM
Re: Using Large Files (>2GB) with Perl
-D_FILE_OFFSET_BITS=64
flag when I run a perl -V.
zeus:/clarity/data # perl -V |grep 64
use64bitint=undef use64bitall=undef uselongdouble=undef
zeus:/clarity/data # perl -V:ccflags
ccflags='-D_HPUX_SOURCE -mpa-risc-2-0 -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-29-2005 05:39 PM
тАО03-29-2005 05:39 PM
Re: Using Large Files (>2GB) with Perl
--8<---
* hints/hpux.sh:
- Remove -D_FILE_OFFSET_BITS=64 from compiler flags (not needed).
-->8---
Any way, you're most likely safe there.
I'm currently talking to the porters over there to get to a situation that reflects more, and hopefully better, defaults.
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-30-2005 10:22 AM
тАО03-30-2005 10:22 AM