oneApi 2021.4 xilink: : error : Assertion failed (shared/driver/drvutils.c line 312) - intel-oneapi

Using newly installed oneAPI 2021.4 + VisualStudio 16.11.3.
Create new project - Console App -
#include <iostream>
int main() {std::cout << "Hello World!\n";}
After rebuilding I get:
Rebuild started...
1>------ Rebuild All started: Project: xilink, Configuration: Debug
Win32 ------ 1>xilink: : error : Assertion failed
(shared/driver/drvutils.c, line 312) 1>Done building project
"xilink.vcxproj" -- FAILED.
Tried on many other projects, x32 and x64, other VS versions - the error is the same.
I have found workaround - I copied file xilink.exe from older version 2021.2 to 2021.4 folder - and linking start working!
C:\Program Files
(x86)\Intel\oneAPI\compiler\2021.2.0\windows\bin\intel64\xilink.exe
was copied to
C:\Program Files
(x86)\Intel\oneAPI\compiler\2021.4.0\windows\bin\intel64\xilink.exe
(and intel64_ia32 was copied too..)

The issue raised by you has been fixed in Intel oneAPI 2022.1 version. Please download and let us know if this resolves your issue.
As a workaround you can copy a file clang.exe (by default it is located in C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\bin) to the folder with xilink (for x64 configuration it is in C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\bin\intel64).

Related

What is the cause for this invalid path issue when trying to run cpp protocol buffer compiler from CMake on Windows 10 and how can I solve it?

