Intel® High Level Design
Support for Intel® High Level Synthesis Compiler, DSP Builder, OneAPI for Intel® FPGAs, Intel® FPGA SDK for OpenCL™
702 Discussions

Cannot run HLS Compile example "counter"

sThei
Beginner
6,252 Views

Hi,

 

I've got a similar error like here:

https://forums.intel.com/s/question/0D50P00003yyTceSAE/intel-hls-can-not-generate-execution-file?

 

I tried to run the example "counter":

cd C:\intelFPGA_pro\18.1\hls

init_hls.bat (->The i++ compiler is now available at 'C:\intelFPGA_pro\18.1\hls\bin\' (through your %Path%))

cd C:\intelFPGA_pro\18.1\hls\examples\counter

build.bat test-x86-64

i++ -march=x86-64 counter.cpp -o test-x86-64.exe c:/program files (x86)/microsoft visual studio 14.0/vc/bin/link.exe : fatal error LNK1107: invalid or corrupt file: cannot read at 0x320 HLS Link x86-64 FAILED. Run test-x86-64.exe to execute the test.

Any suggestions on how to solve that problem?

I'm using:

Quartus Prime 18.1.0 Patch 0.04

VS 2015 Update 3

Win 10 64Bit

 

0 Kudos
11 Replies
sThei
Beginner
4,739 Views
******************************************************* i++ debug log file This file contains diagnostic information. Any errors or unexpected behavior encountered when running i++ should be reported as bugs. Thank you. ******************************************************* Compiler Command: i++ -march=Arria10 counter.cpp -o test-fpga.exe 2019.01.14.16:23:17 Info: Doing: qsys-script --script=count.tcl --quartus-project=none 2019.01.14.16:23:21 Info: create_system count 2019.01.14.16:23:21 Info: set_project_property HIDE_FROM_IP_CATALOG false 2019.01.14.16:23:21 Info: set_project_property DEVICE_FAMILY Arria10 2019.01.14.16:23:21 Info: Info: The device and speed grade is changed to the defaults of the device family, Arria10. 2019.01.14.16:23:21 Info: set_project_property DEVICE 10AX115U1F45I1SG 2019.01.14.16:23:21 Info: add_instance count_internal_inst count_internal 2019.01.14.16:23:22 Info: set_instance_property count_internal_inst AUTO_EXPORT true 2019.01.14.16:23:22 Info: save_system count.ip 2019.01.14.16:23:29 Info: Saving generation log to C:/intelFPGA_pro/18.1/hls/examples/counter/test-fpga.prj/components/count/count/count_generation.rpt 2019.01.14.16:23:29 Info: Generated by version: 18.1 build 222 2019.01.14.16:23:29 Info: Starting: Create HDL design files for synthesis 2019.01.14.16:23:29 Info: qsys-generate C:\intelFPGA_pro\18.1\hls\examples\counter\test-fpga.prj\components\count\count.ip --synthesis=VERILOG --output-directory=C:\intelFPGA_pro\18.1\hls\examples\counter\test-fpga.prj\components\count\count --family="Cyclone 10 GX" --part=Unknown 2019.01.14.16:23:29 Warning: count_internal_inst: Invalid device family name in input file: Arria 10 2019.01.14.16:23:29 Warning: count_internal_inst: Invalid device name in input file: 10AX115U1F45I1SG 2019.01.14.16:23:29 Error: count: Component count_internal_inst does not support selected device family Cyclone 10 GX 2019.01.14.16:23:29 Error: qsys-generate failed with exit code 3: 1 Error, 2 Warnings 2019.01.14.16:23:29 Info: Finished: Create HDL design files for synthesis 2019.01.14.16:23:29 Info: Starting: IP-XACT 2019.01.14.16:23:29 Info: qsys-generate C:\intelFPGA_pro\18.1\hls\examples\counter\test-fpga.prj\components\count\count.ip --synthesis=VERILOG --ipxact --output-directory=C:\intelFPGA_pro\18.1\hls\examples\counter\test-fpga.prj\components\count\count --family="Cyclone 10 GX" --part=Unknown 2019.01.14.16:23:29 Info: Finished: IP-XACT

 

0 Kudos
Kenny_Tan
Moderator
4,739 Views
My guess is something to do with the setup. Just to have a fast confirmation 1) Are you following the HLS starting guide guide ? did you run the init_hls.bat first? User need to run this *.bat before any compilation as it will setup the environment. 2) Did you installed the VS 2010? when you manually go to the path c:/program files (x86)/microsoft visual studio 10.0/vc/bin/link.exe , did you see the link.exe file is present? 3) This error is saying user is adding a 32 bit link file for usage which is incorrect, HLS have to use the 64 bit link file. \VC\bin\amd64\link.exe
sThei
Beginner
4,739 Views

