Summary: 32bit 'tree' doesn't show files 2GB and larger
Product: openSUSE 11.2
OS/Version: openSUSE 11.2
Priority: P5 - None
Found By: ---
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:126.96.36.199)
Gecko/20100317 SUSE/3.5.9-0.1.1 Firefox/3.5.9
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
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'
In tree.spec the 'make' command is:
-which overrides the CFLAGS set in the Makefile:
CFLAGS=-O2 -Wall -fomit-frame-pointer -DLINUX -D_LARGEFILE64_SOURCE
-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
If I change the spec file so that;
-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
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(a)opensuse.org list that the bug is present
on 11.0, so it seems to be an 'old' problem...
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
output from 32bit system:
jon@nx8220:~> ll tmp/largefiles/
-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/
0 directories, 1 file
output from 64bit system:
jon@cnu8092slm:~> ll tmp/largefiles/
-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/
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.