【问题标题】:Building issue of Scikit-learn Python library in Windows [duplicate]在 Windows 中构建 Scikit-learn Python 库的问题 [重复]
【发布时间】:2013-07-12 18:22:21
【问题描述】:

我正在尝试为 Python 构建 scikit-learn 库,它在 Windows 32 位系统中将构建文件作为 c++ 文件。构建时出现以下错误。

undefined reference to `__sync_fetch_and_add_4'

c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: build\temp
.win32-2.7\Release\sklearn\ensemble\_gradient_boosting.o: bad reloc address 0x0
in section `.data'
collect2.exe: error: ld returned 1 exit status
error: Command "g++ -shared build\temp.win32-2.7\Release\sklearn\ensemble\_gradi
ent_boosting.o -LC:\Python27\libs -LC:\Python27\PCbuild -Lbuild\temp.win32-2.7 -
lpython27 -lmsvcr90 -o build\lib.win32-2.7\sklearn\ensemble\_gradient_boosting.p
yd" failed with exit status 1

这是什么原因?关于未定义的引用,第一行是什么意思? 我该如何解决这个问题?

【问题讨论】:

    标签: c++ windows gcc compiler-construction build


    【解决方案1】:

    您的问题缺少很多基本信息,例如您使用的 Python 版本,但我猜错误消息是 2.7。您是否尝试在任何其他平台上构建它?我听说 Fedora 非常适合这类东西。

    【讨论】:

    • 是否包含 blas?我发现是 blas 的不可用导致了这个错误。
    猜你喜欢
    • 1970-01-01
    • 2013-06-05
    • 2020-04-04
    • 2013-07-20
    • 2019-02-03
    • 2019-01-12
    • 2015-05-04
    • 2019-06-08
    • 2017-04-26
    相关资源
    最近更新 更多