Hi,

 

and thank you for your answer.

 

1) I followed the HLS starting guide and ran the init_hls.bat.

2) I'm using Quartus Prime Pro 18.1 with patch 0.04. That is why I installed VS 2015. File C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe is present.

3) File C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\link.exe is also present. I changed my PATH variable to C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\ and rebooted (!).

 

Problem is solved, but was followed by the linker not possible to find 'msvcprt.lib'. I had to set the include and lib path:

Set INCLUDE="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include;C:\intelFPGA_pro\18.1\hls\include;"   Set LIB="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib;"

Now the problem is:

In file included from counter.cpp:1: C:/intelFPGA_pro/18.1/hls/include\HLS/hls.h:16:10: fatal error: 'type_traits' file not found #include <type_traits> ^~~~~~~~~~~~~ 1 error generated. HLS x86-64 compile FAILED. Run test-x86-64.exe to execute the test.

 

 

 

 

0 Kudos
Prince_J_Intel
Employee
4,740 Views

I am trying to reproduce the error but not able to do it so far. Can you please try opening the terminal 'x64 Native Tools Command Prompt' command window available in the Microsoft Visual Studio installation.

Then run init_hls.bat in that window.

And then try running counter example build.bat.

 

0 Kudos
sThei
Beginner
4,740 Views

Same problem.

C:/intelFPGA_pro/18.1/hls/include\HLS/hls.h:16:10: fatal error: 'type_traits' file not found

If I copy the "type_traits" file to "examples/counter" it can be found. Next problem is, that it cannot find the "xstddef" file. Looks like the linker cannot find files in "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include".

0 Kudos
Prince_J_Intel
Employee
4,740 Views

-- adding this comment again with images attached.image1-with error.PNG

i am able to reproduce the issue. See the attached image which shows same error of LNK1107. This is because you are not using the command prompt i suggested. This leads to not recoginizing the correct visual studio libraries. see the blue encircled name of the command window.

 

Use below window instead. You can see that all works greats with no issues.

image2-correctexecution.PNG

 

0 Kudos
Prince_J_Intel
Employee
4,740 Views

i am able to reproduce the issue. See the attached image which shows same error of LNK1107. This is because you are not using the command prompt i suggested. This leads to not recoginizing the correct visual studio libraries. see the blue encircled name of the command window.

Use below window instead. You can see that all works greats with no issues.

 

 

 

0 Kudos
sThei
Beginner
4,740 Views

Hi again,

I'm using the correct command promt but realized that my VS2015 installations seems to be incorrect. The command promt now shows "ERROR: Cannot determine the location of the VS installation." (which ist strange, because the 2015 command promt is there).

 

I'll take care about that problem and let you know the result.

Thanks again :)

0 Kudos
sThei
Beginner
4,740 Views

https://stackoverflow.com/questions/31680687/vs2015-msbuild-vsvars32-bat-cannot-determine-the-location-of-the-vs-instal/32362758#32362758?newreg=719165246695482593609b0b824423b8

 

solution from "Jagd" solved my problem. A registry entry pointed to /Program Files/ but the full VS2015 installation is in /Program Files(x86)/.

0 Kudos
tim4
Novice
4,447 Views

Hi, 

i have same problem, could you tell me more detail about how to solve this problem?

 

thx~~ 

 
0 Kudos
jjl3
Beginner
4,740 Views

will post new one

0 Kudos
Reply