This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: error: conflicting types for âstrsignalâ. .. et al, while installing in Ubuntu


El 02/12/11 19:36, Ian Lance Taylor escribiÃ:
Pablo Barrio<pbarrio@die.upm.es> writes:

In config.log:

-----------------

configure:8845: checking for strsignal
configure:8845: result: yes
...
configure:10068: checking whether strsignal is declared
configure:10100: result: yes
...
ac_cv_func_strsignal=yes
...
gcc_cv_have_decl_strsignal=yes

------------------

On 02/12/2011, at 16:09, Ian Lance Taylor wrote:

Pablo Barrio<pbarrio@die.upm.es> writes:

In file included from ../../gcc-v4.6.1/gcc/c-lang.c:24:0:
../../gcc-v4.6.1/gcc/system.h:462:20: error: conflicting types for âstrsignalâ
/usr/include/string.h:566:14: note: previous declaration of âstrsignalâ was here
Look in gcc/config.h.  I predict that HAVE_STRSIGNAL is not defined,
although your system does have strsignal.  Look in gcc/config.log and
try to find out why the test for strsignal failed.

(Please don't top-post. Thanks.)
Sorry about that.
Interesting. The lines from system.h are

#if !defined (HAVE_STRSIGNAL) \
     || (defined (HAVE_DECL_STRSIGNAL)&&  !HAVE_DECL_STRSIGNAL)
# ifndef strsignal
extern const char *strsignal (int);
# endif
#endif

You show above that HAVE_STRSIGNAL is defined.  Also setting
gcc_cv_have_decl_strsignal implies that HAVE_DECL_STRSIGNAL is defined
to 1.  In that case I have no idea why that declaration will be
compiled.  Clearly it is being compiled because you are getting an error
about it.

I guess I would suggest running the failing compile command with -E and
see if you can see what is happening.  If you are compiling gcc with
another version of gcc, then it may help to use -dD with -E to see where
HAVE_STRSIGNAL and HAVE_DECL_STRSIGNAL are being defined.

Ian
For some reason, the include files that were on the build directory, "gcc-build" for me, weren't included properly (funny, as the compilation command includes them with "-I."). The include files in the source directory, "gcc-4.6.2", were included. Funniest of all, compiling in superuser mode (sudo) got rid of all these error messages. But I think it should compile without being superuser, as both build and source folders are located in my home directory (not the case for the install directory, but that one is only used by "make install"). Is that a bug? Am I missing something?

Thanks ahead,
Pablo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]