Unable To Install GDB With Python Support
Solution 1:
I had this same problem. I am using Python 2.7.10 - Anaconda 2.3.0 (installed in a non-standard location), and GDB-7.11. It turns out that within gdb-7.11/
there are multiple autoconfigs. When I inspected gdb-7.11/gdb/config.cache
, there was an error because it could not find python2.7
library. So the solution is to export LDFLAGS
, when running the top level autoconfig in gdb-7.11
otherwise the autoconfig in gdb-7.11/gdb
will not know where to find the python2.7 library.
E.G.
make distclean
cd gdb/
make distclean
cd ../
export LDFLAGS=-L/path/to/nonstandard/python/lib/; ./configure --prefix=/path/to/home/directory/gdb-7.11/ --with-python
NOTE : In this situation, it is best to clean both the top level and the gdb configures. Cleaning the top level configure will not clean the gdb/ configure. This gave me some grief.
Solution 2:
Install python libraries with,
sudo apt-get install python2.7-dev
Now try,
./configure --with-python
make
Solution 3:
I assume your python2.7
binary is installed under /usr/bin
then you can try ./configure --with-python=python2.7
then make and gdb makefile will search for the python binary to get python header and lib to complete the compilation
Solution 4:
This error usually happens when python is not installed in a standard location.
If you are building python from source, then configure and build it as:
./configure --enable-shared --prefix=$HOME/local LDFLAGS="-Wl,--rpath=$HOME/local/lib"
make install
After python has been built (change $HOME/local
to where you prefer), it is time to configure and build gdb (tested with GDB 7.10):
export LDFLAGS="-Wl,-rpath,$HOME/local/lib -L$HOME/local/lib"
./configure --with-python=$HOME/local/bin/ --prefix=$HOME/local
make install
Post a Comment for "Unable To Install GDB With Python Support"