nvcc error : 'cicc' died with status 0xC0000005 (ACCESS_VIOLATION) when building tensorflow with bazel - tensorflow

I am trying to build Tensorflow 1.14.0 dll. I am using bazel 0.24.1 to do it. I also use cuDNN 7.1.4 and CUDA 9.0.I want it to use Visual C++ Build Tools 2015, but when running bazel to build dll:
bazel build --config=cuda tensorflow:tensorflow.dll,
by default in LIB and INCLUDE variables path C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023 is set. I then get bunch of errors like C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include\xutility(796): error: expression must have a constant value. Build failes with error: nvcc error : 'cicc' died with status 0xC0000005 (ACCESS_VIOLATION).
I tried to set:
set BAZEL_VS=C:\Program Files (x86)\Microsoft Visual Studio 14.0
set BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
but error still occurs. Any ideas?

I finally got a solution. You can force correct paths by setting following environment variables:
CPU_COMPILER = ('C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe')
GCC_HOST_COMPILER_PATH = ('C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe')
just before running
bazel build --config=cuda tensorflow:tensorflow.dll
in commandline. It's best to do it in Powershell, as there is a problem with spaces/apostrophes in paths when using Windows commandline.

Related

Error compile Visual Studio 2019 Project dll with MSBuild 2019, obfuscating with Eazfuscator NET 2018.2 in TeamCity 2020.2.2

I have this error when TeamCity Build Step compile with obfuscating a Visual Studio dll Project with MSBuild:
EXEC: error: Error occurred during processing of input file '.dll' -> Cannot load file or assembly 'zx_2cba06c4237a413ea1e8116e71ad61dc, PublicKeyToken = 6205972ab2f0fc68' or one of its dependencies. The system cannot find the specified file. C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets (5473,5): error MSB3073: The command "if /I "Release" == "Release" "C:\Program Files (x86)\Eazfuscator.NET\Eazfuscator.NET.exe" "E:\Builds\MyDll\bin\Release\MyDll.dll" --msbuild-project-path "E:\Builds\MyDll\MyDll.csproj" --msbuild-project-configuration "Release" --msbuild-project-platform "AnyCPU" --msbuild-solution-path "*Undefined*" -n --newline-flush -v 2018.2" exit with code 1.
Eazfuscator-.NET-2018.2.2 is not compatible with MSBuild 2019, the solution is use Eazfuscator-.NET-2019.1 as minimun version.

Google GMOCK build libgmock.a under windows

I try to build the gmock library from google under windows, avialable on github from here:
https://github.com/google/googletest/tree/master/googlemock
I tried to use cmake in the cygwin console, but I could not build it.
cmake C:\Users\Username\Downloads\googlemock-master\googlemock-master\googlemock
"CMake Error: The source directory "C:UsersSETDownloadsgooglemock-mastergooglemock-mastergooglemock" does not exist.
Specify --help for usage, or press the help button on the CMake GUI."
Then I installed visual studio 2017 and opened the gmock.sln file, but also this build failed.
"Error C1083: "gtest/internal/gtest-linked_ptr.h": No such file or directory gmock C:\Users\Username\Downloads\googlemock-master\googlemock-master\googlemock\include\gmock\internal\gmock-port.h"
Does anyone have an idea how I could build this library under windows 10?
Edit: Ok, for cmake the path needs to have /../ and not ..\, but i still don't get which path I need to include in cmake
Very simple:
Under the googlemock folder, create a new folder, named build (for example);
cd build && cmake ..
Basically, you're creating a new folder for the build (preferably inside the project tree, but not necessary), cd into it, and run cmake <dir>, where <dir> is the path to CMakeLists.txt, which contains the recipe for generating the build.
That's it. Now you'll have a generated gmock.sln, which you could build with Visual Studio.
For CMake to generate Visual Studio projects, you should have the Visual Studio binaries and Windows SDK reachable from your PATH.
Finally, you need to specify a generator, using CMake's -G parameter, for telling CMake which Visual Studio version you'd like projects to be generated for.
Example of putting this together:
set PATH="C:\Program Files\Microsoft Visual Studio 14.0\VC\bin";"c:\Program Files\Windows Kits\8.1\bin\x86";%PATH%
cd build
cmake -G "Visual Studio 14 2015" ..
For additional instructions, you may refer to googletest github page:
https://github.com/google/googletest/blob/master/googletest/README.md#using-cmake

Compiling clang/LLVM on win results in compile errors - how to fix?