I'm trying to build the aasdk project on a Windows 10 computer. To do this, I am attempting to run the following commands in the root of the git repo directory:
mkdir buildDir
cd buildDir
cmake ..\
cmake --build . --config Release
The last command is obviously the one that's failing. I get the following output when I run that command:
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041.
-- Found libusb-1.0:
-- - Includes: C:/libusb-master/x64/Release
-- - Libraries: C:/libusb-master/x64/Release/lib/libusb-1.0.lib
-- Configuring done
-- Generating done
-- Build files have been written to: C:/aasdk-development/buildDir
Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(200
,5): warning MSB8062: Custom build for item "C:\aasdk-development\buildDir\CMakeFiles\b2b8e2a3c1aae1e014a7c3c3f8aadde7\AVCha
nnelData.pb.h.rule" specifies invalid path "C:\aasdk-development\buildDir\aasdk_proto\protobuf::protoc" as an additional dep
endency. This may cause incremental build to work incorrectly. [C:\aasdk-development\buildDir\aasdk_proto\aasdk_proto.vcxpro
j]
...
Running cpp protocol buffer compiler on C:/aasdk-development/aasdk_proto/AVChannelData.proto
The filename, directory name, or volume label syntax is incorrect.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(238
,5): error MSB8066: Custom build for 'C:\aasdk-development\buildDir\CMakeFiles\b2b8e2a3c1aae1e014a7c3c3f8aadde7\AVChannelDat
a.pb.h.rule;...' exited
with code 123. [C:\aasdk-development\buildDir\aasdk_proto\aasdk_proto.vcxproj]
Where ... is the same message repetead for each *.proto file inside aasdk_proto directory. From what I can tell, it seems it thinks some paths are invalid. What I can't tell, is which paths and in what way are they invalid.
After the first comment, I decided to check where it gets those paths. Below is the content of the CMakeLists.txt for protobuf, found in the aasdk_proto directory:
include(FindProtobuf)
find_package(Protobuf REQUIRED)
include_directories(${PROTOBUF_INCLUDE_DIR})
file(GLOB_RECURSE proto_files ${CMAKE_CURRENT_SOURCE_DIR}/*.proto)
protobuf_generate_cpp(proto_sources proto_headers ${proto_files})
add_library(aasdk_proto SHARED ${proto_headers} ${proto_sources})
target_link_libraries(aasdk_proto ${PROTOBUF_LIBRARIES})
Of interest is the 5th line which enumerates all the *.proto files in the relevant directory before calling protobuf_generate_cpp, the part which I believe to be causing the errors.
Adding message(STATUS ProtoFiles: ${proto_files}) after line 5 to print the paths yielded correct values, atleast to my eyes:
C:/aasdk-development/aasdk_proto/AbsoluteInputEventData.proto;C:/aasdk-development/aasdk_proto/AbsoluteInputEventData.proto;...
I replaced the forward slash with a backslash just for giggles, since that's how Windows likes them, but that didn't work.
I'm a bit late, but for anyone still having this problem, I ran into a similar issue while building CuraEngine, and found the cause. In my case, I had to set the path to protoc.exe with both variables PROTOC and Protobuf_PROTOC_EXECUTABLE. (I had only set PROTOC and CMake didn't throw any errors.)
I imagine the situation with aasdk must be similar. Some variable (probably PROTOBUF_PROTOC_EXECUTABLE?) that tells the location of protoc.exe must be missing.

CMake generation problem with Visual Studio 2017

Using cmake from command line, I got:
"== Building Windows-Release =="
-- Building for: Visual Studio 15 2017
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_C_COMPILER could be found.
CMake Error at CMakeLists.txt:2 (project):
No CMAKE_CXX_COMPILER could be found.
Where CMakeError.log contain:
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 31/12/2018 12:54:05.
Project "C:\myproj\CMakeFiles\3.13.1\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug\".
Creating directory "Debug\CompilerIdC.tlog\".
InitializeBuildStatus:
Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe /c /nologo /W0 /WX- /Od /Oy- /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc140.pdb" /Gd /TC /analyze- /errorReport:queue CMakeCCompilerId.c
CMakeCCompilerId.c
c1 : fatal error C1083: Cannot open source file: 'CMakeCCompilerId.c': No such file or directory [C:\myproj\CMakeFiles\3.13.1\CompilerIdC\CompilerIdC.vcxproj]
Done Building Project "C:\myproj\CMakeFiles\3.13.1\CompilerIdC\CompilerIdC.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\myproj\CMakeFiles\3.13.1\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
(ClCompile target) ->
c1 : fatal error C1083: Cannot open source file: 'CMakeCCompilerId.c': No such file or directory [C:\myproj\CMakeFiles\3.13.1\CompilerIdC\CompilerIdC.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.43
...
I tried repairing the installation of Visual Studio, and renstalling CMake, but nothing seems to work it. Also looked at similar thread here, but nothing was helpful.
I met the exact same question with you. After a very very long struggle, I finally find the solution for me. I am not sure whether that is the same problem you met, but I still want to write and recode this strange problem.
Firstly, I also reinstall cmake, repair the VS and add many components in it and fixed(brake) many PATH environments, but all of them don't work, and I bet the problem is not because of these problems.
As the two messages:
The C compiler identification is unknown
The CXX compiler identification is unknown
They do not exactly mean the cmake don't detect the VS compiler, it just means that the cmake's use it to build its demo but fail. And from the errorlog, I even can believe your VS has already installed success and work well. The only problem is that the compiler can't open the 'CMakeCCompilerId.c' file.
I don't know whether have your check the .c file is exactly in the project location, but it is in there very well in my computer (otherwise, it means that the cmake failed to create this file, and maybe you need to open it as an administration)
I am very confused about why the compiler can't read that and try to directly open the .vcxproj file in VS and change many settings but still get the same error, like below.
After some try, I move the project to the desktop and reopen it, then it builds success! So as the whole cmake project. I am also be shocked by that.
After some compare and research, I found error reason in me, I am using the git in windows-wsl to clone the project to my windows file system(it has a little risk to break the file permission in wsl), it works well in normal, but as a cmake cross-compilation, I guess it may use some linux-like way to operate files and therefore meet some file permission problem.
So, the final solution to me is using the git in cmd or download the whole project in the browser instead of using the git in wsl. (Truly a little funny-. and may differ with your situation)
Hope these can help you.
The reason for my problem turned out to be that case sensitivity was turned on in the current directory.
Turn off case sensitivity or switch to another directory.

Deploy to azure error

I've tried to deploy virtocommerce to azure following the steps available at http://docs.virtocommerce.com/display/vc1devguide/Source+Code+Azure+Deployment , but I'm getting some errors during the build...
MSBUILD 4.0 Path = C:\Windows\Microsoft.NET\Framework\v4.0.30319\
03/03/2015 17:21:12 - Solution Build: In progress
Version: 1.0.62.1721
Microsoft (R) Build Engine version 4.0.30319.33440
[Microsoft .NET Framework, version 4.0.30319.34014]
Build started 03/03/2015 17:21:12.
1>Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\VirtoCommerce.sln" on node 1 (clean target(s)).
1>ValidateSolutionConfiguration:
Building solution configuration "Release|Any CPU".
ValidateProjects:
The project "Performance.FunctionalTests" is not selected for building in solution configuration "Release|Any CPU".
The target "MSDeployPublish" listed in a BeforeTargets attribute at "C:\code\github\VirtoCommerceCommunity\vc-community-master\packages\Microsoft.Web.WebJobs.Publish.1.0.2\tools\webjobs.wap.targets (89,11)" does not exist in the project, and will be ignored.
The target "MSDeployPublish" listed in an AfterTargets attribute at "C:\code\github\VirtoCommerceCommunity\vc-community-master\packages\Microsoft.Web.WebJobs.Publish.1.0.2\tools\webjobs.wap.targets (156,11)" does not exist in the project, and will be ignored.
1>Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\VirtoCommerce.sln" (1) is building "C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WorkerRoles\Scheduler\AzureScheduler\AzureScheduler.ccproj" (61) on node 7 (Clean target(s)).
C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WorkerRoles\Scheduler\AzureScheduler\AzureScheduler.ccproj(68,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.4\Microsoft.WindowsAzure.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
61>Done Building Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WorkerRoles\Scheduler\AzureScheduler\AzureScheduler.ccproj" (Clean target(s)) -- FAILED.
1>Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\VirtoCommerce.sln" (1) is building "C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WebRoles\Frontend\CommerceSite\CommerceSite.ccproj" (62) on node 2 (Clean target(s)).
62>C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WebRoles\Frontend\CommerceSite\CommerceSite.ccproj(71,3): error MSB4019: The imported project "**C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.4\Microsoft.WindowsAzure.targets**" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
62>Done Building Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WebRoles\Frontend\CommerceSite\CommerceSite.ccproj" (Clean target(s)) -- FAILED.
1>Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\VirtoCommerce.sln" (1) is building "C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WorkerRoles\Search\ElasticSearch\ElasticSearch.ccproj" (66) on node 6 (Clean target(s)).
66>C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WorkerRoles\Search\ElasticSearch\ElasticSearch.ccproj(70,3): error MSB4019: The imported project "**C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.4\Microsoft.WindowsAzure.targets**" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
66>Done Building Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WorkerRoles\Search\ElasticSearch\ElasticSearch.ccproj" (Clean target(s)) -- FAILED.
1>Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\VirtoCommerce.sln" (1) is building "C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Extensions\Jobs\SchedulerConsole\SchedulerConsole.csproj" (69) on node 1 (Clean target(s)).
69>C:\code\github\VirtoCommerceCommunity\vc-community-master\packages\Microsoft.Web.WebJobs.Publish.1.0.2\tools\webjobs.console.targets(25,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Extensions\Jobs\SchedulerConsole\SchedulerConsole.csproj]
69>Done Building Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Extensions\Jobs\SchedulerConsole\SchedulerConsole.csproj" (Clean target(s)) -- FAILED.
1>Done Building Project "C:\code\github\VirtoCommerceCommunity\vc-community-master\VirtoCommerce.sln" (clean target(s)) -- FAILED.
Build FAILED.
"C:\code\github\VirtoCommerceCommunity\vc-community-master\VirtoCommerce.sln" (clean target) (1) ->
"C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WorkerRoles\Scheduler\AzureScheduler\AzureScheduler.ccproj" (Clean target) (61) ->
C:\code\github\VirtoCommerceCommunity\vc-community-master\src\Azure\WorkerRoles\Scheduler\AzureScheduler\AzureScheduler.ccproj(68,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.4\Microsoft.WindowsAzure.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
...
Build Failed
At C:\code\github\VirtoCommerceCommunity\vc-community-master\src\extensions\Setup\VirtoCommerce.PowerShell\azure-deploy.ps1:445 char:11
+ throw "Build Failed"
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Build Failed:String) [], RuntimeException
+ FullyQualifiedErrorId : Build Failed
I've tried from different machines (Windows 8.1 and Windows Server 2012), both with Visual Studio 2013, and found the same error...
Interesting that on both machines the directory C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools does not exists...
The Azure Tools only exists at the \VisualStuion\v12.0 directory...
How could we solve this?
Thanks in advance!
The issue seems to be related how msbuild is packaged with VS.NET 2013 (http://blog.maskalik.com/msbuild/2014/03/04/changes-in-msbuild-with-visual-studio-2013/). In order for powershell deploy to work out of the box, VS.NET 2012 needs to be installed. The workaround is to modify azure-deploy.ps1 to point to the MSBuild from VS.NET 2013 instead of .NET SDK.
So change line 426 from
$global:buildexe_path = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" -Name MSBuildToolsPath).MSBuildToolsPath
to (simply changed 4.0 to 12.0)
$global:buildexe_path = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\12.0" -Name MSBuildToolsPath).MSBuildToolsPath
It will be included in the next patch once it passes our CI.

How can I use Mono's xbuild to build a TypeScript project on Linux?

I'm developing this project with Visual Studio on Windows, but I've had no problems compiling it with xbuild on Linux until I added some files that need to be built with TypeScript. Specifically, a set of .ts files are compiled to produce app.js, which is then included as an embedded resource. The build works in VS, but with xbuild I get this:
$ xbuild Guncho.sln
XBuild Engine Version 12.0
Mono, Version 3.10.0.0
Copyright (C) 2005-2013 Various Mono authors
Build started 12/23/2014 13:00:53.
__________________________________________________
Project "/home/guncho/test-guncho/Guncho.sln" (default target(s)):
Target ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
Target Build:
Project "/home/guncho/test-guncho/Guncho.Site/Guncho.Site.csproj" (default target(s)):
Target PrepareForBuild:
Configuration: Debug Platform: AnyCPU
Target CopyNonResxEmbeddedResources:
/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets: error : Cannot copy /home/guncho/test-guncho/Guncho.Site/app/app.js to /home/guncho/test-guncho/Guncho.Site/obj/Debug/Guncho.Site.app.app.js, as the source file doesn't exist.
/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets: error : Cannot copy /home/guncho/test-guncho/Guncho.Site/app/app.js.map to /home/guncho/test-guncho/Guncho.Site/obj/Debug/Guncho.Site.app.app.js.map, as the source file doesn't exist.
Task "Copy" execution -- FAILED
Done building target "CopyNonResxEmbeddedResources" in project "/home/guncho/test-guncho/Guncho.Site/Guncho.Site.csproj".-- FAILED
Done building project "/home/guncho/test-guncho/Guncho.Site/Guncho.Site.csproj".-- FAILED
Task "MSBuild" execution -- FAILED
Done building target "Build" in project "/home/guncho/test-guncho/Guncho.sln".-- FAILED
Done building project "/home/guncho/test-guncho/Guncho.sln".-- FAILED
Build FAILED.
It's not even attempting the TypescriptCompile step. The build works if I manually run tsc to generate app.js, but what do I need to do to get it working automatically?

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