hi,
On Thu, Oct 25, 2001 at 05:34:55PM -0400, Jonathan Dill wrote:
> Steve Lord wrote:
> You know, I seem to remember this from a long time back, tcsh is not
> > built as an LSF aware binary, you need O_LARGEFILE on open now to be
> > allowed to access beyond the 2Tbyte limit. I did at one point get
> > a tcsh source rpm, add the correct glibc -D option and rebuild, it
> > all started working at this point.
>
> OK so exactly what flags do I need to compile it correctly? I presume
> that I can make the changes to the spec file or Makefile and it should
> work. I want to check the src.rpm from RH 7.2 and see if that one is
> corrected.
Use these: "-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64". It is the 2nd
part that gives you O_LARGEFILE on open, but GNU_SOURCE is a handy
catch-all for several other useful things. Refer to the comment
near the top of /usr/include/features.h which describes each flag.
Here's a quick-fire way to test this...
# strace /usr/bin/tcsh -c 'echo > /tmp/blop' |& grep 'open("/tmp/blop"'
open("/tmp/blop", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
And compiled with the above flags...
# strace ./tcsh -c 'echo > /tmp/blop' |& grep 'open("/tmp/blop"'
open("/tmp/blop", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 3
Below is a patch for any Debian tcsh users out there - I'll submit
a bug in a minute.
cheers.
--
Nathan
--- tcsh-6.10/debian/rules Fri Oct 26 10:04:12 2001
+++ tcsh-6.10-ns/debian/rules Fri Oct 26 09:59:18 2001
@@ -13,7 +13,7 @@
# C compiler information
CC = gcc
-CFLAGS = -g -Wall -O2 -fomit-frame-pointer
+CFLAGS = -g -Wall -O2 -fomit-frame-pointer -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64
LDFLAGS = -s
#export DH_VERBOSE=1
|