doonny / PipeCNN

An OpenCL-based FPGA Accelerator for Convolutional Neural Networks
Apache License 2.0
1.22k stars 370 forks source link

collect2: error: ld returned 1 exit status. Makefile:129: recipe for target 'run.exe' failed #45

Closed ArjunaDeSoysa closed 6 years ago

ArjunaDeSoysa commented 6 years ago

Hello! I compile the project and get the following error; screenshot from 2018-02-10 00-53-51

in PLATFORM = arm32 and FLOW = sw_emu I tried to remove all .o files and recompile it. But it didn't work. Anyone got an idea? Thanks in advance!!

META-DREAMER commented 6 years ago

Try running the init_opencl.sh script first: source ~/intelFPGA/16.1/hld/init_opencl.sh

META-DREAMER commented 6 years ago

Also, if you're doing sw_emu you want PLATFORM = x86 (assuming your running sw_emu not on your computer and not the DE1 board) and also to change your AOCL_BOARD_PACKAGE_ROOT env var to one that has x86 support like s5_ref.

ArjunaDeSoysa commented 6 years ago

@hammadj ,First one (run source ~/intelFPGA/16.1/hld/init_opencl.sh) , but the same problem occur.

can i know what do you mean by 'change your AOCL_BOARD_PACKAGE_ROOT env var to one that has x86 support like s5_ref'

I tried to run under the “Embedded_Command_Shell.sh”, but it also didn't work.please help me to solve this problem.

Thank you.

ArjunaDeSoysa commented 6 years ago

Thank You @hammadj . Finaly i got it. it's worked after change the AOCL_BOARD_PACKAGE_ROOT env var to s5_ref.

ArjunaDeSoysa commented 6 years ago

@hammadj , i did as you said , change the AOCL_BOARD_PACKAGE_ROOT env var to s5_ref. it ok. it will generated run.exe and conv.aocx. But the problem is when it run ,the error occur,

arjuna@arjuna-Inspiron-3542:~/Desktop/SW/PipeCNN-master/project$ CL_CONTEXT_EMULATOR_DEVICE_ALTERA=1 ./run.exe conv.aocx
./run.exe: error while loading shared libraries: libaltera_s5_ref_mmd.so: cannot open shared object file: No such file or directory

can you please tell me the how to solve this problem?

Thank You.

xyz

aazz44ss commented 6 years ago

Can you execute aocl diagnose and attach out put message

This message may because you have not set your board path correctly

ArjunaDeSoysa commented 6 years ago

@aazz44ss, aocl diagnose is host;

arjuna@arjuna-Inspiron-3542:~$ aocl diagnose
--------------------------------------------------------------------
No board diagnose routine supplied.                               
Please consult your board manufacturer's documentation or support   
team for information on how to debug board installation problems.   
--------------------------------------------------------------------

Can you please help me to solve this?

aazz44ss commented 6 years ago

I find you are using emulator, it should work without installing board.

Try env CL_CONTEXT_EMULATOR_DEVICE_ALTERA=1 ./run.exe conv.aocx

ArjunaDeSoysa commented 6 years ago

@aazz44ss , the same error occur;

arjuna@arjuna-Inspiron-3542:~/Desktop/SW/PipeCNN-master/project$ env CL_CONTEXT_EMULATOR_DEVICE_ALTERA=1 ./run.exe conv.aocx
./run.exe: error while loading shared libraries: libaltera_s5_ref_mmd.so: cannot open shared object file: No such file or directory

after source /etc/profile also i unset AOCL_BOARD_PACKAGE_ROOT

but it will Selected default target board as s5_ref.

 aoc: Environment checks are completed successfully.
You are now compiling the full flow!!
aoc: Selected default target board s5_ref
aoc: Running OpenCL parser....
aoc: OpenCL parser completed successfully.
aoc: Compiling for Emulation ....
aoc: Emulator Compilation completed successfully.

if i stop Selected default target board as s5_ref, is it will be okay? if it is okay, can you please tell me the how i stop Selected default target board as s5_ref?

thank you

META-DREAMER commented 6 years ago

@ArjunaDeSoysa Make sure you run the init_opencl.sh script:

source ~/intelFPGA/16.1/hld/init_opencl.sh

Or whatever the path to the intel FPGA SDK is

Meyerjan commented 6 years ago

hi, i have the same error arjuna@arjuna-Inspiron-3542:~$ aocl diagnose

No board diagnose routine supplied.
Please consult your board manufacturer's documentation or support
team for information on how to debug board installation problems.

Are you solve this?

ArjunaDeSoysa commented 6 years ago

@Meyerjan it seems like you try it on host computer. you want try it on FPGA board that you use. after entered the your board environment.