Levi-Armstrong / gdb-7.7.1

GNU General Public License v2.0
4 stars 4 forks source link

Failure while making #2

Closed adrianohrl closed 7 years ago

adrianohrl commented 8 years ago

In Ubuntu 14.04 with ROS Indigo installed:

Compilation failed with the following output. Any ideas?

[...]

Configuring in ./gdb configure: loading cache ./config.cache configure: error: MAKEINFO' has changed since the previous run: configure: former value:/home/larmstrong/gdb_source/gdb-7.7.1/missing makeinfo --split-size=5000000' configure: current value: makeinfo --split-size=5000000' configure: error:YACC' has changed since the previous run: configure: former value: /home/larmstrong/gdb_source/gdb-7.7.1/missing bison -y' configure: current value:/home/adrianohrl/gdb-7.7.1/missing bison -y' configure: error: in /home/adrianohrl/gdb-7.7.1/gdb': configure: error: changes in the environment can compromise the build configure: error: runmake distclean' and/or rm ./config.cache' and start over make[1]: *** [configure-gdb] Error 1 make[1]: Leaving directory/home/adrianohrl/gdb-7.7.1' make: *\ [all] Error 2

Levi-Armstrong commented 8 years ago

It looks like I uploaded all of my make files which have my local paths. Try a make clean first.

adrianohrl commented 8 years ago

It is just like previously. I entered: ~/gdb-7.7.1$ ./configure ~/gdb-7.7.1$ make clean ~/gdb-7.7.1$ make ~/gdb-7.7.1$ make distclean ~/gdb-7.7.1$ make

and possible combinations, but nothing has changed.

durovsky commented 8 years ago

I confirm that I have also experienced the same problem on Ubuntu 14.04 LTS and QT5.7.

durovsky commented 8 years ago

Levi, is it possible to re-commit just sources? Because after configure and make step, your local path is spread all over the Makefiles and other config files and it is just not possible to compile this code on other computer. Even if I removed all .o and .a object files, config statuses, config.chache, genreated MakeFiles etc, I was not able to get to the successful build.

Or, eventually is it possible to use original gdb 7.7.1 version instead? It compiles fine, however I don't know if you did any changes to the original code.

Levi-Armstrong commented 8 years ago

I will work on getting it cleaned up. I did make changes to the source to allow for skipping before the process has started. It depends on how you are debugging your ROS project. If you are attaching to a process after it has started then you can use the default version of gdb. If you use the method wait for process to start then attache you have to use this version. I have created a patch, which gdb has requested I update it to the latest version of gdb to get it merged. So hopefully this will not be necessary in the future.

superjax commented 8 years ago

I'm also seeing this issue, and would love to use this once it is fixed. Thanks @Levi-Armstrong for putting this up for us to use!

Levi-Armstrong commented 8 years ago

Sorry that's it's taking me so long. I am about finished with integrating catkin_tools and then this is my next item to address.

goupil35000 commented 8 years ago

Hi, I got the same error on a fresh Ubuntu 16.04. I add a user with name larmstrong and put gdb-7.7.1 (without master word) in /home/larmstrong/gdb_source/. I then can do a part of the compilation. But after each error, I had to install some missing library. So I successively install this after each make errors (and do a make clean, make distclean and ./configure each time to be sure that all is ok): sudo apt-get install build-essential sudo apt-get install libpcap sudo apt-get install libpcap0.8 sudo apt-get install libunwind8* sudo apt-get install libncurses5 libncurses5-dev

I now have multiple errors, I can't solve. See below. Hope someone will find a solution, but the message is that there are multiple main in C files.

Thanks

Goupil


