bugmake - Bugs: bug #32247, ../make/main.c:534: error: static...

 
 

bug #32247: ../make/main.c:534: error: static declaration of ‘bsd_signal’ follows non-static declaration

Submitter:  Martin Dorey <mdorey>
Submitted:  Tue 25 Jan 2011 09:20:18 PM UTC
   
 
Severity:  3 - Normal Item Group:  Build/Install
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.0 Operating System:  POSIX-Based
Fixed Release:  4.0 Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 10 Sep 2012 03:07:21 AM UTC, comment #1: 

I applied a fix.  It works for me, but my distribution/gcc/glibc is much newer than that.  Please verify it on your system.

Paul D. Smith <psmith>
Group administrator
Tue 25 Jan 2011 09:20:18 PM UTC, original submission:  

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

martind@whitewater:~/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 GNU/Linux
martind@whitewater:~/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' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --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)
martind@whitewater:~/download/make-cvs/whitewater2$

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 false
../make/main.c:2209: warning: comparison of unsigned expression < 0 is always false
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.

Martin Dorey <mdorey>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #22512:  bsd_signal.patch added by mdorey (636B - application/octet-stream - a configure.in patch which defines _GNU_SOURCE before the bsd_signal test)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by mdorey (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-09-10 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.0
    2011-01-25 mdorey Attached File- Added bsd_signal.patch, #22512

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code