added mingw64 installation instruction, and library file copy. (#2977)
* added mingw64 installation instruction, and library file copy. * Change all `libxgboost.dll` to `xgboost.dll` On Windows, the library file is called `xgboost.dll`, not `libxgboost.dll` as in the build doc previously
This commit is contained in:
parent
874525c152
commit
b99f56e386
24
doc/build.md
24
doc/build.md
@ -4,7 +4,7 @@ Installation Guide
|
|||||||
This page gives instructions on how to build and install the xgboost package from
|
This page gives instructions on how to build and install the xgboost package from
|
||||||
scratch on various systems. It consists of two steps:
|
scratch on various systems. It consists of two steps:
|
||||||
|
|
||||||
1. First build the shared library from the C++ codes (`libxgboost.so` for linux/osx and `libxgboost.dll` for windows).
|
1. First build the shared library from the C++ codes (`libxgboost.so` for Linux/OSX and `xgboost.dll` for Windows).
|
||||||
- Exception: for R-package installation please directly refer to the R package section.
|
- Exception: for R-package installation please directly refer to the R package section.
|
||||||
2. Then install the language packages (e.g. Python Package).
|
2. Then install the language packages (e.g. Python Package).
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ even better to send pull request if you can fix the problem.
|
|||||||
|
|
||||||
Our goal is to build the shared library:
|
Our goal is to build the shared library:
|
||||||
- On Linux/OSX the target library is `libxgboost.so`
|
- On Linux/OSX the target library is `libxgboost.so`
|
||||||
- On Windows the target library is `libxgboost.dll`
|
- On Windows the target library is `xgboost.dll`
|
||||||
|
|
||||||
The minimal building requirement is
|
The minimal building requirement is
|
||||||
|
|
||||||
@ -112,6 +112,20 @@ All the following steps are in the `Git Bash`.
|
|||||||
|
|
||||||
In MinGW, `make` command comes with the name `mingw32-make`. You can add the following line into the `.bashrc` file.
|
In MinGW, `make` command comes with the name `mingw32-make`. You can add the following line into the `.bashrc` file.
|
||||||
|
|
||||||
|
> if you don't have a MinGW installed on your machine and you are using *Windows x86_64*. try to download one From
|
||||||
|
|
||||||
|
> [https://sourceforge.net/projects/mingw-w64/](https://sourceforge.net/projects/mingw-w64/)
|
||||||
|
|
||||||
|
> after the installation, add the path of your installation to the system *env* properties.
|
||||||
|
|
||||||
|
> the installation path added to your *env* properties should be pointed to the `bin` folder, like:
|
||||||
|
|
||||||
|
> `C:\Program Files\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin`
|
||||||
|
|
||||||
|
> for users using *Windows 32*, try to find a *mingw32* version instead.
|
||||||
|
|
||||||
|
> you are ok to follow the below instructions.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
alias make='mingw32-make'
|
alias make='mingw32-make'
|
||||||
```
|
```
|
||||||
@ -130,7 +144,7 @@ cd build
|
|||||||
cmake .. -G"Visual Studio 12 2013 Win64"
|
cmake .. -G"Visual Studio 12 2013 Win64"
|
||||||
```
|
```
|
||||||
|
|
||||||
This specifies an out of source build using the MSVC 12 64 bit generator. Open the .sln file in the build directory and build with Visual Studio. To use the Python module you can copy libxgboost.dll into python-package\xgboost.
|
This specifies an out of source build using the MSVC 12 64 bit generator. Open the .sln file in the build directory and build with Visual Studio. To use the Python module you can copy `xgboost.dll` into python-package\xgboost.
|
||||||
|
|
||||||
Other versions of Visual Studio may work but are untested.
|
Other versions of Visual Studio may work but are untested.
|
||||||
|
|
||||||
@ -148,7 +162,7 @@ $ cd build
|
|||||||
$ cmake .. -DUSE_CUDA=ON
|
$ cmake .. -DUSE_CUDA=ON
|
||||||
$ make -j
|
$ make -j
|
||||||
```
|
```
|
||||||
**Windows requirements** for GPU build: only Visual C++ 2015 or 2013 with CUDA v8.0 were fully tested. Either install Visual C++ 2015 Build Tools separately, or as a part of Visual Studio 2015. If you already have Visual Studio 2017, the Visual C++ 2015 Toolchain componenet has to be installed using the VS 2017 Installer. Likely, you would need to use the VS2015 x64 Native Tools command prompt to run the cmake commands given below. In some situations, however, things run just fine from MSYS2 bash command line.
|
**Windows requirements** for GPU build: only Visual C++ 2015 or 2013 with CUDA v8.0 were fully tested. Either install Visual C++ 2015 Build Tools separately, or as a part of Visual Studio 2015. If you already have Visual Studio 2017, the Visual C++ 2015 Toolchain componenet has to be installed using the VS 2017 Installer. Likely, you would need to use the VS2015 x64 Native Tools command prompt to run the cmake commands given below. In some situations, however, things run just fine from MSYS2 bash command line.
|
||||||
|
|
||||||
On Windows, using cmake, see what options for Generators you have for cmake, and choose one with [arch] replaced by Win64:
|
On Windows, using cmake, see what options for Generators you have for cmake, and choose one with [arch] replaced by Win64:
|
||||||
```bash
|
```bash
|
||||||
@ -169,6 +183,8 @@ If build seems to use only a single process, you might try to append an option l
|
|||||||
|
|
||||||
### Windows Binaries
|
### Windows Binaries
|
||||||
|
|
||||||
|
After the build process successfully ends, you will find a `xgboost.dll` library file inside `./lib/` folder, copy this file to the the API package folder like `python-package/xgboost` if you are using *python* API. And you are good to follow the below instructions.
|
||||||
|
|
||||||
Unofficial windows binaries and instructions on how to use them are hosted on [Guido Tapia's blog](http://www.picnet.com.au/blogs/guido/post/2016/09/22/xgboost-windows-x64-binaries-for-download/)
|
Unofficial windows binaries and instructions on how to use them are hosted on [Guido Tapia's blog](http://www.picnet.com.au/blogs/guido/post/2016/09/22/xgboost-windows-x64-binaries-for-download/)
|
||||||
|
|
||||||
### Customized Building
|
### Customized Building
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user