Ubuntu 17.10上的Vivado HLS 2017.3 csim错误

时间:2017-11-17 16:45:47

标签: vivado vivado-hls

Vivado HLS未能在kubuntu 17.10上编译c测试台代码,同样的项目在Windows 10下完美编译。在Kubuntu和Windows上,解决方案合成,只有ubuntu上的SIM卡失败。

从日志文件中我认为vivado将其gcc4.6.3与系统gcc库混合,有人可以帮我避免这种情况。

此致

INFO: [SIM 2] *************** CSIM start ***************
INFO: [SIM 4] CSIM will launch GCC as the compiler.
   Compiling(apcc) ../../../Source/circuito_tb.c in debug mode
INFO: [HLS 200-10] Running '/opt/Xilinx/Vivado/2017.3/bin/unwrapped/lnx64.o/apcc'
INFO: [HLS 200-10] For user 'ernesto' on host 'eco-laptop' (Linux_x86_64 version 4.13.0-16-generic) on Fri Nov 17 16:32:27 CET 2017
INFO: [HLS 200-10] On os Ubuntu 17.10
INFO: [HLS 200-10] In directory '/home/ernesto/home/uc3m/asignaturas/SubsistemasAD/VivadoHLS_Homework/CruzOliveraErnesto_VivadoHLS_Homework/default/csim/build'
ERROR: [APCC 202-3] Gcc Compile failed: 
In file included from /opt/Xilinx/Vivado/2017.3/lnx64/tools/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.3/include-fixed/features.h:339:0,
                 from /usr/include/setjmp.h:25,
                 from /tmp/apcc_db_ernesto/185171510932747310469/circuito_tb.c:3:
/usr/include/x86_64-linux-gnu/sys/cdefs.h:459:49: error: missing binary operator before token "("
In file included from /opt/Xilinx/Vivado/2017.3/lnx64/tools/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.3/include-fixed/limits.h:169:0,
                 from /opt/Xilinx/Vivado/2017.3/lnx64/tools/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.3/include-fixed/syslimits.h:7,
                 from /opt/Xilinx/Vivado/2017.3/lnx64/tools/gcc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.3/include-fixed/limits.h:34,
                 from /tmp/apcc_db_ernesto/185171510932747310469/circuito_tb.c:4:
/usr/include/limits.h:145:17: error: missing binary operator before token "("
In file included from /tmp/apcc_db_ernesto/185171510932747310469/circuito_tb.c:12:0:
/usr/include/stdio.h:276:43: error: missing binary operator before token "("
/usr/include/stdio.h:349:17: error: missing binary operator before token "("
/usr/include/stdio.h:567:17: error: missing binary operator before token "("
/usr/include/stdio.h:592:43: error: missing binary operator before token "("
In file included from /tmp/apcc_db_ernesto/185171510932747310469/circuito_tb.c:13:0:
/usr/include/string.h:164:21: error: missing binary operator before token "("
/usr/include/string.h:173:43: error: missing binary operator before token "("
In file included from /tmp/apcc_db_ernesto/185171510932747310469/circuito_tb.c:14:0:
/usr/include/stdlib.h:131:36: error: missing binary operator before token "("
/usr/include/stdlib.h:174:17: error: missing binary operator before token "("
/usr/include/stdlib.h:188:36: error: missing binary operator before token "("
In file included from /tmp/apcc_db_ernesto/185171510932747310469/circuito_tb.c:15:0:
/usr/include/math.h:44:36: error: missing binary operator before token "("
/usr/include/math.h:59:17: error: missing binary operator before token "("
/usr/include/math.h:67:36: error: missing binary operator before token "("
In file included from /tmp/apcc_db_ernesto/185171510932747310469/circuito_tb.c:15:0:
/usr/include/math.h:137:17: error: missing binary operator before token "("
In file included from /tmp/apcc_db_ernesto/185171510932747310469/circuito_tb.c:15:0:
/usr/include/math.h:169:17: error: missing binary operator before token "("
In file included from /usr/include/math.h:224:0,
                 from /tmp/apcc_db_ernesto/185171510932747310469/circuito_tb.c:15:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:112:17: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:289:17: error: missing binary operator before token "("
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:344:17: error: missing binary operator before token "("
In file included from /tmp/apcc_db_ernesto/185171510932747310469/circuito_tb.c:15:0:
/usr/include/math.h:314:18: error: missing binary operator before token "("
/usr/include/math.h:479:17: error: missing binary operator before token "("
/usr/include/math.h:826:17: error: missing binary operator before token "("
ERROR: [APCC 202-3] Tmp directory is /tmp/apcc_db_ernesto/185171510932747310469
ERROR: [APCC 202-1] APCC failed.
csim.mk:79: recipe for target 'obj/circuito_tb.o' failed
make: *** [obj/circuito_tb.o] Error 1
CRITICAL WARNING: [SIM 100] 'csim_design' failed: compilation error(s).
INFO: [SIM 3] *************** CSIM finish ***************

2 个答案:

答案 0 :(得分:1)

Vivado HLS捆绑了相当旧的gcc版本,其标头与您的系统不匹配。对我而言,当我将glibc升级到版本2.26时,就发生了这种情况。

降级系统glibc可能会有危险。最安全的解决方案是切换到clang,直到Xilinx更新捆绑gcc。您可以在Project - >找到此选项。 Project Settings - > Simulation - > Compiler

如果您的计算机中尚未安装clangsudo apt-get install clang应该可以完成此任务。

答案 1 :(得分:0)

您需要重建标题。确保使用您的Vivado HLS版本更新目录。

cd /opt/Xilinx/Vivado_HLS/2015.2/lnx64/tools/gcc/libexec/gcc/x86_64-unknown-linux-gnu/4.6.3/install-tools; ./mkheaders /opt/Xilinx/Vivado_HLS/2015.2/lnx64/tools/gcc/

来源:Blob Storage Documentation