Bug 15463 - GDB fails to build
Summary: GDB fails to build
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: python (show other bugs)
Version: unknown
: P2 critical
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-13 06:33 UTC by hmb
Modified: 2013-08-29 12:50 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hmb 2013-05-13 06:33:16 UTC
while I was building the latest gdb Read-write CVS checkout version 
my build failed.
These were my building steps.

1)  objdir$ ./../src/configure --prefix=/home/mbilal/commit-gdb-cvs/installdir
2)  objdir$ make

but after the make I got errors  (following is the log)



 -MF .deps/py-framefilter.Tpo -fno-strict-aliasing -DNDEBUG -fwrapv .././../src/gdb/python/py-framefilter.c
In file included from .././../src/gdb/python/py-framefilter.c:24:0:
.././../src/gdb/python/py-framefilter.c: In function ‘enumerate_locals’:
.././../src/gdb/exceptions.h:152:31: error: ‘buf’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
        EXCEPTIONS_SIGJMP_BUF *buf = \
                               ^
.././../src/gdb/exceptions.h:152:31: note: ‘buf’ was declared here
        EXCEPTIONS_SIGJMP_BUF *buf = \
                               ^
.././../src/gdb/python/py-framefilter.c:839:7: note: in expansion of macro ‘TRY_CATCH’
       TRY_CATCH (except, RETURN_MASK_ALL)
       ^
.././../src/gdb/exceptions.h:152:31: error: ‘buf’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
        EXCEPTIONS_SIGJMP_BUF *buf = \
                               ^
.././../src/gdb/exceptions.h:152:31: note: ‘buf’ was declared here
        EXCEPTIONS_SIGJMP_BUF *buf = \
                               ^
.././../src/gdb/python/py-framefilter.c:782:7: note: in expansion of macro ‘TRY_CATCH’
       TRY_CATCH (except, RETURN_MASK_ALL)
       ^
.././../src/gdb/exceptions.h:152:31: error: ‘buf’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
        EXCEPTIONS_SIGJMP_BUF *buf = \
                               ^
.././../src/gdb/exceptions.h:152:31: note: ‘buf’ was declared here
        EXCEPTIONS_SIGJMP_BUF *buf = \
                               ^
.././../src/gdb/python/py-framefilter.c:762:4: note: in expansion of macro ‘TRY_CATCH’
    TRY_CATCH (except, RETURN_MASK_ALL)
    ^
.././../src/gdb/python/py-framefilter.c:732:23: error: ‘locals_cleanups’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
       struct cleanup *locals_cleanups;
                       ^
.././../src/gdb/python/py-framefilter.c:731:11: error: ‘local_indent’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
       int local_indent = 8 + (8 * indent);
           ^
cc1: all warnings being treated as errors
make[2]: *** [py-framefilter.o] Error 1
make[2]: Leaving directory `/home/mbilal/commit-gdb-cvs/objdir/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/home/mbilal/commit-gdb-cvs/objdir'
make: *** [all] Error 2
Comment 1 teawater 2013-05-13 07:33:15 UTC
Cannot reproduce in my part.
ubuntu 12.04
../src/configure --disable-sid --disable-rda --disable-gdbtk --disable-tk --disable-itcl --disable-tcl --disable-libgui --enable-targets=x86_64-linux,arm-linux,mips-linux --enable-64-bit-bfd --with-sysroot=/
Comment 2 Phil Muldoon 2013-05-13 09:01:04 UTC
We discussed this a little on IRC.

hmb is going to try with a newer experimental GCC build than he has now which is:

$ gcc --version
gcc (GCC) 4.9.0 20130507 (experimental)

I cannot reproduce on Fedora 18, and Jan also cannot with a GCC build from yesterday (though I think Jan built without Python).

But something looks really bogus with errors like:

.././../src/gdb/python/py-framefilter.c:731:11: error: ‘local_indent’ may be
used uninitialized in this function [-Werror=maybe-uninitialized]
       int local_indent = 8 + (8 * indent);

I am not sure how that ever can be uninitialized.
Comment 3 hmb 2013-05-13 13:30:24 UTC
I got the same error with 
gcc --version
gcc (GCC) 4.9.0 20130513 (experimental)

with building step 

$CC="/home/mbilal/gcc-svn/install/bin/gcc" ./../src/configure --prefix=/home/mbilal/commit-gdb-cvs/install

$make
Comment 4 Pedro Alves 2013-05-15 09:00:11 UTC
All these warnings are around setjmp/long.

E.g, with:

.././../src/gdb/python/py-framefilter.c:731:11: error: ‘local_indent’ may be
used uninitialized in this function [-Werror=maybe-uninitialized]
       int local_indent = 8 + (8 * indent);

local_indent is only used in a TRY_CATCH block, meaning, after a setjmp.

I strongly suspect this to be related to this recent setjmp gcc change:

 http://gcc.gnu.org/ml/gcc-patches/2013-05/msg00344.html

Please file a gcc bug, and post the link here.
Comment 5 Pedro Alves 2013-05-15 09:04:13 UTC
BTW,

> 2)  objdir$ make

I suspect that the build just stopped for you on the first error of this sort, but that could be many more.  Try "make -k".
Comment 6 hmb 2013-05-15 12:13:19 UTC
I file a bug on gcc bugzilla
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57287