Ошибки csim Vivado HLS 2017.3 в Ubuntu 17.10

Vivado HLS не удалось скомпилировать код тестового стенда c на kubuntu 17.10, этот же проект прекрасно компилируется под Windows 10. На Kubuntu и Windows решения синтезируются, на ubuntu не работает только сим.

из файла журнала я думаю, что 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 ***************

person ECO    schedule 17.11.2017    source источник


Ответы (2)


В комплекте с Vivado HLS идет довольно старая gcc версия, и ее заголовки не совпадают с заголовками вашей системы. У меня это произошло, когда я обновил glibc до версии 2.26.

Понижение версии glibc вашей системы может быть опасным. Самое безопасное решение — переключиться на clang, пока Xilinx не обновит пакет gcc. Вы можете найти эту опцию по адресу Project -> Project Settings -> Simulation -> Compiler.

Если clang еще не установлен на вашем компьютере, sudo apt-get install clang должен выполнить эту работу.

person galanom    schedule 11.12.2017
comment
спасибо за ваш ответ, в конце концов я установил Ubuntu 16.04.3, и он отлично работает с GCC и Clang - person ECO; 12.12.2017

Вам нужно восстановить ваши заголовки. Обязательно обновите каталоги вашей версией 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/

Источник: https://wiki.archlinux.org/index.php/Xilinx_Vivado

person dgreene    schedule 06.11.2018