c-exp.o: In function main': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/c-exp.c:1: multiple definition ofmain' gdb.o:/home/larmstrong/gdb_source/gdb-7.7.1/gdb/gdb.c:26: first defined here cp-name-parser.o: In function main': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-name-parser.c:1: multiple definition ofmain' gdb.o:gdb.c:(.text.startup+0x0): first defined here ada-exp.o: In function main': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/ada-exp.c:1: multiple definition ofmain' gdb.o:gdb.c:(.text.startup+0x0): first defined here jv-exp.o: In function main': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/jv-exp.c:1: multiple definition ofmain' gdb.o:gdb.c:(.text.startup+0x0): first defined here f-exp.o: In function main': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/f-exp.c:1: multiple definition ofmain' gdb.o:gdb.c:(.text.startup+0x0): first defined here go-exp.o: In function main': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/go-exp.c:1: multiple definition ofmain' gdb.o:gdb.c:(.text.startup+0x0): first defined here m2-exp.o: In function main': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/m2-exp.c:1: multiple definition ofmain' gdb.o:gdb.c:(.text.startup+0x0): first defined here p-exp.o: In function main': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/p-exp.c:1: multiple definition ofmain' gdb.o:gdb.c:(.text.startup+0x0): first defined here py-type.o: In function typy_lookup_type': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/./python/py-type.c:819: undefined reference tocp_comp_to_string' py-type.o: In function typy_legacy_template_argument': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/./python/py-type.c:852: undefined reference tocp_demangled_name_to_comp' macroexp.o: In function get_string_literal': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/macroexp.c:423: undefined reference toc_parse_escape' macroexp.o: In function get_character_constant': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/macroexp.c:366: undefined reference toc_parse_escape' ada-lang.o: In function parse': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/ada-lang.c:13120: undefined reference toada_parse' ada-lang.o:(.rodata+0x1c18): undefined reference to ada_error' c-lang.o:(.rodata+0x30): undefined reference toc_parse' c-lang.o:(.rodata+0x38): undefined reference to c_error' c-lang.o:(.rodata+0x150): undefined reference toc_parse' c-lang.o:(.rodata+0x158): undefined reference to c_error' c-lang.o:(.rodata+0x270): undefined reference toc_parse' c-lang.o:(.rodata+0x278): undefined reference to c_error' c-lang.o:(.rodata+0x390): undefined reference toc_parse' c-lang.o:(.rodata+0x398): undefined reference to c_error' d-lang.o:(.rodata+0x1f0): undefined reference toc_parse' d-lang.o:(.rodata+0x1f8): undefined reference to c_error' f-lang.o:(.rodata+0x30): undefined reference tof_parse' f-lang.o:(.rodata+0x38): undefined reference to f_error' objc-lang.o:(.rodata+0xf0): undefined reference toc_parse' objc-lang.o:(.rodata+0xf8): undefined reference to c_error' go-lang.o:(.rodata+0x90): undefined reference togo_parse' go-lang.o:(.rodata+0x98): undefined reference to go_error' jv-lang.o:(.rodata+0x2b0): undefined reference tojava_parse' jv-lang.o:(.rodata+0x2b8): undefined reference to java_error' m2-lang.o:(.rodata+0xf0): undefined reference tom2_parse' m2-lang.o:(.rodata+0xf8): undefined reference to m2_error' opencl-lang.o:(.rodata+0x310): undefined reference toc_parse' opencl-lang.o:(.rodata+0x318): undefined reference to c_error' p-lang.o:(.rodata+0x30): undefined reference topascal_parse' p-lang.o:(.rodata+0x38): undefined reference to pascal_error' cp-support.o: In functionmangled_name_to_comp': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:650: undefined reference to cp_demangled_name_to_comp' /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:635: undefined reference tocp_new_demangle_parse_info' cp-support.o: In function cp_canonicalize_string_full': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:540: undefined reference tocp_demangled_name_to_comp' /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:547: undefined reference to cp_comp_to_string' /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:551: undefined reference tocp_demangled_name_parse_free' cp-support.o: In function inspect_type': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:266: undefined reference tocp_demangled_name_to_comp' /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:270: undefined reference to cp_merge_demangle_parse_infos' cp-support.o: In functionreplace_typedefs': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:447: undefined reference to cp_comp_to_string' cp-support.o: In functionreplace_typedefs_qualified_name': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:374: undefined reference to cp_comp_to_string' /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:349: undefined reference tocp_comp_to_string' cp-support.o: In function cp_canonicalize_string': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:588: undefined reference tocp_demangled_name_to_comp' /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:593: undefined reference to cp_comp_to_string' /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:594: undefined reference tocp_demangled_name_parse_free' cp-support.o: In function cp_class_name_from_physname': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:749: undefined reference tocp_demangled_name_parse_free' /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:744: undefined reference to cp_comp_to_string' cp-support.o: In functionmethod_name_from_physname': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:832: undefined reference to cp_comp_to_string' /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:836: undefined reference tocp_demangled_name_parse_free' cp-support.o: In function cp_func_name': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:853: undefined reference tocp_demangled_name_to_comp' /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:861: undefined reference to cp_comp_to_string' /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:863: undefined reference tocp_demangled_name_parse_free' cp-support.o: In function cp_remove_params': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:882: undefined reference tocp_demangled_name_to_comp' /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:909: undefined reference to cp_demangled_name_parse_free' /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:907: undefined reference tocp_comp_to_string' cp-support.o: In function do_demangled_name_parse_free_cleanup': /home/larmstrong/gdb_source/gdb-7.7.1/gdb/cp-support.c:106: undefined reference tocp_demangled_name_parse_free' collect2: error: ld returned 1 exit status Makefile:1249: recipe for target 'gdb' failed make[2]: * [gdb] Error 1 make[2]: Leaving directory '/home/larmstrong/gdb_source/gdb-7.7.1/gdb' Makefile:8611: recipe for target 'all-gdb' failed make[1]: * [all-gdb] Error 2 make[1]: Leaving directory '/home/larmstrong/gdb_source/gdb-7.7.1' Makefile:832: recipe for target 'all' failed make: *\ [all] Error 2

Levi-Armstrong commented 8 years ago

Hello everyone, I have pushed a clean version so everything should build correctly now.

durovsky commented 8 years ago

Tried clean version today, but still having problems,

Moving observer.itmp to observer.inc if [ "/home/durovsky/gdb-7.7.1/missing flex" ] && /home/durovsky/gdb-7.7.1/missing flex --version >/dev/null 2>&1; then \ /home/durovsky/gdb-7.7.1/missing flex -oada-lex.c ada-lex.l && \ rm -f ada-lex.c.new && \ sed -e '/extern._malloc/d' \ -e '/extern._realloc/d' \ -e '/extern._free/d' \ -e '/include.malloc.h/d' \ -e 's/([^x])malloc/\1xmalloc/g' \ -e 's/([^x])realloc/\1xrealloc/g' \ -e 's/([ \t;,(])free([ \t][&(),])/\1xfree\2/g' \ -e 's/([ \t;,(])free$/\1xfree/g' \ -e 's/yy_flexxrealloc/yyxrealloc/g' \ < ada-lex.c > ada-lex.c.new && \ rm -f ada-lex.c && \ mv ada-lex.c.new ada-lex.c; \ elif [ -f ada-lex.c ]; then \ echo "Warning: ada-lex.c older than ada-lex.l and flex not available."; \ else \ echo "ada-lex.c missing and flex not available."; \ false; \ fi ada-lex.c missing and flex not available. make[2]: ** [ada-lex.c] Error 1 make[2]: Leaving directory /home/durovsky/gdb-7.7.1/gdb' make[1]: *** [all-gdb] Error 2 make[1]: Leaving directory/home/durovsky/gdb-7.7.1' make: *\ [all] Error 2

Levi-Armstrong commented 8 years ago

Did you run ./configure then make?

On Oct 19, 2016 7:47 AM, "Frantisek Durovsky" notifications@github.com wrote:

Tried clean version today, but still having problems,

Moving observer.itmp to observer.inc if [ "/home/durovsky/gdb-7.7.1/missing flex" ] && /home/durovsky/gdb-7.7.1/missing flex --version >/dev/null 2>&1; then \ /home/durovsky/gdb-7.7.1/missing flex -oada-lex.c ada-lex.l && \ rm -f ada-lex.c.new && \ sed -e '/extern. _malloc/d' \ -e '/extern._realloc/d' \ -e '/extern. _free/d' \ -e '/include._malloc.h/d' \ -e 's/([^x])malloc/\1xmalloc/g' \ -e 's/([^x])realloc/\1xrealloc/g' \ -e 's/([ \t;,(])free([ \t]

