[GRASS-dev] configuration X fails with strict gcc flags
Markus Neteler
neteler at itc.it
Thu Jul 12 02:03:43 EDT 2007
Glynn Clements wrote:
>
>
> Markus Neteler wrote:
>
>> I have a new laptop with Mandriva 2007.1 (so x.org). X is not
>> recognised although all header files are apparently there.
>> I debugged a bit and found the following (conftest.c and confdefs.h
>> manually extracted from configure):
>>
>> cat conftest.c
>> #line 4672 "configure"
>> #include "confdefs.h"
>> #include <X11/Intrinsic.h>
>>
>> int main() {
>> XtMalloc()
>> ; return 0; }
>
>> gcc -o conftest -g -Wall -Werror-implicit-function-declaration
>> -fno-common -mtune=nocona -m64 -minline-all-stringops
>> -Wl,--export-dynamic -L/usr/lib64 conftest.c -lXt
>> configure: In function 'main':
>> configure:4676: error: too few arguments to function 'XtMalloc'
>
> Odd; my config.log has:
>
> configure:4675: warning: implicit declaration of function `XtMalloc'
>
Mine, too. Sorry, had added a ine of debug output and forgot to mention.
configure:4510: checking for W11
configure:4538: checking for X
configure:4603: gcc -E conftest.c >/dev/null 2>conftest.out
configure:4679: gcc -o conftest -g -Wall
-Werror-implicit-function-declaration -fno-common -mtune=nocona -m64
-minline-all-stringops -Wl,--export-dynamic -L/usr/lib64 conftest.c -lXt
1>&5
configure: In function 'main':
configure:4675: error: implicit declaration of function 'XtMalloc'
configure: failed program was:
#line 4672 "configure"
#include "confdefs.h"
int main() {
XtMalloc()
; return 0; }
configure:5346: checking whether to use Curses
> which implies that it isn't picking up the header. In fact, the
> relevant portion of the configure script is:
>
> cat > conftest.$ac_ext <<EOF
> #line 4672 "configure"
> #include "confdefs.h"
>
> int main() {
> ${x_direct_test_function}()
> ; return 0; }
> EOF
>
> which doesn't include any X headers.
>
> Have you re-built your configure script using a different version of
> autoconf?
>
Probably I added it in the debug output since I assumed that it was
there. So, after reset to CVS version, it turns out to be this problem:
configure:4675: error: implicit declaration of function 'XtMalloc'
probably still caused by the -Werror-implicit-function-declaration
flag. Maybe the gcc behaviour changed? It is
Target: x86_64-mandriva-linux-gnu
gcc version 4.1.2 20070302 (prerelease) (4.1.2-1mdv2007.1)
On my office box (RHEL4, 64bit), it works with identical flags, but it is:
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
gcc version 3.4.6 20060404 (Red Hat 3.4.6-8)
I wonder why only this test fails.
Markus
--
View this message in context: http://www.nabble.com/configuration-X-fails-with-strict-gcc-flags-tf4062146.html#a11554206
Sent from the Grass - Dev mailing list archive at Nabble.com.
More information about the grass-dev
mailing list