PDA

View Full Version : [ubuntu] erros while installing GDB



joker@
December 12th, 2008, 10:34 PM
HI
I trying install GDB on my U 8.10
this is what i get after send command 'make" its polish language but is simple what is where,any sugiestion??
regards

make[2]: Nie ma nic do zrobienia w `all'.
make[2]: Opuszczenie katalogu `/home/rav/Pulpit/gdb-6.8/libdecnumber'
make[2]: Wejście do katalogu `/home/rav/Pulpit/gdb-6.8/readline'
make[2]: Nie ma nic do zrobienia w `all'.
make[2]: Opuszczenie katalogu `/home/rav/Pulpit/gdb-6.8/readline'
make[2]: Wejście do katalogu `/home/rav/Pulpit/gdb-6.8/sim'
make[2]: Opuszczenie katalogu `/home/rav/Pulpit/gdb-6.8/sim'
make[2]: Wejście do katalogu `/home/rav/Pulpit/gdb-6.8/gdb'
gcc -c -g -O2 -I. -I.././gdb -I.././gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I.././gdb/../include/opcode -I.././gdb/../readline/.. -I../bfd -I.././gdb/../bfd -I.././gdb/../include -I../libdecnumber -I.././gdb/../libdecnumber -DMI_OUT=1 -DTUI=1 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wno-switch -Wno-char-subscripts -Werror linux-nat.c
cc1: warnings being treated as errors
linux-nat.c: In function ‘linux_nat_info_proc_cmd’:
linux-nat.c:2879: error: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
make[2]: *** [linux-nat.o] error 1
make[2]: Opuszczenie katalogu `/home/rav/Pulpit/gdb-6.8/gdb'
make[1]: *** [all-gdb] error 2
make[1]: Opuszczenie katalogu `/home/rav/Pulpit/gdb-6.8'
make: *** [all] error 2
rav@rav-laptop:~/Pulpit/gdb-6.8$

cariboo
December 12th, 2008, 11:57 PM
GDB is in the repositories, there is no need to compile it yourself. Go to System-->Administration--Synaptic Package Manager and search for gdb.

Jim

Jeff-in-OR
February 25th, 2009, 07:03 PM
Yeah-but...

I have a development environment (different version of gcc/tool chain) for an embedded product that fails to build gdb 6.8 when that environemnt is installed on 8.10 (works on 8.04). It fails in the exact same way as when attempting to build gdb 6.8 from source on a fresh 8.10 build using the Ubuntu-supplied toolchain. after ./configure I can successfully execute the make targets inidividually until:

make all-host

then the error occurs.

Is there a way to see how the package was built for Ubuntu?

Jeff-in-OR
February 25th, 2009, 07:40 PM
that assumes I skip make all...

skierpage
September 21st, 2009, 11:59 AM
I had this and several similar compiler errors trying to compile gdb 6.8 under Kubuntu 9.04 64-bit. I filed bugs 10674 (http://sourceware.org/bugzilla/show_bug.cgi?id=10674) and 10675 (http://sourceware.org/bugzilla/show_bug.cgi?id=10675) against gdb at sourceware.org. You can get past them by declaring a junk variable of the right type, e.g. char *junk; at the top of the program block, then assigning junk = [the problem function call].
(http://sourceware.org/bugzilla/show_bug.cgi?id=10675)
I compiled gdb myself hoping to avoid gdb crashes in iterate_over_threads , possibly because Ubuntu should have repackaged gdb for kernel and/or libc updates since 9.04, which might be Launchpad bug 258578 (https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/258578). But it didn't help.

PLayer_unu
July 4th, 2010, 11:52 PM
I had this and several similar compiler errors trying to compile gdb 6.8 under Kubuntu 9.04 64-bit. I filed bugs 10674 (http://sourceware.org/bugzilla/show_bug.cgi?id=10674) and 10675 (http://sourceware.org/bugzilla/show_bug.cgi?id=10675) against gdb at sourceware.org. You can get past them by declaring a junk variable of the right type, e.g. char *junk; at the top of the program block, then assigning junk = [the problem function call].
(http://sourceware.org/bugzilla/show_bug.cgi?id=10675)
I compiled gdb myself hoping to avoid gdb crashes in iterate_over_threads , possibly because Ubuntu should have repackaged gdb for kernel and/or libc updates since 9.04, which might be Launchpad bug 258578 (https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/258578). But it didn't help.

It's a good solution to declare a junk variabile. I've tried this and worked, but then I've got another 5-6 similar errors and I've found another FAST solution.
Edit the Makefile and delete this line:

WERROR_CFLAGS = -Werror

That's because you will be prompted for an error everytime the compiler will get a warning.

asifhu
August 2nd, 2012, 08:27 PM
Do this:

./configure --disable-werror

you might want to specify --prefix and --exec-prefix.

And then:

make