Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Win10 build error: gtest, no 'object' file generated #14378

Open
Bleach665 opened this issue Mar 9, 2019 · 10 comments
Open

Win10 build error: gtest, no 'object' file generated #14378

Bleach665 opened this issue Mar 9, 2019 · 10 comments

Comments

@Bleach665
Copy link

System and tools: Win 10 x64 Enterprise 2016 LTSB, VS 2017 15.9.8, CMake 3.13, mxnet rev ed83071.

Build configured via CMake gui. BUILD_TESTING flag was disabled.
Builded using msbuild tools:
msbuild mxnet.sln /p:configuration=debug /m

Error received:
"C:\Lib\mxnet\prebuild_x64\mxnet.sln" (default target) (1) -> "C:\Lib\mxnet\prebuild_x64\3rdparty\googletest\googletest\gtest.vcxproj.metaproj" (default target) (5) -> "C:\Lib\mxnet\prebuild_x64\3rdparty\googletest\googletest\gtest.vcxproj" (default target) (11) -> (ClCompile target) -> C:\Lib\mxnet\source\3rdparty\googletest\googletest\include\gtest/internal/gtest-port.h(996): error C2220: warning treated as error - no 'object' file generated [C:\Lib\mxnet\prebuild_x64\3rdparty\googletest\googletest\gtest.vcxproj]

@mxnet-label-bot
Copy link
Contributor

Hey, this is the MXNet Label Bot.
Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it.
Here are my recommended labels: Installation, Build

@andrewfayres
Copy link
Contributor

Thanks for the issue. Looks like a problem finding a 3rd party package. When you cloned the repo did you use the --recursive flag?

Here's a link to the build from source instructions just in case.

@mxnet-label-bot add [Installation, Windows, Build]

@lanking520
Copy link
Member

lanking520 commented Mar 12, 2019

@mxnet-label-bot add [installation, Windows, build]

@Bleach665
Copy link
Author

Yes, --recursive flag was used.
And just now I did reproduce this bug on another computer with same software.

@stereomatchingkiss
Copy link

Yes, --recursive flag was used.
And just now I did reproduce this bug on another computer with same software.

Don't try to build mxnet1.4.0, it is broken, I suggest you build mxnet1.3.1, it is still broken on windows 10, but unless with a lot of efforts, you can build it.

Please check this blog if you want to know how to build mxnet1.3.1 on windows.

@Bleach665
Copy link
Author

Bleach665 commented Mar 16, 2019

@stereomatchingkiss , but I successfully build mxnet with ed83071 rev. With mkl, mkl blas, cuda, cudnn, opencv... However, I have not used it yet. Is it possible that the bugs will appear when it will be used?
And thanks for the great guide.

PS. Gtest I skip during the build.

@stereomatchingkiss
Copy link

stereomatchingkiss commented Mar 16, 2019

but I successfully build mxnet with ed83071

It is a good news if you can build it on windows. How do you solve the issues of #13958 and #14343? I can build mxnet(1.3.1) with mkl too, problems is it always throw exception at runtime if you do the inference task by cpu(by gpu is fine).

ed83071 is a bit newer than 1.4.0, wonder if they fix the build issues on windows already?I am still waiting next stable release.

@Bleach665
Copy link
Author

I did not make any changes to the code. As for Cmake, I do not remember exactly what changes I made to the configuration, but for sure nothing is critically important. Probably all of these issues were already fixed below or it was depend on VS version (my 2017, you as I understand 2015).

@stereomatchingkiss
Copy link

Probably all of these issues were already fixed below or it was depend on VS version (my 2017, you as I understand 2015).

I don't use vc2017, since it always break support about cuda.

@ChaiBapchya
Copy link
Contributor

ChaiBapchya commented Oct 2, 2019

Is this related to issue found in pipeline for unrelated PR #16328

http://jenkins.mxnet-ci.amazon-ml.com/blue/organizations/jenkins/mxnet-validation%2Fwindows-cpu/detail/PR-16328/2/pipeline

[  5%] Building CXX object 3rdparty/googletest/googletest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.obj

gtest_main.cc

C:\jenkins_slave\workspace\build-cpu-mkl\3rdparty\googletest\googletest\include\gtest/gtest.h(1405): fatal error C1090: PDB API call failed, error code '23': '(

jom: C:\jenkins_slave\workspace\build-cpu-mkl\build\3rdparty\googletest\googletest\CMakeFiles\gtest_main.dir\build.make 

[3rdparty\googletest\googletest\CMakeFiles\gtest_main.dir\src\gtest_main.cc.obj] Error 2


[  5%] Linking CXX static library dmlc.lib

jom: C:\jenkins_slave\workspace\build-cpu-mkl\build\CMakeFiles\Makefile2 [3rdparty\googletest\googletest\CMakeFiles\gtest_main.dir\all] Error 2


jom: C:\jenkins_slave\workspace\build-cpu-mkl\build\Makefile [all] Error 2


Traceback (most recent call last):

  File "ci/build_windows.py", line 264, in <module>

    sys.exit(main())

  File "ci/build_windows.py", line 252, in main

    windows_build(args)

  File "ci/build_windows.py", line 162, in windows_build

    check_call(cmd, shell=True)

  File "C:\Python37\lib\subprocess.py", line 347, in check_call

    raise CalledProcessError(retcode, cmd)

subprocess.CalledProcessError: Command '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat" && jom' returned non-zero exit status 2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants