bug-glpk
[Top][All Lists]
Advanced

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

Re: [Bug-glpk] compiling glpk with -D_GNU_SOURCE


From: Andrew Makhorin
Subject: Re: [Bug-glpk] compiling glpk with -D_GNU_SOURCE
Date: Tue, 9 Oct 2001 04:53:04 +0300

>this is what I get:
>
>gcc -c -O2 -pipe -D_GNU_SOURCE -D__USE_STRING_INLINES -fstrength-reduce
>  -march=pentiumpro -O2 -pipe -fstrength-reduce -march=pentiumpro
>  -I include glplp/prepro_lp.c -o glplp/prepro_lp.o
>glplp/prepro_lp.c:72: `fmin' redeclared as different kind of symbol
>/usr/include/bits/mathcalls.h:319: previous declaration of `fmin'
>glplp/prepro_lp.c:72: warning: `fmin' was declared `extern' and later `static'
>glplp/prepro_lp.c:76: `fmax' redeclared as different kind of symbol
>/usr/include/bits/mathcalls.h:316: previous declaration of `fmax'
>glplp/prepro_lp.c:76: warning: `fmax' was declared `extern' and later `static'
>make: *** [glplp/prepro_lp.o] Error 1
>
>I have glibc-2.2.4. glpk compiles OK if I don't define _GNU_SOURCE.
>
>C99 definition of function fmax:
>"The fmax functions return the maximum numeric value of their arguments."

Thank you for your bug report! This is really a bug, because local
static variables 'fmin' and 'fmax' are declared in the file scope and
therefore they contradict with the standard functions 'fmin' and 'fmax'
declared in the header 'math.h'.

In order to fix the bug you can remove the line

    glplp/prepro_lp.o

(and the trailing backslash on the preceding line) from the file
'makefile.in' and then re-configure the package. This just disables
compiling the file 'prepro_lp.c', which currently is not used by other
routines.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]