【问题标题】:Fail when building xgboost using 64-bit mingw g++使用 64 位 mingw g++ 构建 xgboost 时失败
【发布时间】:2016-03-27 17:37:38
【问题描述】:

我想在 64 位 Windows 10 中为 Anaconda Python 3.x 编译 xgboost,所以我按照这里的步骤 - https://xgboost.readthedocs.org/en/latest/build.html#building-on-windows 和这里 - Install xgboost under python with 64-bit msys failing。使用 64 位 mingw g++,在使用 mingw64.mk “make -j4”时收到以下错误消息:

g++: error: dmlc-core/libdmlc.a: No such file or directory
g++: error: rabit/lib/librabit_empty.a: No such file or directory
Makefile:120: recipe for target 'lib/libxgboost.dll' failed
mingw32-make: *** [lib/libxgboost.dll] Error 1

您能否告诉我发生了什么以及如何解决这个问题?

非常感谢。

【问题讨论】:

    标签: python c++ python-3.x mingw-w64 xgboost


    【解决方案1】:

    你必须先进入 dmlc-core 和 rabit 子目录并在那里执行 make。然后来到xgboost库,执行build.sh。

    【讨论】:

      【解决方案2】:

      运行安装时,您可能不在正确的文件夹中。请尝试以下操作。

      拉起 Anaconda 提示符,运行:

      cd xgboost\python-package  
      python setup.py install 
      

      如果仍然失败,请从头开始尝试the process in this link,它应该可以工作。引用链接:

      首先按照官方指南按照以下步骤进行操作(在 Git Windows 上的 Bash):

      git clone --recursive https://github.com/dmlc/xgboost
      git submodule init
      git submodule update
      

      然后在此处安装 TDM-GCC 并在 Git Bash 中执行以下操作:

      alias make='mingw32-make'
      cp make/mingw64.mk config.mk; make -j4
      

      最后,使用 anaconda 提示符或 Git Bash 执行以下操作:

      cd xgboost\python-package  
      python setup.py install
      

      【讨论】:

        【解决方案3】:

        您的目录中缺少这些库。您必须递归地克隆 xgboost 以包含它们。只需按照安装指南中提到的克隆过程就可以了!

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2013-06-02
          • 2016-01-31
          • 2013-11-16
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多