[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Build error

On Thu, Aug 02, 2007 at 04:02:38PM -0400, Matthew D Truch wrote:
> I recently rebuilt kst in devel for the license tag change.  There were
> no other spec file or source file changes, and kst was last rebuilt in
> devel 10 days ago (with no issues).  However, now the build fails.  I
> don't quite know what's going on here.  Any ideas?

You start by reading the line the error was reported on:

      R->fp = open(datafilename, O_RDWR | O_CREAT);

the bug is obvious - open with O_CREAT among flags must be given
3 arguments.
glibc recently added for -D_FORTIFY_SOURCE=2 error checking
open/open64/openat/openat64 macros that verify proper use, since
many people make mistakes with it.

> getdata.c: In function 'DoIfRawOut':
> getdata.c:2207: error: size of array '__open_missing_mode' is negative
> make[5]: *** [getdata.lo] Error 1

Alternatively you could have searched the headers for

         /* If the compiler complains about the size of this array type the   \
            mode parameter is missing since O_CREAT has been used.  */        \
         typedef int __open_missing_mode[((flags) & O_CREAT) != 0             \
                                         ? ((long int) sizeof (___arr)        \
                                            - (long int) sizeof (int)) : 1];  \

and the comment says it all (similarly for other errors the new
open macro can report, such as more than 3 arguments or invalid type
of the last argument).


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]