在 Windows 32 位上编译 scipy:libf77blas.a 出现链接器错误

发布于 2024-08-27 16:43:31 字数 2991 浏览 3 评论 0原文

有没有人尝试使用 numpy-1.3.0 在 Windows 上编译 SciPy 0.7.1,该 numpy-1.3.0 是使用 安装文档

我收到以下链接器错误,并且不知道如何解决此问题。

$ python setup.py config --compiler=mingw32 build --compiler=mingw32 install --root=i
[...]
creating build\temp.win32-2.6\Release
creating build\temp.win32-2.6\Release\scipy
creating build\temp.win32-2.6\Release\scipy\integrate
compile options: '-DNO_ATLAS_INFO=2 -I"C:\Documents and Settings\apy\Application Data\Python\Python26\site-packages\numpy\core\inc
lude" -IC:\Python26\include -IC:\Python26\PC -c'
gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes -DNO_ATLAS_INFO=2 -I"C:\Documents and Settings\apy\Application Data\Python\Python26\
site-packages\numpy\core\include" -IC:\Python26\include -IC:\Python26\PC -c scipy\integrate\_odepackmo
dule.c -o build\temp.win32-2.6\Release\scipy\integrate\_odepackmodule.o
C:\MinGW\bin\g77.exe -g -Wall -mno-cygwin -g -Wall -mno-cygwin -shared build\temp.win32-2.6\Release\scipy\integrate\_odepackmodule
.o -LC:\atlas3.6.0_WinNT_P4SSE2 -LC:\MinGW\lib -LC:\MinGW\lib\gcc\mingw32\3.4.5 -LC:\Python26\libs -LC:\Act
ivePython32Python26\PCbuild -Lbuild\temp.win32-2.6 -lodepack -llinpack_lite -lmach -latlas -lcblas -lf77blas -llapack -lpython26 -
lg2c -o build\lib.win32-2.6\scipy\integrate\_odepack.pyd
C:\atlas3.6.0_WinNT_P4SSE2/libf77blas.a(ATL_F77wrap_daxpy.o):ATL_F77wrap_axpy.c:(.text+0x3c): undefined reference to `ATL
_daxpy'
C:\atlas3.6.0_WinNT_P4SSE2/libf77blas.a(ATL_F77wrap_dscal.o):ATL_F77wrap_scal.c:(.text+0x26): undefined reference to `ATL
_dscal'
C:\atlas3.6.0_WinNT_P4SSE2/libf77blas.a(ATL_F77wrap_dcopy.o):ATL_F77wrap_copy.c:(.text+0x3d): undefined reference to `ATL
_dcopy'
C:\atlas3.6.0_WinNT_P4SSE2/libf77blas.a(ATL_F77wrap_idamax.o):ATL_F77wrap_amax.c:(.text+0x1e): undefined reference to `AT
L_idamax'
C:\atlas3.6.0_WinNT_P4SSE2/libf77blas.a(ATL_F77wrap_ddot.o):ATL_F77wrap_dot.c:(.text+0x36): undefined reference to `ATL_d
dot'
collect2: ld returned 1 exit status
error: Command "C:\MinGW\bin\g77.exe -g -Wall -mno-cygwin -g -Wall -mno-cygwin -shared build\temp.win32-2.6\Release\scipy\integrat
e\_odepackmodule.o -LC:\atlas3.6.0_WinNT_P4SSE2 -LC:\MinGW\lib -LC:\MinGW\lib\gcc\mingw32\3.4.5 -LC:\Python
26\libs -LC:\Python26\PCbuild -Lbuild\temp.win32-2.6 -lodepack -llinpack_lite -lmach -latlas -lcblas -lf77blas -llap
ack -lpython26 -lg2c -o build\lib.win32-2.6\scipy\integrate\_odepack.pyd" failed with exit status 1

有谁知道这里可能出了什么问题?例如,在 libf77blas.a 中查找 ATL_daxpy 的结果是:

$ strings libf77blas.a  | grep -i daxpy
_daxpy_
_atl_f77wrap_daxpy_
ATL_F77wrap_daxpy.o/
daxpy.o/        1081731936  1003  513   100755  420       `
daxpy.f
_daxpy_
_atl_f77wrap_daxpy_
_atl_f77wrap_daxpy_
_ATL_daxpy

_ATL_daxpy,但没有 ATL_daxpy

Has anyone tried compiling SciPy 0.7.1 on Windows using numpy-1.3.0 that was built with the pre-built ATLAS libraries (atlas3.6.0_WinNT_P4SSE2.zip) linked in the installation document.

I get the following linker error, and have no ideas as to how to fix this issue.

