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

Submitted by:  Martin Dorey <mdorey>
Submitted on:  Tue 25 Jan 2011 09:20:18 PM UTC  
 
Severity: 3 - NormalItem Group: Build/Install
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 4.0Operating System: POSIX-Based
Fixed Release: 4.0Triage Status: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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 File(s):
   
   
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
  • -unavailable- added by psmith (Posted a comment)
  • -unavailable- added by mdorey (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 10 Sep 2012 03:07:21 AM UTCpsmithStatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.0
    Tue 25 Jan 2011 09:20:18 PM UTCmdoreyAttached File-=>Added bsd_signal.patch, #22512

    Back to the top


    Powered by Savane 3.1-cleanup1