[PYTHON MATRIX-SIG] Strange problem importing Numeric

Konrad Hinsen hinsen@ibs.ibs.fr
Fri, 24 Jan 1997 10:01:41 +0100


> FWIW, I've just installed NumPy on SunOS 4.1.3 and had a problem
> building it dynamically. Compilation went fine, but loading ranlib or
> fftpack caused python to quit: ld gave up, complaining it couldn't find
> _sqrt, and for fftpack ld can't find _acos. The problem goes away if I
> link fast_umath/umath statically. So... the math lib wasn't satisfying
> any references when python was being linked, and so wasn't being linked
> in?

The interpreter itself doesn't need the math functions, they are only
in modules like math and umath. Besides, even if they were linked with
the interpreter, that doesn't mean they would be also be visible to
shared libraries (details vary with operating systems).

So you should always link the shared libraries themselves with -lm if
they need math functions. If libm itself is a shared library (as it
is on most modern systems) there is no disadvantage, since it will
be loaded only once.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-4.76.88.99.28
Institut de Biologie Structurale       | Fax:  +33-4.76.88.54.94
41, av. des Martyrs                    | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France         | Nederlands/Francais
-------------------------------------------------------------------------------

_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________