Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17267 Discussions

Compile error with alteracl.lib using mingw-w64 on Windows 10

Altera_Forum
Honored Contributor II
4,118 Views

Hello! I am trying to compile an open-source project with the Intel OpenCL FPGA SDK 17.0 and an Arria 10 board on Windows 10 using mingw-w64. I got an error when the makefile run a command looks like: 

 

g++ ./host/main.o ../common/ocl_util.o ../common/timer.o -o run.exe -LC:/intelFPGA_pro/17.0/hld/board/a10_ref/windows64/lib -LC:/intelFPGA_pro/17.0/hld/host/windows64/lib -laltera_a10_ref_mmd -lalteracl -lacl_emulator_kernel_rt -lpkg_editor -llibelf -lacl_hostxml 

 

and I got an error saying like: 

 

C:/intelFPGA_pro/17.0/hld/host/windows64/lib/alteracl.lib(d:/SJ/nightly/17.0/290/w64/acds/hld/obj/windows64/acl/acl_program.obj):(.text[l_build_from_source_in_dir]+0xa2): undefined reference to `__imp__wassert' 

C:/intelFPGA_pro/17.0/hld/host/windows64/lib/alteracl.lib(d:/SJ/nightly/17.0/290/w64/acds/hld/obj/windows64/acl/acl_program.obj):(.text[l_load_binary_pkg]+0xb36): undefined reference to `__security_check_cookie' 

C:/intelFPGA_pro/17.0/hld/host/windows64/lib/alteracl.lib(d:/SJ/nightly/17.0/290/w64/acds/hld/obj/windows64/acl/acl_program.obj):(.xdata[$unwind$l_compute_hash]+0x10): undefined reference to `__GSHandlerCheck' 

(too long and get truncated; only repeating these 3 errors.) 

 

I google these errors and they turn out to be related to some MS Visual C++ libraries. I wonder if Visual Studio is the only way to go (can I still use mingw-w64?)? If mingw is OK, how can I fix these bugs? 

 

The link to the open-source project is posted here for your reference: https://github.com/doonny/pipecnn

 

Thanks in advance!!
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
3,201 Views

I don't think you can use MinGW for this purpose. Altera/Intel only officially support MS Visual Studio on Windows. These libraries that are missing seem to be only provided by Visual Studio: 

 

https://sourceforge.net/p/mingw-w64/mailman/message/26971441/
0 Kudos
Altera_Forum
Honored Contributor II
3,201 Views

hi, 

 

If you do not want to purchase a costly VS2010, do consider to use the centos 6.8/6.9 as Gcc compiler do not need additional license. There is a plan to make vs2015 in the windows support list in the future but now still only with vs2010. 

 

 

 

Regards, 

CloseCL 

(This message was posted on behalf of Intel Corporation)
0 Kudos
Altera_Forum
Honored Contributor II
3,201 Views

 

--- Quote Start ---  

I don't think you can use MinGW for this purpose. Altera/Intel only officially support MS Visual Studio on Windows. These libraries that are missing seem to be only provided by Visual Studio: 

 

https://sourceforge.net/p/mingw-w64/mailman/message/26971441/ 

--- Quote End ---  

 

 

Thank you for the suggestion! I use reimp+dlltool to generate .a files from those .lib files and now the problem is solved. Here's the instruction I followed (in Chinese): 

 

https://zhoujianshi.github.io/articles/2017/mingw%20gcc%e4%bd%bf%e7%94%a8vc++%e7%9a%84%e9%9d%99%e6%80%81%e9%93%be%e6%8e%a5%e5%ba%93/index.html 

 

You can get reimp from here if you are interested: 

 

http://www.mingw.org/wiki/msvc_and_mingw_dlls
0 Kudos
Altera_Forum
Honored Contributor II
3,201 Views

 

--- Quote Start ---  

hi, 

 

If you do not want to purchase a costly VS2010, do consider to use the centos 6.8/6.9 as Gcc compiler do not need additional license. There is a plan to make vs2015 in the windows support list in the future but now still only with vs2010. 

 

 

 

Regards, 

CloseCL 

(This message was posted on behalf of Intel Corporation) 

--- Quote End ---  

 

 

Thank you for your advice! Is the OpenCL SDK for FPGA supported on centos 6.8? I thought it's supported on Redhat.
0 Kudos
Altera_Forum
Honored Contributor II
3,201 Views

 

--- Quote Start ---  

Thank you for your advice! Is the OpenCL SDK for FPGA supported on centos 6.8? I thought it's supported on Redhat. 

--- Quote End ---  

 

 

It is supported on both CentOS and RedHat 6.x.
0 Kudos
Reply