UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

SDx 2016.4 HLS compilation errors from stdio.h

Reply
Highlighted
Visitor
Posts: 3
Registered: ‎05-18-2017

SDx 2016.4 HLS compilation errors from stdio.h

I recently upgraded my laptop to Ubuntu 16.04 and installed SDx 2016.4

To test everything is working, I tried to compile the HLS example Matrix Multiplication (FreeRTOS) for zc702 but I am getting a compiler error.

In file included from /usr/include/stdio.h:27:
/usr/include/features.h:367:12: fatal error: 'sys/cdefs.h' file not found

 

I did source the settings64.sh before launching SDx, so I'm not sure why it's picking up the local version of stdio.h. 

This isn't specific to stdio.h, I get similar problems with stdint.h.

Thanks in advance for any suggestions or help.

 

Relevant output:

sds++ -Wall -O0 -g -I"../src" -c -fmessage-length=0 -MT"src/mmult_accel.o" --std=c++11 -MMD -MP -MF"src/mmult_accel.d" -MT"src/mmult_accel.o" -o "src/mmult_accel.o" "../src/mmult_accel.cpp" -sds-hw mmult_accel mmult_accel.cpp  -clkid 2 -sds-end -sds-sys-config freertos -sds-proc a9_0 -sds-pf "zc702"

INFO: [SDSoC 0-0] Processing -sds-hw block for mmult_accel
INFO: [SDSoC 0-0] Create data motion intermediate representation
INFO: [SDSoC 0-0] Performing accelerator source linting for mmult_accel
INFO: [SDSoC 0-0] Performing pragma generation
INFO: [SDSoC 0-0] Successfully generated tcl script: /home/jpratt/workspace2/MMultTest/Debug/_sds/vhls/mmult_accel.tcl
INFO: [SDSoC 0-0] Moving function mmult_accel to Programmable Logic
ERROR: [HLS 200-70] Compilation errors found:
Pragma processor failed: In file included from /home/jpratt/workspace2/MMultTest/src/mmult_accel.cpp:40:
In file included from /usr/include/stdio.h:27:
/usr/include/features.h:367:12: fatal error: 'sys/cdefs.h' file not found
# include <sys/cdefs.h>
^
ERROR: [SDSoC 0-0] Exiting sds++ : Error when calling '/opt/Xilinx/SDx/2016.4/Vivado_HLS/bin/vivado_hls /home/jpratt/workspace2/MMultTest/Debug/_sds/vhls/mmult_accel_run.tcl'
sds++ log file saved as /home/jpratt/workspace2/MMultTest/Debug/_sds/reports/sds_mmult_accel.log
ERROR: [SDSoC 0-0] Build failed

Visitor
Posts: 3
Registered: ‎05-18-2017

Re: SDx 2016.4 HLS compilation errors from stdio.h

It seems the dependencies in the installation guide are missing a couple of modules. I ran the following command after the initial set and builds are working again.

 

sudo apt-get install gcc-multilib g++-multilib