This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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]

[Bug gdb/10587] New: gdb fails to build on OS X / MAC / darwin 10.5.8 with warnings about formats not being a string literal


gdb fails to build on OS X with the warnings indicated below. Ignoring the warnings allows the build to 
complete but then gdb throws an internal error when trying to run a debug session (see output further 
down).

Using gdb-weekly-CVS-6.8.50.20090825.tar.bz2 the build fails with the error shown below. 

gcc -g -O2   -I. -I. -I./common -I./config -DLOCALEDIR="\"/usr/local/share/locale\"" -
DHAVE_CONFIG_H -I./../include/opcode -I./../readline/.. -I../bfd -I./../bfd -I./../include -
I../libdecnumber -I./../libdecnumber -I./../intl -I./gnulib -Ignulib  -DMI_OUT=1 -DTUI=1   -Wall -
Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused 
-Wno-switch -Wno-char-subscripts -Werror -c -o i386-tdep.o -MT i386-tdep.o -MMD -MP -MF 
.deps/i386-tdep.Tpo i386-tdep.c
cc1: warnings being treated as errors
In file included from inferior.h:36,
                 from i386-tdep.c:32:
breakpoint.h: In function ?VEC_bp_location_p_last?:
breakpoint.h:363: warning: format not a string literal, argument types not checked
breakpoint.h: In function ?VEC_bp_location_p_index?:
breakpoint.h:363: warning: format not a string literal, argument types not checked
breakpoint.h: In function ?VEC_bp_location_p_space?:
breakpoint.h:363: warning: format not a string literal, argument types not checked
breakpoint.h: In function ?VEC_bp_location_p_quick_push?:
breakpoint.h:363: warning: format not a string literal, argument types not checked
breakpoint.h: In function ?VEC_bp_location_p_pop?:

...



Configuring with the --disable-werror and/or the --disable-nls options allows the build to finish. 
However, gdb fails with an internal error after issuing "run" like this ...

GNU gdb (GDB) 6.8.50.20090824-cvs
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-apple-darwin9.8.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...

warning: `/var/folders/U8/U8T+o-pPFP8JWiY3r2cHD+0bkB+/-Tmp-//ccY04sm9.o': can't open to 
read symbols: No such file or directory.
(gdb) run
`fmain.o' has disappeared; keeping its symbols.
Starting program: /Users/dg6/Desktop/gdb/installed/a.out 
objfiles.c:799: internal-error: qsort_cmp: Assertion `sect1_addr >= obj_section_endaddr (sect2)' 
failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n)


Configure output looks like this


dg6@greendl~/Desktop/gdb/src
: ./configure 
checking build system type... i386-apple-darwin9.8.0
checking host system type... i386-apple-darwin9.8.0
checking target system type... i386-apple-darwin9.8.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for version 0.10 of PPL... no
checking for correct version of CLooG... no
*** This configuration is not supported in the following subdirectories:
     sim
    (Any other directories should still work fine.)
rm: conftest.dSYM: is a directory
*** removing intl/Makefile to force reconfigure
*** removing libiberty/Makefile to force reconfigure
*** removing opcodes/Makefile to force reconfigure
*** removing bfd/Makefile to force reconfigure
*** removing readline/Makefile to force reconfigure
*** removing libdecnumber/Makefile to force reconfigure
*** removing gdb/Makefile to force reconfigure
*** removing etc/Makefile to force reconfigure
checking for bison... bison -y
checking for bison... bison
checking for gm4... gm4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... expect
checking for runtest... no
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... (cached) /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld
checking for lipo... lipo
checking for nm... nm
checking for ranlib... ranlib
checking for strip... strip
checking for windres... no
checking for windmc... no
checking for objcopy... no
checking for objdump... no
checking for cc... cc
checking for c++... c++
checking for gcc... gcc
checking for gcj... no
checking for gfortran... gfortran
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... ld
checking for lipo... lipo
checking for nm... nm
checking for objdump... no
checking for ranlib... ranlib
checking for strip... strip
checking for windres... no
checking for windmc... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... host tool
checking where to find the target c++... host tool
checking where to find the target c++ for libstdc++... host tool
checking where to find the target dlltool... host tool
checking where to find the target gcc... host tool
checking where to find the target gcj... host tool
checking where to find the target gfortran... host tool
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
configure: creating ./config.status
config.status: creating Makefile
dg6@greendl~/Desktop/gdb/src


and gcc version is


: gcc --v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5488~2/src/configure --disable-checking -enable-werror --
prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-
name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib 
--build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 
--target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5488)

-- 
           Summary: gdb fails to build on OS X / MAC / darwin 10.5.8 with
                    warnings about formats not being a string literal
           Product: gdb
           Version: 6.8
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: gdb
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: dlg0 at me dot com
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=10587

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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