From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12335 invoked by alias); 25 Jun 2010 15:40:54 -0000 Received: (qmail 12306 invoked by uid 22791); 25 Jun 2010 15:40:52 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from ey-out-1920.google.com (HELO ey-out-1920.google.com) (74.125.78.145) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 25 Jun 2010 15:40:47 +0000 Received: by ey-out-1920.google.com with SMTP id 13so101099eye.42 for ; Fri, 25 Jun 2010 08:40:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.101.138 with SMTP id c10mr2172536ebo.55.1277480444545; Fri, 25 Jun 2010 08:40:44 -0700 (PDT) Received: by 10.213.109.2 with HTTP; Fri, 25 Jun 2010 08:40:44 -0700 (PDT) Date: Fri, 25 Jun 2010 15:40:00 -0000 Message-ID: Subject: how to build gdb-7.1 --with-python? From: Steffen Dettmer To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 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 X-SW-Source: 2010-06/txt/msg00125.txt.bz2 Hi, I would like to play with gdb's Python support. Usually I don't have problems with installing GNU software, but here I encountered issues suggesting me that I'm doing something weird or have something broken, missed or missunderstood. I googled, but did not find installation instructions. gdb/README just states `--with-python', so I though it would be easy, as soon as I upgraded my Python. So from python.org I grabbed 2.5 and installed it (default configure options). I noticed that "make test" hung (0% CPU) in some thread test. Hoped not to need it and installed anyway. Went back to gdb builddir and used: ../configure --with-python --target=arm-elf --disable-werror --disable-expat --with-expat=no Worked. Ran make. Failed after a while with: checking for python2.5... no checking for python2.4... no configure: error: python is missing or unusable make[1]: *** [configure-gdb] Error 1 make[1]: Leaving directory `/usr/local/build/gdb-7.1/build-python' after another while I found gdb/config.log (it's a bit hidden I think) telling -lpython2.5 could not be found. I googled and found the recommendation to symlink it by myself. I think this is doubtful, but I had no better idea, so I did: host:/usr/local/lib # ln -s /usr/local/lib/python2.5/config/libpython2.5.a . re-ran make. Now I got resolved symbols from libdl (dl_open and friends) and even from libpthread (sem_init, pthread_create...). I tried: ../configure --with-python --target=arm-elf --disable-werror \ --disable-expat --with-expat=no \ LIBS="-ldl -lpthread" but since it seems not to be a recursive configure but some sub-configure indepdently triggered by make, the parameters (LIBS) seem not to be passed through; in gdb/config.log the shown "Invocation command line" does not include the LIBS parameter. Anyway, I think LIBS="-lpthread" cannot be right, should be automatic. Or do I have to build some single-threaded python? Maybe also disabling libdl? Or is this essential? Is my assumption to use "a standard python" correct or should a specifically configured one be used? Maybe not even installed system-wide? Any hints or pointers appreciated. oki, Steffen