Eclipse Luna CDT fails in windows 64 - c++

I've been installed Cygwin for windows x64.
After installation, I noticed that the system can find everything.
In the console:
C:\Users\Tomás>gcc --version
gcc (GCC) 4.8.3
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C:\Users\Tomás>g++ --version
g++ (GCC) 4.8.3
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C:\Users\Tomás>make --version
GNU Make 4.0
Built for x86_64-pc-cygwin
Copyright (C) 1988-2013 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.
C:\Users\Tomás>gdb --version
GNU gdb (GDB) 7.6.50.20130728-cvs (cygwin-special)
Copyright (C) 2013 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 "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Then, when I create a project in eclipse, I get this error message when you try to compile it:
How can I fix it?
Thanks!

You must setup your compiler location.
You can do this in Project->Properties->C/C++ Build -> Settings -> Toolchains Tab.
For example, I use compiler from CodeSourcery Lite version.
So, I choose "C:\Program Files (x86)\CodeSourcery\Sourcery_CodeBench_Lite_for_ARM_EABI\arm-none-eabi" in Global path field.
See image: https://yadi.sk/i/Zx_KkMs5X7TKg
In addition, You have some trouble in Node.cpp file...
But I need to see this file to say what's wrong...
Good Luck!
Vadim

Related

after gdb read symbols from python3.11 done,gdb is stuck, not responding to whatever command is entered

### this is gdb's output.
***
gdb python3.11
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 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 "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python3.11...done.
***
I can't enter any commands after this.
### this is gcc and gdb version.
***
gcc --version
gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
gdb --version
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 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 "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
***
### this is linux version
***
uname -a
Linux xxxxxxxx.net 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/Linux
cat /etc/debian_version
9.13
***
### python3.11 configure.ac
only add "-gdwarf-4" to OPT , because my gdb does not support dwarf5
### build command
***
./configure --prefix="MY_PATH" -enable-optimizations LLVM_PROFDATA="/usr/lib/llvm-14/bin/llvm-profdata" --with-lto --with-openssl="MY_PATH" --with-openssl-rpath="MY_PATH"
make && make install
***
I Compile Python3.11 without any changes, but GDB does not support DWARF5, so I added "-gdwarf-4" to build. Then I use gdb, gdb gets stuck。 I want use gdb to debug my program 。 I have tried build python2.7 with '-gdwarf-4' ,and the result is same。
Before command 'make install' , gdb is not stuck when I use command 'gdb python3.11'

cygwin gdb Program received signal ?, Unknown signal

my.cpp:
#include<stdio.h>
int main()
{
printf("hello main");
return 0;
}
build with gcc and then
i use gdb to run the program, error occurred.
gdb: unknown target exception 0x406d1388 at 0x75fca6f2
Program received signal ?, Unknown signal.
0x75fca6f2 in RaiseException ()
from /cygdrive/c/WINDOWS/System32/KERNELBASE.dll
gcc info:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-cygwin/5.4.0/lto-wrapper.exe
Target: i686-pc-cygwin
Thread model: posix
gcc version 5.4.0 (GCC)
gdb info:
GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
Copyright (C) 2015 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 "i686-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
It is a known bug for this version of GDB. This link may help you.
When I changed my cygwin to 64 version, the problem is suprisely solved.
I think this may be another a bug which differ from the "well-known" GDB bug.

Eclipse - remote debugging and segfault in dl_main at rtld.c

I want to debug my application written in C++ in Eclipse via network. I followed this tutorial http://janaxelson.com/eclipse5.htm but when debugging starts it gives me strange segmentation fault. Full log:
GNU gdb (Ubuntu 7.9-1ubuntu1) 7.9
Copyright (C) 2015 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 "i686-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
0xb7fdf0d0 in print_statistics (rtld_total_timep=<optimized out>) at rtld.c:2594
2594 rtld.c: No such file or directory.
Program received signal SIGSEGV, Segmentation fault.
0xb7fe129f in dl_main (phdr=0x8048034, phnum=9, user_entry=0xbffff6ec, auxv=0xbffff7e0) at rtld.c:2182
2182 in rtld.c
I can't figure out what's wrong.
My setup is
Ubuntu 15.04, gcc version 4.9.2, gdb 7.9, Eclipse Mars
Target machine:
Ubuntu 14.04.2 LTS, gdb 7.7.1, gdbserver 7.7.1

How to use macports to configure my GDB version on Mac Mountain Lion

I have just used macports to install on my Mac the newest gdb by using sudo port install gdb. The problem is when I type gdb in the command line it still shows the old version. How can I switch to the new one I just installed?
Thanks.
Type :
port contents gdb
It gives you where is located the port
/opt/local/bin/ggdb
/opt/local/include/ansidecl.h
/opt/local/include/bfd.h
/opt/local/include/bfdlink.h
/opt/local/include/dis-asm.h
/opt/local/include/gdb/jit-reader.h
/opt/local/include/symcat.h
/opt/local/lib/libbfd.a
/opt/local/lib/libbfd.la
/opt/local/lib/libopcodes.a
/opt/local/lib/libopcodes.la
...
As you can see below it is named ggdb, not gdb when you have installed it with MacPorts
ggdb
GNU gdb (GDB) 7.6
Copyright (C) 2013 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 "x86_64-apple-darwin11.4.2".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb)

Build Disruptor in C++ gives error on autoconf

I downloaded the disruptor sources from here:
https://github.com/fsaintjacques/disruptor--
I then tried but get the given error. Is there something that I am missing?
autoconf configure.ac > configure
configure.ac:9: error: possibly undefined macro: AM_INIT_AUTOMAKE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:19: error: possibly undefined macro: AC_CXX_COMPILE_STDCXX_0X
gcc version
gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
autoconf version
autoconf --version
autoconf (GNU Autoconf) 2.63
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later
<http://gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David J. MacKenzie and Akim Demaille.
Ask the developer to provide a bootstrap script and/or build instructions. Most likely you need:
aclocal
autoconf
automake -a
./configure
make
With possibly some non-default options (e.g. add --foreign to the automake invocation).