cornell-zhang / rosetta

Rosetta: A Realistic High-level Synthesis Benchmark Suite for Software Programmable FPGAs
BSD 3-Clause "New" or "Revised" License
158 stars 37 forks source link

Undefined reference to `sds_alloc' & 'sds_free' #7

Closed bhavna-cst closed 4 years ago

bhavna-cst commented 4 years ago

Hi,

While trying to compile and build SD_SOC version of "Digit_recognition" application using G++, compile fails at linking stage with below errors-

"digit_recognition.cpp:(.text+0x3d): undefined reference to `sds_alloc'
digit_recognition.cpp:(.text+0x50): undefined reference to `sds_alloc'
digit_recognition.cpp:(.text+0x66): undefined reference to `sds_alloc'
digit_recognition.cpp:(.text+0x486): undefined reference to `sds_alloc'
digit_recognition.cpp:(.text+0x54a): undefined reference to `sds_free'
digit_recognition.cpp:(.text+0x556): undefined reference to `sds_free'
digit_recognition.cpp:(.text+0x562): undefined reference to `sds_free'
digit_recognition.cpp:(.text+0x56e): undefined reference to `sds_free'
collect2: error: ld returned 1 exit status"

Could somebody please help me with library/definition to mentioned functions?

Thanks & Regards, Bhavna Aggarwal

zhouyuan1119 commented 4 years ago

Hi Bhavna,

The sds_alloc and sds_free functions are Xilinx SDSoC internal functions, and cannot be used without the SDSoC libraries. Notice that the SDSoC version is meant to be used with the Xilinx SDSoC tool. If you want to compile this version with g++ and do a software simulation, the simplest way is to replace sds_alloc with normal malloc and sds_free with free.