[SciPy-user] Problem when building scipy 0.3 for alpha OSF1

David M. Cooke cookedm at physics.mcmaster.ca
Wed May 19 13:19:08 CDT 2004

On Wed, May 19, 2004 at 09:17:08AM -0500, Pearu Peterson wrote:
> On Wed, 19 May 2004, Jean-Luc Menut wrote:
> > Hello,
> > 
> > I hope i'm writing in the good mailing list.
> Yes, that's a good one;-)
> > I have a problem when I build  scipy on my alpha (unix : OSF1):
> > 
> > After the compilation of python 2.2.3, the installation of Numeric 22.0 
> > and F2PY-2.39.235, i install the binary of atlas 3.4.1 (for OSF1 of 
> > course). When  i run python setup.py build, there is a lot a compilation 
> > but after a moment it's stop :
> > 
> > I have this error  message :
> > 
> > g++ -shared -expect_unresolved * build/temp.osf1-V5.1-alpha-2.2/vq_wrap.o 
>                                 ^^^
> This 'star' is causing all the trouble: all files in the current directory 
> (.txt files etc) are passed to g++. Could you find out where this 
> 'star' comes from? Can you build other extension modules than of scipy?

I've had similiar problems compiling on Tru64. The -expect_unresolved
"*" (note the quotes) comes from Python's Makefile -- that option is
needed for the linker to work properly. The quotes are getting stripped
off somewhere.

I worked around this by writing wrapper scripts for cc (I use
DEC's/Compaq's/HP's compiler), and ld. By setting the CC and LDSHARED
environment variables (after editing
usr/lib/python2.3/distutils/sysconfig.py to allow overriding LDSHARED),
the wrapper scripts could make the right calls.

You'll want something like this:

#!/usr/bin/env python
import sys
import os
command = 'g++ -shared -expect_unresolved "*" ' + ' '.join(sys.argv[1:])
print '>>>', command
w = os.system(command)

(and similiar for ld). Call it cc-wrapper and ldshared-wrapper, and put
them in your path, and call like this
$ CC=cc-wrapper LDSHARED=ldshared-wrapper python ./setup.py build

[I didn't have the time to fix the underlying quote problem, hence the

Hope this helps.

|David M. Cooke                      http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca

More information about the SciPy-user mailing list