Build problem on FC5

Gang,

I encountered a Radiance build problem on my upgraded FC5 install. With only my optimizations added to the default options, every compilation returned something like:

gcc -I../common -L../lib -O2 -march=athlon-xp -ffast-math -mno-ieee-fp -Dlinux -D_FILE_OFFSET_BITS=64 -Dfseeko=fseek -L/usr/X11R6/lib -I/usr/include/X11 -DNOSTEREO -c -o nff2rad.o nff2rad.c
In file included from nff2rad.c:70:
/usr/include/stdio.h:688: error: conflicting types for fseek
/usr/include/stdio.h:656: error: previous declaration of fseek was here
make: *** [nff2rad.o] Error 1

So I removed "-Dfseeko=fseek" from the build command and everything progressed nicely. This is with gcc (GCC) 4.1.1 20060525 and Linux zeus.localdomain 2.6.16-1.2133_FC5 #1 Tue Jun 6 00:52:14 EDT 2006 i686 athlon i386 GNU/Linux.

My older machine, with Fedora Core 1 and gcc (GCC) 3.3.2 20031022 did not encounter that problem. Radiance built beautifully on the first try.

Now, the only "bad" stuff that I get is the usual

pfilt.c:(.text+0x144f): warning: the use of `mktemp' is dangerous, better use `mkstemp'

which doesn't affect compilation or execution.

Mark

Thanks, Mark. Jack de Valpine also spotted this problem, and the updated version of makeall takes away the -Dfseeko=fseek compile line. Apparently, this bug has been fixed in most versions of Linux.

-Greg

···

From: Mark Stock <[email protected]>
Date: November 10, 2006 1:59:54 PM MST

Gang,

I encountered a Radiance build problem on my upgraded FC5 install. With only my optimizations added to the default options, every compilation returned something like:

gcc -I../common -L../lib -O2 -march=athlon-xp -ffast-math -mno-ieee-fp -Dlinux -D_FILE_OFFSET_BITS=64 -Dfseeko=fseek -L/usr/X11R6/lib -I/usr/include/X11 -DNOSTEREO -c -o nff2rad.o nff2rad.c
In file included from nff2rad.c:70:
/usr/include/stdio.h:688: error: conflicting types for fseek
/usr/include/stdio.h:656: error: previous declaration of fseek was here
make: *** [nff2rad.o] Error 1

So I removed "-Dfseeko=fseek" from the build command and everything progressed nicely. This is with gcc (GCC) 4.1.1 20060525 and Linux zeus.localdomain 2.6.16-1.2133_FC5 #1 Tue Jun 6 00:52:14 EDT 2006 i686 athlon i386 GNU/Linux.

My older machine, with Fedora Core 1 and gcc (GCC) 3.3.2 20031022 did not encounter that problem. Radiance built beautifully on the first try.

Now, the only "bad" stuff that I get is the usual

pfilt.c:(.text+0x144f): warning: the use of `mktemp' is dangerous, better use `mkstemp'

which doesn't affect compilation or execution.

Mark

Hi Mark,

I had the same problem with this on my FC5. I communicated with Greg about it. The issue is that there is/was a problem using fseeko under linux/gcc on large files (>2Gb) relevant to the use of rtcontrib. Thus the compile switches -D_FILE_OFFSET_BITS=64 -Dfseeko=fseek have been included for awhile to make things work correctly. However, it seems like there is some update to gcc/glibc as of 4.1.X, so now fseeko works correctly on systems with this gcc/glibc. I believe that you should still include -D_FILE_OFFSET_BITS=6 as this enables large files (via fseeko64, I believe).

Greg kindly provided a small program, fseekotest, to test fseeko. I believe that it is OK to pass it along and so it is attached. I have a few flavors and versions of linux running. Here are the results from testing with fseekotest on a few different machines:

current fileserver (x86):

    fseekotest succeeds
    fseekotest -b succeeds
    linux kernel 2.6.17
    gcc 4.1.1
    glibc 2.4-11

old fileserver(x86):

    fseekotest succeeds
    fseekotest -b FAILS
    linux kernel 2.4.20
    gcc 3.2.2
    glibc 2.3.2

current render server (x86):

    fseekotest succeeds
    fseekotest -b FAILS
    inux kernel 2.6.17
    gcc 3.4.3
    glibc glibc 2.3.3

old render server (x86_64):

    fseekotest succeeds
    fseekotest -b succeeds
    linux kernel 2.6.8
    gcc 3.3.3
    glibc 2.3.3

Note "fseekotest -b" tests seeking on larger that 2Gb. Note also the x86_64 compile should work any way as this should be using fseeko64.

I believe that Greg has removed -Dfseeko=fseek, probably in the latest HEAD?

-Jack

Mark Stock wrote:

fseekotest.c (1.32 KB)

···

Gang,

I encountered a Radiance build problem on my upgraded FC5 install. With only my optimizations added to the default options, every compilation returned something like:

gcc -I../common -L../lib -O2 -march=athlon-xp -ffast-math -mno-ieee-fp -Dlinux -D_FILE_OFFSET_BITS=64 -Dfseeko=fseek -L/usr/X11R6/lib -I/usr/include/X11 -DNOSTEREO -c -o nff2rad.o nff2rad.c
In file included from nff2rad.c:70:
/usr/include/stdio.h:688: error: conflicting types for fseek
/usr/include/stdio.h:656: error: previous declaration of fseek was here
make: *** [nff2rad.o] Error 1

So I removed "-Dfseeko=fseek" from the build command and everything progressed nicely. This is with gcc (GCC) 4.1.1 20060525 and Linux zeus.localdomain 2.6.16-1.2133_FC5 #1 Tue Jun 6 00:52:14 EDT 2006 i686 athlon i386 GNU/Linux.

My older machine, with Fedora Core 1 and gcc (GCC) 3.3.2 20031022 did not encounter that problem. Radiance built beautifully on the first try.

Now, the only "bad" stuff that I get is the usual

pfilt.c:(.text+0x144f): warning: the use of `mktemp' is dangerous, better use `mkstemp'

which doesn't affect compilation or execution.

Mark

_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev

--
# Jack de Valpine
# president
#
# visarc incorporated
# http://www.visarc.com
#
# channeling technology for superior design and construction