LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-15-2009, 12:42 PM   #1
vpandura
LQ Newbie
 
Registered: Oct 2009
Posts: 4

Rep: Reputation: 0
Linux x86 32/64: issue with file > 2gb


Hi,

In our product, we have a limitation that tmp file(file created in /tmp folder for dumping data retrieved from db) cannot be written more than 2gb size. So in order to increase it to write till 4gb, we changed mainly in our code from fseek to fseek064. When we tried to execute this code compiled with ICC v9.1.0.46, it worked fine. But when we used 7.1.032, it fails exactly when temp file reaches 2g size. The error returned from fseeko64 is "2" which seems to be "No such file or directory". This doesn't seem to make any sense. Also we are not sure whether compiler version has any role here to play.

I have added 2 required compile time flags -D_LARGEFILE64_SOURCE=1 & -D_LARGEFILE_SOURCE=1 for compiling with ICC compiler. The same code works fine with Solaris but not on Linux x86 32bit/64bit.

I use Red Hat Linux x86 32bit/64bit.
Can anyone suggest what could be wrong here? Is there any other way to get rid of this situation? Any pointers please?

Thanks in Advance,
-vinod.
 
Old 10-15-2009, 01:05 PM   #2
clvic
Member
 
Registered: Feb 2008
Location: Rome, Italy
Distribution: OpenSuSE 11.x, vectorlinux, slax, Sabayon
Posts: 206
Blog Entries: 2

Rep: Reputation: 45
The most important thing in my opinion is to know the filesystem... which is the filesystem of your /tmp?
 
Old 10-15-2009, 01:33 PM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 404Reputation: 404Reputation: 404Reputation: 404Reputation: 404
Anything with glibc >= 2.2, a recent enough kernel (even if it's a 2.4 one) and a sane linux fs should support this without problems, as far as I know.

However I have no experience with the icc compiler, only with gcc.
 
Old 10-15-2009, 01:47 PM   #4
vpandura
LQ Newbie
 
Registered: Oct 2009
Posts: 4

Original Poster
Rep: Reputation: 0
it is ext3.
 
Old 10-15-2009, 08:03 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,860

Rep: Reputation: 2596Reputation: 2596Reputation: 2596Reputation: 2596Reputation: 2596Reputation: 2596Reputation: 2596Reputation: 2596Reputation: 2596Reputation: 2596Reputation: 2596
Quote:
When we tried to execute this code compiled with ICC v9.1.0.46, it worked fine
so what's the problem; why switch back to v7.x?
 
Old 10-15-2009, 11:07 PM   #6
vpandura
LQ Newbie
 
Registered: Oct 2009
Posts: 4

Original Poster
Rep: Reputation: 0
we support 2 code-lines. one of them uses 9.x and other 7.x. It works fine with 9.x but fails with 7.x. But we couldn't see any problem with using above 2 flavours of compiler so far. Thanks.
 
Old 10-16-2009, 01:04 AM   #7
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by vpandura View Post
we support 2 code-lines. one of them uses 9.x and other 7.x. It works fine with 9.x but fails with 7.x. But we couldn't see any problem with using above 2 flavours of compiler so far. Thanks.
You could try to run your program under strace.
It may give you some insight what actual system calls (and what's their parameters) are used
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux x86 32/64: issue with file > 2gb vpandura Programming 5 10-16-2009 07:18 PM
RHEL5.1: Issue on creating OR loading file > 2GB using C/C++ tcnew1 Linux - Enterprise 0 08-03-2008 10:31 AM
Upload >2GB file from windows to Linux Samba server DuckChang64 Linux - Server 3 03-23-2008 12:02 AM
ReiserFS 2Gb maximum file size limit? Cannot copy files bigger than 2Gb ihtus SUSE / openSUSE 2 10-26-2007 09:21 AM
How to parse 2GB file w linux commands agtlewis Linux - General 5 10-11-2005 08:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration