Git Product home page Git Product logo

Comments (14)

durovsky avatar durovsky commented on June 30, 2024 2

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

from gdb-7.7.1.

Levi-Armstrong avatar Levi-Armstrong commented on June 30, 2024

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

from gdb-7.7.1.

adrianohrl avatar adrianohrl commented on June 30, 2024

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.

from gdb-7.7.1.

durovsky avatar durovsky commented on June 30, 2024

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

from gdb-7.7.1.

durovsky avatar durovsky commented on June 30, 2024

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.

from gdb-7.7.1.

Levi-Armstrong avatar Levi-Armstrong commented on June 30, 2024

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.

from gdb-7.7.1.

superjax avatar superjax commented on June 30, 2024

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!

from gdb-7.7.1.

Levi-Armstrong avatar Levi-Armstrong commented on June 30, 2024

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.

from gdb-7.7.1.

goupil35000 avatar goupil35000 commented on June 30, 2024

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

from gdb-7.7.1.

Levi-Armstrong avatar Levi-Armstrong commented on June 30, 2024

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

from gdb-7.7.1.

durovsky avatar durovsky commented on June 30, 2024

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_flex_xrealloc/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

from gdb-7.7.1.

Levi-Armstrong avatar Levi-Armstrong commented on June 30, 2024

Did you run ./configure then make?

On Oct 19, 2016 7:47 AM, "Frantisek Durovsky" [email protected]
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_flex_xrealloc/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
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJWVeAj-zadF0HUfeiHAM9bl5f-UreOZks5q1hFjgaJpZM4JxKyX
.

from gdb-7.7.1.

Levi-Armstrong avatar Levi-Armstrong commented on June 30, 2024

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" [email protected] wrote:

Did you run ./configure then make?

On Oct 19, 2016 7:47 AM, "Frantisek Durovsky" [email protected]
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_flex_xrealloc/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
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJWVeAj-zadF0HUfeiHAM9bl5f-UreOZks5q1hFjgaJpZM4JxKyX
.

from gdb-7.7.1.

goupil35000 avatar goupil35000 commented on June 30, 2024

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

from gdb-7.7.1.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.