$ python setup.py config --compiler=mingw32 build --compiler=mingw32 install --root=i
[...]
creating build\temp.win32-2.6\Release
creating build\temp.win32-2.6\Release\scipy
creating build\temp.win32-2.6\Release\scipy\integrate
compile options: '-DNO_ATLAS_INFO=2 -I"C:\Documents and Settings\apy\Application Data\Python\Python26\site-packages\numpy\core\inc
lude" -IC:\Python26\include -IC:\Python26\PC -c'
gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes -DNO_ATLAS_INFO=2 -I"C:\Documents and Settings\apy\Application Data\Python\Python26\
site-packages\numpy\core\include" -IC:\Python26\include -IC:\Python26\PC -c scipy\integrate\_odepackmo
dule.c -o build\temp.win32-2.6\Release\scipy\integrate\_odepackmodule.o
C:\MinGW\bin\g77.exe -g -Wall -mno-cygwin -g -Wall -mno-cygwin -shared build\temp.win32-2.6\Release\scipy\integrate\_odepackmodule
.o -LC:\atlas3.6.0_WinNT_P4SSE2 -LC:\MinGW\lib -LC:\MinGW\lib\gcc\mingw32\3.4.5 -LC:\Python26\libs -LC:\Act
ivePython32Python26\PCbuild -Lbuild\temp.win32-2.6 -lodepack -llinpack_lite -lmach -latlas -lcblas -lf77blas -llapack -lpython26 -
lg2c -o build\lib.win32-2.6\scipy\integrate\_odepack.pyd
C:\atlas3.6.0_WinNT_P4SSE2/libf77blas.a(ATL_F77wrap_daxpy.o):ATL_F77wrap_axpy.c:(.text+0x3c): undefined reference to `ATL
_daxpy'
C:\atlas3.6.0_WinNT_P4SSE2/libf77blas.a(ATL_F77wrap_dscal.o):ATL_F77wrap_scal.c:(.text+0x26): undefined reference to `ATL
_dscal'
C:\atlas3.6.0_WinNT_P4SSE2/libf77blas.a(ATL_F77wrap_dcopy.o):ATL_F77wrap_copy.c:(.text+0x3d): undefined reference to `ATL
_dcopy'
C:\atlas3.6.0_WinNT_P4SSE2/libf77blas.a(ATL_F77wrap_idamax.o):ATL_F77wrap_amax.c:(.text+0x1e): undefined reference to `AT
L_idamax'
C:\atlas3.6.0_WinNT_P4SSE2/libf77blas.a(ATL_F77wrap_ddot.o):ATL_F77wrap_dot.c:(.text+0x36): undefined reference to `ATL_d
dot'
collect2: ld returned 1 exit status
error: Command "C:\MinGW\bin\g77.exe -g -Wall -mno-cygwin -g -Wall -mno-cygwin -shared build\temp.win32-2.6\Release\scipy\integrat
e\_odepackmodule.o -LC:\atlas3.6.0_WinNT_P4SSE2 -LC:\MinGW\lib -LC:\MinGW\lib\gcc\mingw32\3.4.5 -LC:\Python
26\libs -LC:\Python26\PCbuild -Lbuild\temp.win32-2.6 -lodepack -llinpack_lite -lmach -latlas -lcblas -lf77blas -llap
ack -lpython26 -lg2c -o build\lib.win32-2.6\scipy\integrate\_odepack.pyd" failed with exit status 1

Does anyone know what could have gone wrong here? Looking for ATL_daxpy, for example, in libf77blas.a resulted in:

$ strings libf77blas.a  | grep -i daxpy
_daxpy_
_atl_f77wrap_daxpy_
ATL_F77wrap_daxpy.o/
daxpy.o/        1081731936  1003  513   100755  420       `
daxpy.f
_daxpy_
_atl_f77wrap_daxpy_
_atl_f77wrap_daxpy_
_ATL_daxpy

There is _ATL_daxpy, but no ATL_daxpy.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只想待在家 2024-09-03 16:43:31

我们的安装说明已经过时了。首先,您应该使用二进制安装程序,除非您有充分的理由不在 Windows 上使用。这里你链接的是一个 ATLAS,它与 numpy 本身构建的版本不同,这不太可能很好地工作(numpy 和 scipy 将使用不同版本的 atlas)。

假设您有充分的理由自行构建它,您可以在 我们仓库的供应商目录

Our installation instructions are awfully out of date. First, you should use the binary installer unless you have a very good reason not to on windows. Here you are linking against an ATLAS which is different than the one numpy itself was built on, which is unlikely to work well (numpy and scipy would use different versions of atlas).

Assuming you have a good reason to build it by yourself, you can get the atlas binaries we use in the binary installers in the vendor directory of our repo.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文