From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30110 invoked by alias); 23 Jun 2014 15:48:31 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 30091 invoked by uid 89); 23 Jun 2014 15:48:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_50,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: ausc60ps301.us.dell.com Received: from ausc60ps301.us.dell.com (HELO ausc60ps301.us.dell.com) (143.166.148.206) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Mon, 23 Jun 2014 15:48:27 +0000 X-LoopCount0: from 10.175.216.250 From: To: CC: , Subject: Re: Is it possible to statically link python into gdb? Date: Mon, 23 Jun 2014 15:48:00 -0000 Message-ID: <214EDCB8-BEE1-4E6D-801E-D57B46AD7424@dell.com> References: <56168225.tkKpPXRO26@dabox> In-Reply-To: <56168225.tkKpPXRO26@dabox> Content-Type: text/plain; charset="Windows-1252" Content-ID: <8D715AA962AD994899814C74CA03345F@dell.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00071.txt.bz2 On Jun 23, 2014, at 9:49 AM, Tim Sander wrote: > Hi Terry >> 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: >>=20 >> Could not find platform independent libraries >> Could not find platform dependent libraries >> Consider setting $PYTHONHOME to [:] >>=20 >> 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. > I don't know much about python but might it be that you need the *.py fil= es=20 > of PYTHONHOME/lib nevertheless to get a running python interpreter? I assume you=92d need at least a couple, for the standard Python startup ma= chinery to work. Some of that can be suppressed when Python is involved by= a command; I assume this can also be done when Python is embedded.=20=20 Note also that a lot of Python modules are not just .py files but also .so = files or equivalent. paul