Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16636 Discussions

Compile error on unable to find -lalterammdpcie when building host prog with make

Altera_Forum
Honored Contributor II
1,001 Views

Greetings Fire Fighters, 

 

I am new to altera opencl sdk and I have started with compiling vector_add example as emulator. I have installed altera 15.1 (updated) under /home/ubuntu/altera/15.1/AOCL/. and I have set all the necessary env variables necessary within init_opencl_15.1_c5Soc.sh (attached).  

AOCL_BOARD_PACKAGE_ROOT is set to /home/ubuntu/altera/15.1/AOCL/hld/board/c5soc. Using that. 

Adding /home/ubuntu/altera/15.1/AOCL/hld/bin to PATH 

Adding /home/ubuntu/altera/15.1/AOCL/hld/host/linux64/lib to LD_LIBRARY_PATH 

Adding /home/ubuntu/altera/15.1/AOCL/hld/board/c5soc/linux64/lib to LD_LIBRARY_PATH 

Adding /home/ubuntu/altera/15.1/AOCL/hld/bin to PATH 

Adding /home/ubuntu/altera/15.1/AOCL/quartus/bin to PATH 

Adding /home/ubuntu/altera/15.1/AOCL/quartus/sopc_builder/bin to PATH 

Adding modelsim environment variable MTI_VCO_MODE=64 to environment 

Adding /home/ubuntu/altera/15.1/AOCL/hld/host/linux64/lib to LD_LIBRARY_PATH 

Adding /home/ubuntu/altera/15.1/AOCL/hld/linux64/lib to LD_LIBRARY_PATH 

 

But echo $LD_LIBRARY_PATH just gives 

/home/ubuntu/altera/15.1/AOCL/hld/linux64/lib:/home/ubuntu/altera/15.1/AOCL/hld/host/linux64/lib:/home/ubuntu/altera/15.1/AOCL/hld/board/s5_ref/linux64/lib 

hence I added c5soc paths too and updated LD_LIBRARY_PATH to  

/home/ubuntu/altera/15.1/AOCL/hld/linux64/lib:/home/ubuntu/altera/15.1/AOCL/hld/host/linux64/lib:/home/ubuntu/altera/15.1/AOCL/hld/board/s5_ref/linux64/lib:/home/ubuntu/altera/15.1/AOCL/hld/board/c5soc/linux64/lib:/home/ubuntu/altera/15.1/AOCL/hld/board/c5soc/arm32/lib:/home/ubuntu/altera/15.1/AOCL/hld/host/arm32/lib 

 

and echo $PATH gives 

/home/ubuntu/altera/15.1/AOCL/quartus/sopc_builder/bin:/home/ubuntu/altera/15.1/AOCL/quartus/bin:/home/ubuntu/altera/15.1/AOCL/hld/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 

 

I am able to build the kernel with "aoc -march=emulator -g --board c5soc device/vector_add.cl -o bin/vectoradd.aocx".  

 

 

Post which I am building the host with "g++ -g3 -I../common/inc/ -I/home/ubuntu/altera/15.1/AOCL/hld/host/include host/src/main.cpp ../common/src/AOCLUtils/opencl.cpp ../common/src/AOCLUtils/options.cpp -L/home/ubuntu/altera/15.1/AOCL/hld/host/linux64/lib -L/home/ubuntu/altera/15.1/AOCL/hld/board/c5soc/arm32/lib -L/home/ubuntu/altera/15.1/AOCL/hld/host/arm32/lib -Wl,--no-as-needed -lalteracl -lacl_emulator_kernel_rt -lalterahalmmd -lalterammdpcie -lelf -lrt -ldl -lstdc++ -o vector_add.out" but I am getting below error: 

ERROR: 

/usr/bin/ld: skipping incompatible /home/ubuntu/altera/15.1/AOCL/hld/board/c5soc/arm32/lib/libalterammdpcie.so when searching for -lalterammdpcie 

/usr/bin/ld: skipping incompatible /home/ubuntu/altera/15.1/AOCL/hld/host/arm32/lib/libalterammdpcie.so when searching for -lalterammdpcie 

/usr/bin/ld: cannot find -lalterammdpcie 

collect2: error: ld returned 1 exit status 

 

 

I want to understand if I have missed anything here. As I wanted to run this program on DE0 Atlas running cyclone 5 device.
0 Kudos
0 Replies
Reply