Article View: gnu.gdb.bug
Article #1108linking with python
From: Paul Emsley
Date: Thu, 05 Jul 2012 10:47
Date: Thu, 05 Jul 2012 10:47
40 lines
3068 bytes
3068 bytes
Hi,
maybe you know, just in case not...
You allow use of bespoke python build for the most part. There is an
issue in the linking though - I had to make the following change so that
gdb was linked with my python rather than the system one. I suppose
that you should set some sort of PYTHONLIBS variable that contains the
path to the relevant libs (somewhat like you do for INTERNAL_CPP_FLAGS).
CLIBS = $(SIM) $(READLINE) $(OPCODES) $(BFD) $(INTL) $(LIBIBERTY) $(LIBDECNUMBER) \
$(XM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) -ldl -lncurses -lz -lm -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic \
$(LIBEXPAT) \
$(LIBIBERTY) $(WIN32LIBS) $(LIBGNU)
CLIBS = $(SIM) $(READLINE) $(OPCODES) $(BFD) $(INTL) $(LIBIBERTY) $(LIBDECNUMBER) \
$(XM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) -ldl -lncurses -lz -lm -lpthread -ldl -lutil -lm -L$(MY_PYTHON)/lib -lpython2.7 -Xlinker -export-dynamic \
$(LIBEXPAT) \
$(LIBIBERTY) $(WIN32LIBS) $(LIBGNU)
Incidentally, the reason why I was compiling was this:
$ gdb `which python` core.23394
gdb: symbol lookup error: gdb: undefined symbol:
PyUnicodeUCS4_FromEncodedObject
confusion with unicode...
Regards,
Paul.
Technical Details
Message-ID:
<mailman.4113.1341503930.855.bug-gdb@gnu.org>Path:
arc1-ca.pugleaf.net!l9ni10938pbj.0!nntp.google.com!news1.google.com!news2.google.com!news.glorb.com!usenet.stanford.edu!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f5053,10c425c1b9a964cd,start
X-Google-NewGroupId: yes
X-Google-Attributes: gidf0ead4270c,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.68.219.170 with SMTP id pp10mr10137744pbc.1.1341503931678;
Thu, 05 Jul 2012 08:58:51 -0700 (PDT)
Path: arc1-ca.pugleaf.net!l9ni10938pbj.0!nntp.google.com!news1.google.com!news2.google.com!news.glorb.com!usenet.stanford.edu!not-for-mail
From: Paul Emsley <paul.emsley@bioch.ox.ac.uk>
Newsgroups: gnu.gdb.bug
Subject: linking with python
Date: Thu, 05 Jul 2012 11:47:24 +0100
Lines: 42
Approved: bug-gdb@gnu.org
Message-ID: <mailman.4113.1341503930.855.bug-gdb@gnu.org>
NNTP-Posting-Host: lists.gnu.org
Mime-Version: 1.0
X-Trace: usenet.stanford.edu 1341503931 31465 208.118.235.17 (5 Jul 2012 15:58:51 GMT)
X-Complaints-To: action@cs.stanford.edu
To: bug-gdb@gnu.org
Envelope-to: bug-gdb@gnu.org
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
rv:13.0) Gecko/20120605 Thunderbird/13.0
X-Oxford-Username: bioc0713
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 129.67.1.171
X-Mailman-Approved-At: Thu, 05 Jul 2012 11:58:49 -0400
X-BeenThere: bug-gdb@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: "Bug reports for GDB, the GNU debugger" <bug-gdb.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gdb>,
<mailto:bug-gdb-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-gdb>
List-Post: <mailto:bug-gdb@gnu.org>
List-Help: <mailto:bug-gdb-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gdb>,
<mailto:bug-gdb-request@gnu.org?subject=subscribe>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit