Is it possible to statically link python into gdb?

Terry Guo <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAGbRaL5PAaO-NHojLYfSOjZPsPajYGGb0e8FV2qr5g8OEJXqzQ@mail.gmail.com>
Hi there,

I am trying to build a gdb with python support which doesn't depend on
system python at all. I can manage to build python into static library
like libpython2.7.a, then I can see that this static library is linked
into gdb. With command ldd, there is no libpython dependence in final
gdb. So far all good. But when run this gdb on another machine, I ran
into below errors and gdb can't be initiated:

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]

I am working on Ubuntu x86 machines with gdb from master branch and
Python 2.7. Could some one please help me? Thanks in advance.

BR,
Terry
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.