From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19578 invoked by alias); 8 Nov 2013 00:03:44 -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 19543 invoked by uid 89); 8 Nov 2013 00:03:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.4 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,SPAM_SUBJECT,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: multi.imgtec.com Received: from Unknown (HELO multi.imgtec.com) (194.200.65.239) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 08 Nov 2013 00:02:59 +0000 From: "Steve Ellcey " Date: Fri, 08 Nov 2013 00:03:00 -0000 To: Subject: GDB/Python configuration question User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-ID: X-SEF-Processed: 7_3_0_01192__2013_11_08_00_02_50 X-SW-Source: 2013-11/txt/msg00013.txt.bz2 This question should probably be asked on the python list but since the only reason I am building python is to build gdb I thought I would start here and find out if I am really the only person running into this issue and in the hopes that someone here has some good connections into that project and could forward the bug on. I am building and installing python into a non-standard location on my x86 linux box (ubuntu 12.04), this seems to all work fine. It builds and installs an archive, but not shared, python library (libpython2.7.a). I add the bin directory containing python-config.py to my PATH and then I try to configure and build gdb (configuring with --with-python). The GDB configure script uses python-config.py to set python_libs and compiles and links a test program that calls Py_Initialize to see if the python installation is good. This test fails for me. The reason is that "python-config.py --ldflags" is returning: -L/local/home/sellcey/gcc/mt/src/install-python/lib/python2.7/config -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic and if I link with this I get undefined references because libpython2.7 is listed *after* libutil, libm, and libdl and is an archive library. If I move it before (by hand) the link works. Has anyone else run into this? Steve Ellcey sellcey@mips.com