Open qingyuanxingsi opened 6 years ago
I think you can try to use Visual Studio instead. In fact, compiling by "Visual Studio" could be very simple after you get familiar with the tool. You can try to follow the Windows Installation Guide. It uses VS2015 + CMake.
@sxjscience
Actually I have tried build mxnet cpp package in various platforms, including linux, mac os and Windows, however it is really painful to build mxnet in Windows. Linux and mac works quite fine.
Building mxnet cpp package using VS 2017 got following error:
9>"Running: python OpWrapperGenerator.py F:/tools/mxnet/vs_build/Debug/libmxnet.dll"
10>------ 已启动生成: 项目: mlp, 配置: Debug x64 ------
11>------ 已启动生成: 项目: alexnet, 配置: Debug x64 ------
12>------ 已启动生成: 项目: charRNN, 配置: Debug x64 ------
13>------ 已启动生成: 项目: googlenet, 配置: Debug x64 ------
14>------ 已启动生成: 项目: inception_bn, 配置: Debug x64 ------
15>------ 已启动生成: 项目: lenet, 配置: Debug x64 ------
16>------ 已启动生成: 项目: lenet_with_mxdataiter, 配置: Debug x64 ------
17>------ 已启动生成: 项目: mlp_cpu, 配置: Debug x64 ------
10>mlp.cpp
12>charRNN.cpp
13>googlenet.cpp
17>mlp_cpu.cpp
14>inception_bn.cpp
11>alexnet.cpp
15>lenet.cpp
13>LINK : fatal error LNK1104: 无法打开文件“mxnet_static.lib”
17>LINK : fatal error LNK1104: 无法打开文件“mxnet_static.lib”
14>LINK : fatal error LNK1104: 无法打开文件“mxnet_static.lib”
10>LINK : fatal error LNK1104: 无法打开文件“mxnet_static.lib”
13>已完成生成项目“googlenet.vcxproj”的操作 - 失败。
17>已完成生成项目“mlp_cpu.vcxproj”的操作 - 失败。
10>已完成生成项目“mlp.vcxproj”的操作 - 失败。
14>已完成生成项目“inception_bn.vcxproj”的操作 - 失败。
18>------ 已启动生成: 项目: cpp_package_deploy_library, 配置: Debug x64 ------
19>------ 已启动生成: 项目: mlp_gpu, 配置: Debug x64 ------
20>------ 已启动生成: 项目: resnet, 配置: Debug x64 ------
12>LINK : fatal error LNK1104: 无法打开文件“mxnet_static.lib”
15>LINK : fatal error LNK1104: 无法打开文件“mxnet_static.lib”
19>mlp_gpu.cpp
12>已完成生成项目“charRNN.vcxproj”的操作 - 失败。
15>已完成生成项目“lenet.vcxproj”的操作 - 失败。
11>LINK : fatal error LNK1104: 无法打开文件“mxnet_static.lib”
11>已完成生成项目“alexnet.vcxproj”的操作 - 失败。
19>LINK : fatal error LNK1104: 无法打开文件“mxnet_static.lib”
19>已完成生成项目“mlp_gpu.vcxproj”的操作 - 失败。
21>------ 已跳过生成: 项目: INSTALL, 配置: Debug x64 ------
21>没有为此解决方案配置选中要生成的项目
========== 生成: 成功 2 个,失败 10 个,最新 7 个,跳过 9 个 ==========
Much thanks!
I haven’t tried VS2017 and MinGW. I’ve only successfully compiled the package using VS2015. You can try the same software configurations as described in the doc.
@sxjscience
OK, I can download VS 2015 and give it a try! Can anyone in the team give some instructions on building mxnet using MinGW/MinGW-w64/cygwin??
Hm, I'm not sure about the build messages you've posted, but I assume that cpp package build is broken on windows. Can you try building with -DUSE_CPP_PACKAGE=0 if you don't need it for now?
I will check the windows build.
@lebeg When can the windows build be fixed??Actually I do need the cpp package! Inform me if fixed, much thanks!
I encountered the similar error when I was building the cpp package examples in VS2015
Totally forgot about this issue, did this get resolved?
@lebeg I didn't give it a second try, if there is no modification to the build script, the issue remains.
@lebeg I'm having the same bug.. I'm trying to compile mxnet for Windows 10 from VS2015. without DUSE_CPP_PACKAGE mxnet compile perfectly, with cpp package it doesnt..
I think the problem here is something with the DLL. when I run the OpWrapperGenerator.py file it output an error "OSError: [WinError 126] The specified module could not be found" I checked if the first argument is the dll, and it exists in the right path..
What if you try a suggestion from https://github.com/apache/incubator-mxnet/issues/10543 - make sure you have python and all needed modules installed and it's on the PATH and that you run 2 consecutive builds - 1 without cpp package and another with.
Description
Trying to build mxnet cpp package in Windows 7 using MinGW-w64, meeting following error.
Environment info (Required)
Windows 7
Build info (Required if built from source)
Compiler (gcc/clang/mingw/visual studio): mingw-w64
MXNet commit hash: 661bcef3204f18ff4cb1879f06b3767fe9d226b5
Build config:
CMakeLists.txt
CMAKE Info
Error Message:
Minimum reproducible example
(If you are using your own code, please provide a short script that reproduces the error. Otherwise, please provide link to the existing example.)
Steps to reproduce
(Paste the commands you ran that produced the error.)
1. 2.
What have you tried to solve it?
1.Remove MXNET_DLL in this line https://github.com/apache/incubator-mxnet/blob/master/src/c_api/c_api.cc#L387, which triggered a bug during compilation 2.