From owner-freebsd-python@FreeBSD.ORG Sat Feb 5 03:30:25 2011 Return-Path: Delivered-To: freebsd-python@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87B02106566C for ; Sat, 5 Feb 2011 03:30:25 +0000 (UTC) (envelope-from corky1951@comcast.net) Received: from qmta14.emeryville.ca.mail.comcast.net (qmta14.emeryville.ca.mail.comcast.net [76.96.27.212]) by mx1.freebsd.org (Postfix) with ESMTP id 48FBD8FC0A for ; Sat, 5 Feb 2011 03:30:25 +0000 (UTC) Received: from omta12.emeryville.ca.mail.comcast.net ([76.96.30.44]) by qmta14.emeryville.ca.mail.comcast.net with comcast id 43HB1g0030x6nqcAE3HD1K; Sat, 05 Feb 2011 03:17:13 +0000 Received: from comcast.net ([98.203.142.76]) by omta12.emeryville.ca.mail.comcast.net with comcast id 43HB1g0041f6R9u8Y3HBZK; Sat, 05 Feb 2011 03:17:12 +0000 Received: by comcast.net (sSMTP sendmail emulation); Fri, 04 Feb 2011 19:17:10 -0800 Date: Fri, 4 Feb 2011 19:17:10 -0800 From: Charlie Kester To: freebsd-python@freebsd.org Message-ID: <20110205031710.GG80820@comcast.net> Mail-Followup-To: freebsd-python@freebsd.org References: <20110204051500.GA80820@comcast.net> <20110204100544.GL78089@deviant.kiev.zoral.com.ua> <20110204185512.GB80820@comcast.net> <20110204195400.GP78089@deviant.kiev.zoral.com.ua> <20110204212219.GE80820@comcast.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20110204212219.GE80820@comcast.net> User-Agent: Mutt/1.4.2.3i X-Mailer: Mutt 1.4.2.3i X-Composer: Vim 7.3 Subject: Re: py-numpy build failure, multiple definition of `__i686.get_pc_thunk.bx' X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Feb 2011 03:30:25 -0000 On Fri 04 Feb 2011 at 13:22:19 PST Charlie Kester wrote: >On Fri 04 Feb 2011 at 11:54:00 PST Kostik Belousov wrote: >>On Fri, Feb 04, 2011 at 10:55:12AM -0800, Charlie Kester wrote: >>>On Fri 04 Feb 2011 at 02:05:44 PST Kostik Belousov wrote: >>> >>> >Can you show the actual invocation of the compiler driver for linking ? >>> >>>Isn't that the line right before the first report of the error? >>> >>>cc -shared -pthread -mtune=generic -msse -msse2 -msse3 -mfpmath=sse -O2 >>>-fno-strict-aliasing -pipe -Wl,-rpath=/usr/local/lib/gcc45 >>>build/temp.freebsd-8.2-PRERELEASE-i386-2.7/build/src.freebsd-8.2-PRERELEASE-i386-2.7/numpy/core/src/_sortmodule.o -Lbuild/temp.freebsd-8.2-PRERELEASE-i386-2.7 -lm -o build/lib.freebsd-8.2-PRERELEASE-i386-2.7/numpy/core/_sort.so >>> >>I wanted the confirmation of exact command that failed. If your >>citation above is right, then port _does not_ use gcc45 to do linkage >>of the module. Generally, crtbegin/crtend.o come from the compiler >>installation, so I am suspicious at least to report of use of >>/usr/lib/crtbegin.So. >> >>Can you enter the port build directory and execute the same command >>manually, substituting "cc" with full path to gcc45 ? > >Done. Replacing "cc" with "gcc45" built the library without any error. >(I didn't need to specify the full path to gcc45.) > >So the question is, why is cc being invoked in the first place? As far >as I know, I'm not doing anything to force using it. Something seems >to have gone wrong during py-numpy's configtests... After some sleuthing I tried: # make LDSHARED="gcc45 -shared" install This seems to have worked. The build and install now succeeds without complaint. Hooray! So where did the "cc" come from? /usr/local/lib/python2.7/distutils/unixccompiler.py has the following line: 'linker_so' : ["cc", "-shared"] The base class defined in ccompiler.py sets linker_so to ${LDSHARED} if that environment variable is defined, and that assignment seems to be inherited all the way down into the numpy scripts. Otherwise, we get the value defined in unixccompiler.py.