failure to implement O_LARGEFILES
Tony Arnold
tony.arnold at manchester.ac.uk
Thu Jul 12 22:03:02 UTC 2012
The attached Makefile works on my system!
Regards,
Tony.
On 12/07/12 22:47, Kayven Riese wrote:
> I am trying to recompile a project in c using cairo graphics that I
> created a while back and I got a new version of an input file and I
> realized that I need to use large files for open(). I am running Ubunu
> Precise:
>
> kayve at kayve-Ubuntu11:~/
> Documents/microArray/Project/release$ uname -a
> Linux kayve-Ubuntu11 3.2.0-26-generic-pae #41-Ubuntu SMP Thu Jun 14
> 16:45:14 UTC 2012 i686 i686 i386 GNU/Linux
> kayve at kayve-Ubuntu11:~/Documents/microArray/Project/release$
>
> Source code and Makefile available from http://kayve.net/promog. I
> didn't make a ./configure script, sorry, but I haven't needed it on a
> number of different Linux distros.
>
> Although I have implemented everything necessar in the Makefile (to my
> knowledge) I am still getting this error:
>
> kayve at kayve-Ubuntu11:~/Documents/microArray/Project/release$ make promog
> gcc -g -O0 `-D_GNU_SOURCE` -c promog.c `pkg-config --cflags --libs cairo `
> /bin/sh: 1: -D_GNU_SOURCE: not found
> promog.c: In function ‘main’:
> promog.c:268:46: error: ‘O_LARGEFILE’ undeclared (first use in this
> function)
> promog.c:268:46: note: each undeclared identifier is reported only once
> for each function it appears in
> make: *** [promog.o] Error 1
> kayve at kayve-Ubuntu11:~/Documents/microArray/Project/release$
>
>
> Can someone please help me compile my work or perhaps make a suggestion
> where to go instead for help? Thank you in advance.
>
>
> --
> Sincerely,
>
> Kayven Riese
> *----------------------------------------------------------*
> Kayven Riese, MSCS,
> MS (Physiology and Biophysics)
> (415) 902 5513 <tel:%28415%29%20902%205513> cellular
> http://kayve.net
> Webmaster http://ChessYoga.org
> *----------------------------------------------------------*
>
>
>
>
>
--
Tony Arnold, Tel: +44 (0) 161 275 6093
Head of IT Security, Fax: +44 (0) 705 344 3082
University of Manchester, Mob: +44 (0) 773 330 0039
Manchester M13 9PL. Email: tony.arnold at manchester.ac.uk
-------------- next part --------------
DEBUG_FLAG = -g -O0
CAIRO_FLAG = `pkg-config --cflags --libs cairo`
LARGEFILE_FLAG = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
GNU_SOURCE_FLAG = -D_GNU_SOURCE
hello :
gcc -o hello ${CAIRO_FLAG} hello.c
parse_tiss : parse_tiss.o
gcc ${DEBUG_FLAG} -o parse_tiss -lrt parse_tiss.o
parse_tiss.o :
gcc ${DEBUG_FLAG} -c parse_tiss.c
promog : promog.o cellgram.o print_interval.o
gcc -o promog promog.o cellgram.o print_interval.o ${LARGEFILE_FLAG} ${CAIRO_FLAG} -lrt
promog.o :
gcc ${DEBUG_FLAG} ${GNU_SOURCE_FLAG} -c promog.c ${LAGEFILE_FLAG} ${CAIRO_FLAG}
cellgram.o :
gcc ${DEBUG_FLAG} -c cellgram.c ${CAIRO_FLAG}
stub : stub.o cellgram.o
gcc ${CAIRO_FLAG} -o stub -lrt stub.o cellgram.o
stub.o :
gcc ${DEBUG_FLAG} ${CAIRO_FLAG} -c stub.c
dirty_demog : dirty_demog.o print_interval.o
gcc ${DEBUG_FLAG} -o dirty_demog -lrt print_interval.o dirty_demog.o
dirty_demog.o :
gcc ${DEBUG_FLAG} -c dirty_demog.c
simple_read : simple_read.o print_interval.o
gcc ${DEBUG_FLAG} print_interval.o -o simple_read -lrt simple_read.o
simple_scanf : simple_scanf.o print_interval.o
gcc ${DEBUG_FLAG} print_interval.o -o simple_scanf -lrt simple_scanf.o
simple_gets : simple_gets.o print_interval.o
gcc ${DEBUG_FLAG} print_interval.o -o simple_gets -lrt simple_gets.o
demog_gets: demog_gets.o print_interval.o
gcc ${DEBUG_FLAG} print_interval.o -o demog_gets -lrt demog_gets.o
demog_script_friendly: demog_script_friendly.o print_interval.o
gcc ${DEBUG_FLAG} print_interval.o -o demog_script_friendly -lrt demog_script_friendly.o
demog_strcmp: demog_strcmp.o print_interval.o
gcc ${DEBUG_FLAG} print_interval.o -o demog_strcmp -lrt demog_strcmp.o
demog_gets_sf: demog_gets_sf.o print_interval.o
gcc ${DEBUG_FLAG} print_interval.o -o demog_gets_sf -lrt demog_gets_sf.o
simple_read.o :
gcc ${DEBUG_FLAG} -c simple_read.c
simple_scanf.o :
gcc ${DEBUG_FLAG} -c simple_scanf.c
demog_gets.o :
gcc ${DEBUG_FLAG} -c demog_gets.c
simple_gets.o :
gcc ${DEBUG_FLAG} -c simple_gets.c
print_interval.o :
gcc ${DEBUG_FLAG} -c print_interval.c
demog_script_friendly.o :
gcc ${DEBUG_FLAG} -c demog_script_friendly.c
demog_gets_sf.o :
gcc ${DEBUG_FLAG} -c demog_gets_sf.c
clean :
rm ./*.o
More information about the ubuntu-users
mailing list