From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31421 invoked by alias); 29 May 2013 16:54:13 -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 31410 invoked by uid 89); 29 May 2013 16:54:12 -0000 X-Spam-SWARE-Status: No, score=-5.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.1 Received: from hop-nat-141.emc.com (HELO mexforward.lss.emc.com) (168.159.213.141) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 29 May 2013 16:54:12 +0000 Received: from hop04-l1d11-si04.isus.emc.com (HOP04-L1D11-SI04.isus.emc.com [10.254.111.24]) by mexforward.lss.emc.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id r4TGs9LX028660 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 29 May 2013 12:54:09 -0400 Received: from mailhub.lss.emc.com (mailhubhoprd02.lss.emc.com [10.254.221.253]) by hop04-l1d11-si04.isus.emc.com (RSA Interceptor) for ; Wed, 29 May 2013 12:54:00 -0400 Received: from usendtaylorx2l.lss.emc.com (usendtaylorx2l.lss.emc.com [10.243.10.188]) by mailhub.lss.emc.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id r4TGrxvJ008269 for ; Wed, 29 May 2013 12:53:59 -0400 Received: by usendtaylorx2l.lss.emc.com (Postfix, from userid 26043) id 322EC5B0DCD; Wed, 29 May 2013 12:53:59 -0400 (EDT) Received: from usendtaylorx2l (localhost [127.0.0.1]) by usendtaylorx2l.lss.emc.com (Postfix) with ESMTP id 2CC745B0DCB for ; Wed, 29 May 2013 12:53:59 -0400 (EDT) From: David Taylor To: gdb@sourceware.org Subject: bad library order returned by gdb/python/python-config.py Date: Wed, 29 May 2013 16:54:00 -0000 Message-ID: <27415.1369846439@usendtaylorx2l> X-EMM-MHVC: 1 X-SW-Source: 2013-05/txt/msg00128.txt.bz2 When linking, a library should be listed before the libraries that it depends upon. With shared libraries, this is less important, but still a good idea. With static libraries it matters. The file gdb/python/python-config.py in the gdb 7.6 release lists the python library *AFTER* the libraries that it depends upon. This causes linkage errors during the configure phase of the build -- causing GDB to not use python. Here's a trivial unified diff patch. Index: gdb/python/python-config.py =================================================================== RCS file: /home/cvsroot/GDB/gdb/python/python-config.py,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 python-config.py --- gdb/python/python-config.py 9 May 2013 19:00:17 -0000 1.1.1.1 +++ gdb/python/python-config.py 29 May 2013 16:46:38 -0000 @@ -59,11 +59,11 @@ elif opt in ('--libs', '--ldflags'): libs = [] + libs.append('-lpython'+pyver + abiflags) if getvar('LIBS') is not None: libs.extend(getvar('LIBS').split()) if getvar('SYSLIBS') is not None: libs.extend(getvar('SYSLIBS').split()) - libs.append('-lpython'+pyver + abiflags) # add the prefix/lib/pythonX.Y/config dir, but only if there is no # shared library in prefix/lib/. if opt == '--ldflags':