Bug 53328 - g77 -D_LARGEFILE_SOURCE > >-D_FILE_OFFSET_BITS=64 won't enable large files >2gb
g77 -D_LARGEFILE_SOURCE > >-D_FILE_OFFSET_BITS=64 won't enable large files >2gb
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.1
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-09-06 15:21 EDT by Jay W Parker
Modified: 2007-04-18 12:36 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-09-07 09:38:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jay W Parker 2001-09-06 15:21:27 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.7 (Macintosh; I; PPC)

Description of problem:
I want fortran code to write files >2gb.  I get code that stops at 2gb with message "Filesize limit exceeded"


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.I'm testing with the following code (big.f):
        implicit none
c
c

c size of array (x8 for bytes, so 50M -> 400Mb)
      integer fsiz
      parameter (fsiz = 5000000)

        integer i
        real*8 bigarr(fsiz)
        common /big/ bigarr

        do 10 i=1,fsiz
          bigarr(i)=dble(i)/2.d0
 10     continue
        open(15,file='bigflile',status='unknown',form='unformatted')
        do 20  i=1,100
         write(*,*) "iter ",i
         write(15) bigarr
 20     continue        
        close(15)
        end

compiled with 
g77 -c -O3 -fno-underscoring -malign-double -Wuninitialized -funroll-all-loops -finline-functions -
D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 big.f

2.
3.
	

Actual Results:  When the a.out is run, a file is created at exactly 2gb:
> 
> >-rw-rw-r--    1 jwp      gipsy    2147483647 Aug  9 10:13 bigflile
> 
> and then stops with the message
> 
> >Filesize limit exceeded



Expected Results:  Want bigger file with no errors.

Additional info:

"limit" says I have plenty of room:
wilbur.jpl.nasa.gov{jwp}74: limit
cputime         0:0-1
filesize        4194303 kbytes
datasize        4194303 kbytes
stacksize       8192 kbytes
coredumpsize    0 kbytes
memoryuse       4194303 kbytes
descriptors     1024 
memorylocked    4194303 kbytes
maxproc         32766 
openfiles       1024
Comment 1 Jakub Jelinek 2001-09-07 09:38:40 EDT
libf3c in gcc up to 3.0.x (inclusive) don't support LFS.
LFS changes are currently in CVS trunk libf2c (3.1), I'll backport them
to gcc 3.0.x eventually.
Comment 2 Jakub Jelinek 2002-01-17 10:51:54 EST
Should work in gcc-3.1-XX from rawhide.

Note You need to log in before you can comment on or make changes to this bug.