From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25531 invoked by alias); 25 Jun 2014 14:58:03 -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 25522 invoked by uid 89); 25 Jun 2014 14:58:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-lb0-f171.google.com Received: from mail-lb0-f171.google.com (HELO mail-lb0-f171.google.com) (209.85.217.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 25 Jun 2014 14:58:01 +0000 Received: by mail-lb0-f171.google.com with SMTP id s7so1957519lbd.16 for ; Wed, 25 Jun 2014 07:57:57 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.152.23.136 with SMTP id m8mr6328761laf.2.1403708277303; Wed, 25 Jun 2014 07:57:57 -0700 (PDT) Received: by 10.112.0.201 with HTTP; Wed, 25 Jun 2014 07:57:57 -0700 (PDT) In-Reply-To: <20140625143657.GI5253@adacore.com> References: <56168225.tkKpPXRO26@dabox> <214EDCB8-BEE1-4E6D-801E-D57B46AD7424@dell.com> <20140625143657.GI5253@adacore.com> Date: Wed, 25 Jun 2014 14:58:00 -0000 Message-ID: Subject: Re: Is it possible to statically link python into gdb? From: Hector Oron To: Joel Brobecker Cc: Terry Guo , Paul_Koning@dell.com, tim@krieglstein.org, gdb@sourceware.org, Antonio Cavallo Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00081.txt.bz2 Hello 2014-06-25 16:36 GMT+02:00 Joel Brobecker : >> I admit that I have to make a compromise here. I am delivering gdb to >> my customer and my expectation is that they can use my gdb with python >> support no matter there is python in their system and no matter the >> version of their installed python. After a lot of attempts, I think I >> can't reach my expectation. I guess I have to live with my above >> workaround. > > What we do is statically link Python into GDB, and then distribute > both GDB + Python. As long as the path to Python is inside the > configured prefix, the path to the Python libraries should be > "relocatable", allowing users to install the binary package anywhere > and GDB will always find them. Wouldn't it be better if python was loaded as external plugin, that way user/admin can pick up which python version they want to use along GDB. In my use case, when distributing GDB some users want it to still be using python2, some others want to move forward and start moving, i.e. pretty printers, etc.. to use python3 instead. How could we get both kind of users happy? Nowadays I am thinking on providing 2 different builds per each python version, but maybe this should be better loaded via plugin framework, which I am unsure if that currently exists on FSF GDB. Regards, --=20 H=C3=A9ctor Or=C3=B3n -.. . -... .. .- -. -.. . ...- . .-.. --- .--. . = .-.