_[&(),])/\1xfree\2/g' \ -e 's/([ \t;,(])free$/\1xfree/g' \ -e 's/yy_flexxrealloc/yyxrealloc/g' \ < ada-lex.c > ada-lex.c.new && \ rm -f ada-lex.c && \ mv ada-lex.c.new ada-lex.c; \ elif [ -f ada-lex.c ]; then \ echo "Warning: ada-lex.c older than ada-lex.l and flex not available."; \ else \ echo "ada-lex.c missing and flex not available."; \ false; \ fi ada-lex.c missing and flex not available. make[2]: ** [ada-lex.c] Error 1 make[2]: Leaving directory /home/durovsky/gdb-7.7.1/gdb' make[1]: * [all-gdb] Error 2 make[1]: Leaving directory/home/durovsky/gdb-7.7.1' make: * [all] Error 2

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Levi-Armstrong/gdb-7.7.1/issues/2#issuecomment-254802010, or mute the thread https://github.com/notifications/unsubscribe-auth/AJWVeAj-zadF0HUfeiHAM9bl5f-UreOZks5q1hFjgaJpZM4JxKyX .

Levi-Armstrong commented 8 years ago

Actually based on the output you provided, you are missing the build dependency flex.

'sudo apt-get install flex'

On Oct 19, 2016 9:59 AM, "Levi Armstrong" levi.armstrong@gmail.com wrote:

Did you run ./configure then make?

On Oct 19, 2016 7:47 AM, "Frantisek Durovsky" notifications@github.com wrote:

Tried clean version today, but still having problems,

Moving observer.itmp to observer.inc if [ "/home/durovsky/gdb-7.7.1/missing flex" ] && /home/durovsky/gdb-7.7.1/missing flex --version >/dev/null 2>&1; then \ /home/durovsky/gdb-7.7.1/missing flex -oada-lex.c ada-lex.l && \ rm -f ada-lex.c.new && \ sed -e '/extern. _malloc/d' \ -e '/extern._realloc/d' \ -e '/extern. _free/d' \ -e '/include._malloc.h/d' \ -e 's/([^x])malloc/\1xmalloc/g' \ -e 's/([^x])realloc/\1xrealloc/g' \ -e 's/([ \t;,(])free([ \t]

_[&(),])/\1xfree\2/g' \ -e 's/([ \t;,(])free$/\1xfree/g' \ -e 's/yy_flexxrealloc/yyxrealloc/g' \ < ada-lex.c > ada-lex.c.new && \ rm -f ada-lex.c && \ mv ada-lex.c.new ada-lex.c; \ elif [ -f ada-lex.c ]; then \ echo "Warning: ada-lex.c older than ada-lex.l and flex not available."; \ else \ echo "ada-lex.c missing and flex not available."; \ false; \ fi ada-lex.c missing and flex not available. make[2]: ** [ada-lex.c] Error 1 make[2]: Leaving directory /home/durovsky/gdb-7.7.1/gdb' make[1]: * [all-gdb] Error 2 make[1]: Leaving directory/home/durovsky/gdb-7.7.1' make: * [all] Error 2

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Levi-Armstrong/gdb-7.7.1/issues/2#issuecomment-254802010, or mute the thread https://github.com/notifications/unsubscribe-auth/AJWVeAj-zadF0HUfeiHAM9bl5f-UreOZks5q1hFjgaJpZM4JxKyX .

durovsky commented 8 years ago

Yes, flex library was missing, it got me much further in compilation process but still got multiple main definitions errors and undefined references. Similar error is described in this Redhat changelog The last missing component in my case was bison parser generator

So my entire installing procedure was:

sudo apt-get install flex sudo apt-get install bison ./configure make sudo make install

goupil35000 commented 8 years ago

Hi, Thanks. Compilation is ok on a fresh Ubuntu 16.04.1 (some warnings during compilation).