From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24696 invoked by alias); 28 Jun 2010 11:04:40 -0000 Received: (qmail 24603 invoked by uid 22791); 28 Jun 2010 11:04:38 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_LN,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; Mon, 28 Jun 2010 11:04:33 +0000 Received: by ey-out-1920.google.com with SMTP id 4so109766eyg.42 for ; Mon, 28 Jun 2010 04:04:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.15.193 with SMTP id l1mr1323413eba.81.1277723069383; Mon, 28 Jun 2010 04:04:29 -0700 (PDT) Received: by 10.213.109.2 with HTTP; Mon, 28 Jun 2010 04:04:29 -0700 (PDT) In-Reply-To: References: Date: Mon, 28 Jun 2010 11:04:00 -0000 Message-ID: Subject: Re: 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/msg00131.txt.bz2 On Fri, Jun 25, 2010 at 7:12 PM, Tom Tromey wrote: > > Steffen> checking for python2.5... no > Steffen> checking for python2.4... no > Steffen> configure: error: python is missing or unusable > > Try --with-python=/usr/local Again, configure worked, but make failed after a while. configure: WARNING: expat support disabled; some features may be unavailable. checking whether to use python... /usr/local checking for python2.6... no checking for python2.5... no checking for python2.4... no configure: error: no usable python found at /usr/local make[1]: *** [configure-gdb] Error 1 make[1]: Leaving directory `/usr/local/build/gdb-7.1/build-python2' make: *** [all] Error 2 BTW, I think specifying default directories might not be a good idea and it leads to a gcc warning: configure:9525: gcc -o conftest -g -O2 -I/usr/local/include conftest.c -lncurses -lz -lm -L/usr/local/lib -lpython2.5 >&5 cc1: warning: changing search order for system directory "/usr/local/include" cc1: warning: as it has already been specified as a non-system directory but anyway, linking fails with exactly the same problem: /usr/local/build/Python-2.5.5/build/../Python/dynload_shlib.c:130: undefined reference to `dlopen' (also dlsym, dlerror) /usr/local/lib/libpython2.5.a(thread.o): In function `PyThread_acquire_lock': /usr/local/build/Python-2.5.5/build/../Python/thread_pthread.h:334: undefined reference to `sem_wait' (also sem_trywait, pthread_attr_setstacksize, pthread_create...) /usr/local/lib/libpython2.5.a(posixmodule.o): In function `posix_openpty': /usr/local/build/Python-2.5.5/build/../Modules/posixmodule.c:3519: undefined reference to `openpty' (also forkpty) as before, it seems to need -ldl and -lpthread, which is missing on command line and cannot be added via `LIBS="-ldl -lpthread"'. > With CVS gdb, you instead point to the 'python' executable. > > Steffen> Now I got resolved symbols from libdl (dl_open and > Steffen> friends) and even from libpthread (sem_init, pthread_create...). > > This sounds familiar... I think it was fixed after 7.1. i.e. in CVS gdb? > It is more ordinary to install and use libpython.so, not the .a. > If you want to go this route it may be simpler to try CVS gdb (though I > am not sure -- I'm always just using my distro's python). ok, I'll try python --enable-shared... I guess it has a bigger chance to succeed? Steffen