http://bugzilla.novell.com/show_bug.cgi?id=601779 http://bugzilla.novell.com/show_bug.cgi?id=601779#c0 Summary: 32bit 'tree' doesn't show files 2GB and larger Classification: openSUSE Product: openSUSE 11.2 Version: Final Platform: x86 OS/Version: openSUSE 11.2 Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: jc@ymmv.dk QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100317 SUSE/3.5.9-0.1.1 Firefox/3.5.9 Hi On 32bit systems the 'tree' command dosn't show 'large' files. I have tested on a 64bit system as well, and the problem is only present on 32bit systems. I have done a fair amount of research, comparing compile-time arguments with those of 32bit Debian packages. In the end I think it comes down to the 'spec' file: In tree.spec the 'make' command is: %build make CFLAGS="$RPM_OPT_FLAGS" -which overrides the CFLAGS set in the Makefile: CFLAGS=-O2 -Wall -fomit-frame-pointer -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -which results in the binary being built with these flags instead: RPM_OPT_FLAGS="-O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" Now; If I change the spec file so that; %build make -then the compiler gets the flags as set in the Makefile, and the resulting binary works with files larger than 2G. I'm guessing that it's desirable to get $RPM_OPT_FLAGS passed to the compiler, but I'm unsure as to how one would 'merge' this variable with $CFLAGS from the Makefile? As for the severity of the bug: It doesn't break the system, but the functionality of the command is seriously hampered by this. It seems reasonable (to me) that it's a packaging bug, and therefore it should be easily fixed. I have confirmation from the opensuse@opensuse.org list that the bug is present on 11.0, so it seems to be an 'old' problem... Kind Regards, Jon Clausen Reproducible: Always Steps to Reproduce: 1. get or create a file larger than 2GB I used 'dd' to create two files - one 2GB, one 1KB smaller: dd if=/dev/zero of=2G bs=1k count=2097152 dd if=/dev/zero of=2G-1k bs=1k count=2097151 2. use 'tree /path/to/large/file' 3. observe output Actual Results: output from 32bit system: jon@nx8220:~> ll tmp/largefiles/ total 4194304 -rw-r--r-- 1 jon users 2147483648 2010-04-30 12:50 2G -rw-r--r-- 1 jon users 2147482624 2010-04-30 12:52 2G-1k jon@nx8220:~> tree tmp/largefiles/ tmp/largefiles/ `-- 2G-1k 0 directories, 1 file Expected Results: output from 64bit system: jon@cnu8092slm:~> ll tmp/largefiles/ total 4194304 -rw-r--r-- 1 jon users 2147483648 2010-04-30 12:58 2G -rw-r--r-- 1 jon users 2147482624 2010-04-30 12:58 2G-1k jon@cnu8092slm:~> tree tmp/largefiles/ tmp/largefiles/ |-- 2G `-- 2G-1k 0 directories, 2 files AFAICT the flag that makes the difference is -D_FILE_OFFSET_BITS=64 - which makes the binary use *stat64() rather than *stat() when files are 'large'. On 64bit systems I suppose everything uses *stat64() anyways, which is why the problem only surfaces on 32bit systems... ? -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.