[Numpy-discussion] Distutils: using different linker options for c++ and c code
David Cournapeau
david at ar.media.kyoto-u.ac.jp
Thu Apr 17 23:16:39 EDT 2008
David Cournapeau wrote:
>
> Distutils uses some tests function to see wether a particular set of
> float functions is available (FUNCTIONS_TO_CHECK dict in
> numpy/core/setup.py), detects a particular set is not available on mingw
> (say 'HAVE_INVERSE_HYPERBOLIC'), and define all of them. The problem is
> that they are available in the library, just not declared (I remember
> because at first, when I built the core with numscons, I only detected
> functions by linking to them, and I had discrepancies between numscons
> config.h and distutils config.h: that's why I now use both declaration
> and presence detection in the m library).
>
> Concretely, some redefinition from static to non static; but that's just
> a configuration problem I think.
To be more precise, here is what I get with gcc 4.1.2 on windows (sorry
for the buggy copy-and-paste, but I am surprised I can copy from windows
in linux at all):
gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes
-Ibuild\src.win32-2.5\numpy\core\src -Inumpy\core\include
-Ibuild\src.win32-2.5\numpy\core -Inumpy\core\src -Inumpy\cor
e\include -IC:\Python25\include -IC:\Python25\PC -IC:\Python25\include
-IC:\Python25\PC -c build\src.win32-2.5\numpy\core\src\umathmodule.c -o
build\temp.win32-2.5\R
elease\build\src.win32-2.5\numpy\core\src\umathmodule.o
numpy\core\src\umathmodule.c.src:128: error: static declaration of
'acoshf' follows non-static declaration
numpy\core\src\umathmodule.c.src:136: error: static declaration of
'asinhf' follows non-static declaration
error: Command "gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes
-Ibuild\src.win32-2.5\numpy\core\src -Inumpy\core\include
-Ibuild\src.win32-2.5\numpy\core -Inumpy\core
\src -Inumpy\core\include -IC:\Python25\include -IC:\Python25\PC
-IC:\Python25\include -IC:\Python25\PC -c
build\src.win32-2.5\numpy\core\src\umathmodule.c -o build\
temp.win32-2.5\Release\build\src.win32-2.5\numpy\core\src\umathmodule.o"
failed with exit status 1
cheers,
David
More information about the NumPy-Discussion
mailing list