I've stumbled upon problems installing clang/LLVM on my Win 7 64-bit machine for setting up Emscripten in my Visual Studio 2010 Setup. I was following the official howto from Emscripten at https://github.com/kripken/emscripten/wiki/Using-Emscripten-on-Windows and stumbled into problems regarding the needed compilation of clang/LLVM.
svn co http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_32/final llvm
cd llvm\tools
svn co http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_32/final clang
cd ..\\..
mkdir build
cmake -G "Visual Studio 10" ..\llvm
msbuild LLVM.sln /p:Configuration=Release
The result is alot of errors similiar to this one:
CUSTOMBUILD : error : error reading '10.0\VC\bin\llvm\tools\clang\test\Index\
pch-opaque-value.cpp' [c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\b
in\build\tools\clang\test\check-clang.vcxproj]
CUSTOMBUILD : error : error reading '10.0\VC\bin\llvm\tools\clang\test\Index\
pch-with-errors.m' [c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\
build\tools\clang\test\check-clang.vcxproj]
Obviously, a path starting at
'10.0\VC...' is totally invalid.. its missing the 'C:\Program Files (x86)\Microsoft Visual Studio ' in front.. (I've checked there is a file like that in test\Index\ - it is!
My question is: how do I fix that ?
a) Can I setup an additional include path that is like 'C:\folder\MS Visual ' (including space) ?
What I have tried so far:
a) Doing it from Visual Studio Prompt and normal Prompt. Using default and custom location.
b) Running MSBUILD like
msbuild LLVM.sln /p:Configuration=Release /p:"VCBuildAdditionalOptions= C:\Program Files (x86)\Microsoft Visual Studio "
c) Trying to change PATH/Systemroot.. Destroyed my systemroot in the meantime for unknown reasons (It complaimed about a wrong path like "C:\Program " and erased it obviously).
I am seriously stuck and dont know any further than these steps. Setting up an include path does not seem to help - though I'm wondering if the CMAKE stuff had problems with space's or what is going on.
Since the authors of Emscripten and probably LLVM call their windows support "experimental", I'm not the only one having troubles trying to set up LLVM/clang for later use with Visual Studio 2010 (not 2012..). I'm sorry for the bad formatting, for some reason SO won't allow me neat formatting today.. I'm using a nightly browser build though.
If you just need a build of LLVM, you can generate NMake Makefiles and build with nmake instead of msbuild. It seems that there is a quoting issue somewhere (might be CMake, CmakeLists.txt, msbuild, who knows).
On second thought, this might be a problem with environment variables. How did you set up PATH? Try from a new "Visual Studio Developer Command Prompt".

which Qt environnement do I install to compile and run qtify project?

I would like to compile and run the qtify project to see a consequent exemple using desktop components.This project use:
import QtQuick 2.0 // I must have Qt 5 or later
import QtDesktop 1.0 // I search an extension which compile with Qt 5.1
I have just installed Qt 5.1.alpha this morning, and I would like to install a compatible version of "Qt-desktop-components" wich support QtDesktop 1.0.
My QtCreator version is 2.7.0.
I tried to install this version of qtdesktopcomponent but when I compile with:
`qmake && nmake install`
I've got this error: (This comand is used in Visual Studio Command Prompt (2010) )
C:\Users\Luciole\Downloads\desktop-component\qtquickcontrols>qmake && nmake
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe" -
f Makefile.Debug
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
cl -c -nologo -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 -DUNIC
ODE -DWIN32 -DQT_NO_EXCEPTIONS -DQT_GUI_LIB -DQT_CORE_LIB -I"." -I"C:\Users\Luci
ole\Downloads\qt-everywhere-opensource-src-5.1.0-alpha\qtbase\include" -I"C:\Use
rs\Luciole\Downloads\qt-everywhere-opensource-src-5.1.0-alpha\qtbase\include\QtG
ui" -I"C:\Users\Luciole\Downloads\qt-everywhere-opensource-src-5.1.0-alpha\qtbas
e\include\QtCore" -I".moc\debug_shared" -I"C:\Users\Luciole\Downloads\qt-everywh
ere-opensource-src-5.1.0-alpha\qtbase\mkspecs\win32-msvc2010" -Fo.obj\debug_shar
ed\ #C:\Users\Luciole\AppData\Local\Temp\nm54D2.tmp
main.cpp
tools\qmlwidget\main.cpp(43) : fatal error C1083: Cannot open include file: 'QtQ
ml': No such file or directory
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
The value of my PATH is:
C:\Users\Luciole\Downloads\qt-everywhere-opensource-src-5.1.0-alpha\qtbase\qmake;C:\Users\Luciole\Downloads\qt-everywhere-opensource-src-5.1.0-alpha\qtbase\bin;C:\Qt\qtcreator 2.7.0\bin;C:\Git\cmd;C:\Python27;C:\Ruby200;C:\Perl64\site\bin;C:\Perl64\bin;
And I've verified: I don't have "QtQml.h" in my Qt.5.1.alpha installation.
What do you think about this? Can you help me to resolve this bug, or can you tell me which version of Qt and qtdesktopcomponent to use? (with the link of the repository please)
Please refer this link, You don't have to install Qt Desktop, it is included in the package. Name has been change from Qt Desktop Components to Qt Quick Controls
Edit:
Documentation snapshot can find from here

Visual C++ Express 2010: "attempting to build a Win32 application from an x64-environment"

1) ran "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd /x64 /Debug" to set environment variables.
2) ran "vcexpress" from that command prompt. The reason for starting from the command prompt is so that the correct compiler and linker are detected. Otherwise they defaulted to x86_amd64 when vcexpress is run from the start menu.
3) attempted to build my project, a SuperBuild generated by CMake which calls msbuild to compile some static solution files. Received this error:
You are attempting to build a Win32 application from an x64-environment.
If using the Windows 7.1 SDK build environment, type setenv / x86
The solution was to change the TARGET_CPU variable. When setenv /x64 /debug was run, it set:
C:\Temp\cmakeex\build>echo %TARGET_CPU%
x64
I changed this to amd64, and the project now builds successfully:
>set TARGET_CPU=amd64