Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Feb 2011 21:54:00 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        freebsd-python@freebsd.org
Subject:   Re: py-numpy build failure, multiple definition of `__i686.get_pc_thunk.bx'
Message-ID:  <20110204195400.GP78089@deviant.kiev.zoral.com.ua>
In-Reply-To: <20110204185512.GB80820@comcast.net>
References:  <20110204051500.GA80820@comcast.net> <20110204100544.GL78089@deviant.kiev.zoral.com.ua> <20110204185512.GB80820@comcast.net>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
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:
> >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.
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 ?

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEARECAAYFAk1MWVgACgkQC3+MBN1Mb4g5LwCfdT+JXneiF/A3qcYPvIDCL6NX
ixkAnimNk904zVBj/SW89fNmXtukelCy
=SC3B
-----END PGP SIGNATURE-----
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110204195400.GP78089>