Altera_Forum
Honored Contributor
11 years agoMissings libs for the emulation
Hello,
I'm trying out the emulation feature that came out with the AOCL 14.0. I want to emulate an application with two channeled kernels (thresholding + 7x7 convolution) with the C5SoC as the targeted board. Here are the steps I have followed :- Compile the kernels for the emulator on x86 architecture :
- aoc -march=emulator -v kernels.cl
- Compile the host program "as usual" :
- g++ -o host main.cpp -Wall -g `aocl linkflags`.
- According to the documentation, the `aocl linkflags` returns what's necessary for this compilation. In fact, it returns the libs and paths for x86_64, arm32 and ppc64 so I get some warnings (for instance /usr/bin/ld: skipping incompatible /opt/altera/14.0/hld/board/c5soc/arm32/lib/libalterammdpcie.so when searching for -lalterammdpcie), which is annoying but fine.
- however, it seems that libalterammdpcie.so is missing for all the platforms in the 14.0 release ! i think this was worth reporting here.
- Instead of using the `aocl linkflags` shortcut, I manually set the libs and paths and add the path to libalterammdpcie.so from the 13.1 release :
- g++ -o host main.cpp -Wall -g -L/opt/altera/14.0/hld/board/c5soc/arm32/lib -L/opt/altera/14.0/hld/host/arm32/lib -L/opt/altera/14.0/hld/host/linux64/lib -L/opt/altera/13.1/hld/host/linux64/lib -lalteracl -ldl -lacl_emulator_kernel_rt -lalterahalmmd -lalterammdpcie -lelf -lrt -lstdc++
- I add this same path to the LD_LIBRARY_PATH environment variable :
- $ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/altera/13.1/hld/host/linux64/lib
- I can now start the execution in the simulator :
- CL_CONTEXT_EMULATOR_DEVICE_ALTERA=c5soc ./host.