From owner-freebsd-python@FreeBSD.ORG Fri Feb 4 18:55:17 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 C4FD4106566B for ; Fri, 4 Feb 2011 18:55:17 +0000 (UTC) (envelope-from corky1951@comcast.net) Received: from QMTA11.westchester.pa.mail.comcast.net (qmta11.westchester.pa.mail.comcast.net [76.96.59.211]) by mx1.freebsd.org (Postfix) with ESMTP id 857F98FC0C for ; Fri, 4 Feb 2011 18:55:17 +0000 (UTC) Received: from omta21.westchester.pa.mail.comcast.net ([76.96.62.72]) by QMTA11.westchester.pa.mail.comcast.net with comcast id 3u791g0071ZXKqc5BuvHWY; Fri, 04 Feb 2011 18:55:17 +0000 Received: from comcast.net ([98.203.142.76]) by omta21.westchester.pa.mail.comcast.net with comcast id 3uvD1g01Y1f6R9u3huvFpj; Fri, 04 Feb 2011 18:55:17 +0000 Received: by comcast.net (sSMTP sendmail emulation); Fri, 04 Feb 2011 10:55:12 -0800 Date: Fri, 4 Feb 2011 10:55:12 -0800 From: Charlie Kester To: freebsd-python@freebsd.org Message-ID: <20110204185512.GB80820@comcast.net> Mail-Followup-To: freebsd-python@freebsd.org References: <20110204051500.GA80820@comcast.net> <20110204100544.GL78089@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20110204100544.GL78089@deviant.kiev.zoral.com.ua> 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: Fri, 04 Feb 2011 18:55:17 -0000 On Fri 04 Feb 2011 at 02:05:44 PST Kostik Belousov wrote: >On Thu, Feb 03, 2011 at 09:15:00PM -0800, Charlie Kester wrote: >... >> customize UnixCCompiler >> customize UnixCCompiler using build_ext >> customize Gnu95FCompiler >> customize Gnu95FCompiler using build_ext >> building 'numpy.core._sort' extension >> compiling C sources >> C compiler: gcc45 -DNDEBUG -mtune=generic -msse -msse2 -msse3 -mfpmath=sse >> -O2 -fno-strict-aliasing -pipe -D__wchar_t=wchar_t >> -DTHREAD_STACK_SIZE=0x20000 -mtune=generic -msse -msse2 -msse3 -mfpmath=sse >> -O2 -fno-strict-aliasing -pipe -Wl,-rpath=/usr/local/lib/gcc45 -fPIC >> >> compile options: '-Inumpy/core/include >> -Ibuild/src.freebsd-8.2-PRERELEASE-i386-2.7/numpy/core/include/numpy >> -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core >> -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath >> -Inumpy/core/include -I/usr/local/include/python2.7 >> -Ibuild/src.freebsd-8.2-PRERELEASE-i386-2.7/numpy/core/src/multiarray >> -Ibuild/src.freebsd-8.2-PRERELEASE-i386-2.7/numpy/core/src/umath -c' >> gcc45: >> build/src.freebsd-8.2-PRERELEASE-i386-2.7/numpy/core/src/_sortmodule.c >> 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 >> build/temp.freebsd-8.2-PRERELEASE-i386-2.7/build/src.freebsd-8.2-PRERELEASE-i386-2.7/numpy/core/src/_sortmodule.o(.text.__i686.get_pc_thunk.bx+0x0): In function `__i686.get_pc_thunk.bx': >> : multiple definition of `__i686.get_pc_thunk.bx' >> /usr/lib/crtbeginS.o(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): first >> defined here >> build/temp.freebsd-8.2-PRERELEASE-i386-2.7/build/src.freebsd-8.2-PRERELEASE-i386-2.7/numpy/core/src/_sortmodule.o(.text.__i686.get_pc_thunk.bx+0x0): In function `__i686.get_pc_thunk.bx': >> : multiple definition of `__i686.get_pc_thunk.bx' >> /usr/lib/crtbeginS.o(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0): first >> defined here >> error: Command "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" failed with exit status 1 >> *** Error code 1 >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 FWIW, I tried modifying my make.conf to remove the additional CFLAGS I'd added, like -fno-strict-aliasing. But the build still failed using only the CFLAGS provided by the ports system and py-numpy's configtests. I also checked for environment variables related to the linker and found none. (For this build I'm logged into the console, not a terminal emulator, as root and am not using a custom profile.) My PATH looks like this: /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin I do have gcc45 installed, but only as a result of some other port that required it. I forget which one. Anyway, you can see that it's being used in the excerpt above.