[Top][All Lists]

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

[bug #32247] ../make/main.c:534: error: static declaration of ‘bsd_signa

From: Martin Dorey
Subject: [bug #32247] ../make/main.c:534: error: static declaration of ‘bsd_signal’ follows non-static declaration
Date: Tue, 25 Jan 2011 21:20:19 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100625 Firefox/3.6.6


                 Summary: ../make/main.c:534: error: static declaration of
‘bsd_signal’ follows non-static declaration
                 Project: make
            Submitted by: mdorey
            Submitted on: Tue 25 Jan 2011 09:20:18 PM GMT
                Severity: 3 - Normal
              Item Group: Build/Install
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
       Component Version: CVS
        Operating System: POSIX-Based
           Fixed Release: None
           Triage Status: None



On my run-of-the-mill Debian Lenny system:

address@hidden:~/download/make-cvs/whitewater2$ uname -a
Linux whitewater 2.6.26-2-amd64 #1 SMP Thu Nov 25 04:30:55 UTC 2010 x86_64
address@hidden:~/download/make-cvs/whitewater2$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1'
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr
--enable-cld --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1) 

The build from clean, from CVS, fails at:

../make/main.c:534: error: static declaration of ‘bsd_signal’ follows
non-static declaration
/usr/include/signal.h:109: error: previous declaration of ‘bsd_signal’
was here
../make/main.c: In function ‘main’:
../make/main.c:1872: warning: comparison of unsigned expression < 0 is always
../make/main.c:2209: warning: comparison of unsigned expression < 0 is always
make[2]: *** [main.o] Error 1

The conftest results in:

configure:8605: checking whether bsd_signal is declared
configure:8635: gcc -c -g -O2  conftest.c >&5
conftest.c: In function 'main':
conftest.c:76: error: 'bsd_signal' undeclared (first use in this function)
conftest.c:76: error: (Each undeclared identifier is reported only once
conftest.c:76: error: for each function it appears in.)

config.log says the program being compiled is:

| /* end confdefs.h.  */
| #include <signal.h>
| int
| main ()
| {
| #ifndef bsd_signal
|   (void) bsd_signal;
| #endif
|   ;
|   return 0;
| }

If, however, I try to compile that program, or something very similar, with
an extra macro:

#define _GNU_SOURCE 1
#include <signal.h>

int main() {
    (void) bsd_signal;

Then it succeeds.  make.h defines this macro before including signal.h:

/* Specify we want GNU source code.  This must be defined before any
   system headers are included.  */

#define _GNU_SOURCE 1
#include <signal.h>

Searching for bsd_signal here, I see this changed not too long ago, under:

bug #25713: Please note CPPFLAGS required to build on Tru64

After Google pointed me to
http://www.airs.com/ian/configure/configure_2.html, specifically the mention
of how to define _GNU_SOURCE in autoconf, I tried the attached patch, which
seemed to work for me.  I have no idea what I'm doing with autoconf.  Perhaps
the macro should be defined earlier in configure.in.


File Attachments:

Date: Tue 25 Jan 2011 09:20:18 PM GMT  Name: bsd_signal.patch  Size: 636B  
By: mdorey
a configure.in patch which defines _GNU_SOURCE before the bsd_signal test


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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