Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
15466 Discussions

error loading shared libraries: cannot open shared obj

Honored Contributor II

"Emulation Error : ./host: error while loading shared libraries: cannot open shared object file: No such file or directory" 


I am trying to emulate an openCL design implemented for Cyclone V SoC (Terasic board)  


I have compiled hardware kernel.aocx in emulator mode : "aoc -march=emulator device/ -o bin/vector_add.aocx" 

I have generated x86 executable for the host by make command for Make file : 


but when i try to execute the host " CL_CONTEXT_EMULATOR_DEVICE_ALTERA=1 ./host" , the following error is seen , how to solve this ? 

./host: error while loading shared libraries: cannot open shared object file: no such file or directory" 


FYI: the environment variables set are  

export QUARTUS_ROOTDIR=/eda/altera/quartus_16.1_standard/quartus 

export ALTERAOCLSDKROOT=/eda/intel/16.1/hld 

export AOCL_BOARD_PACKAGE_ROOT=/eda/altera/quartus_16.1_standard/hld/board/terasic/de1soc# export LD_LIBRARY_PATH=/eda/intel/16.1/hld/board/s5_ref/linux64/lib 

export LD_LIBRARY_PATH=/eda/altera/quartus_16.1_standard/hld/host/linux64/lib
2 Replies
Honored Contributor II

The missing library file is exactly in the path that you have commented out in your environmental variables (/eda/intel/16.1/hld/board/s5_ref/linux64/lib). Remove the# sign and close your terminal and open a new one to load the new settings. Also make sure the path is correct; some of your paths are pointing to "/altera/quartus_16.1_standard", while others are pointing to "/intel/16.1". 


Also your AOCL_BOARD_PACKAGE_ROOT is pointing to the Terasic BSP, while your LD_LIBRARY_PATH is pointing to Altera's reference S5 board. This is not correct; both should point to the same board. You should probably also add --board=XXXX to your aoc command line to make sure you are targeting the correct board for emulation.
Honored Contributor II

Thanks HRZ , i could eliminate the error with the information provided . It worked when both paths are assigned to LD_LIBRARY_PATH 


I modified the Environment paths as following 

export ALTERAOCLSDKROOT=/eda/intel/16.1/hld