Caffe-HRT icon indicating copy to clipboard operation
Caffe-HRT copied to clipboard

Cannot complie CaffeOnACL missing Compute library

Open holopekochan opened this issue 7 years ago • 10 comments

I have followed the instruction. also the pdf to compile CaffeOnACL. Hpwever, it keeps failing during "sudo make all" steps. I have tried to compile computer library again but the library are still not compatible or missing. Any help would be appreciated. Thanks

screenshot from 2017-11-10 04-24-42

screenshot from 2017-11-10 04-29-21

holopekochan avatar Nov 10 '17 12:11 holopekochan

any update ? I meet the same problem.

Ood-Tsen avatar Jan 10 '18 09:01 Ood-Tsen

Please check libarm_compute.so and libarm_compute_core.so files are located in /usr/lib directory before compiling CaffeOnACL. CaffeOnACL will try to find ACL library in /usr/lib first for linking.

Thanks.

daeinki avatar Jan 17 '18 07:01 daeinki

I am facing the same problem. The files are at /usr/local/AID/ComputeLibrary/lib/ and they are found too. But the problem is that those libraries are built for arm compiled by aarch64-linux-gnu-gcc, I think that's why it is showing

skipping incompatible /usr/local/AID/ComputeLibrary/lib/libarm_compute.so

sumsuddin avatar Jan 23 '18 06:01 sumsuddin

The the libarm_compute.so in AID is 64bit, did you try to build 32bit libraries? if so, please compile Arm Compute library to 32 bit yourself.

joey2014 avatar Jan 23 '18 15:01 joey2014

I have followed the installation process on the repo. I am not sure that the given Makefile file made it 32 bit or not. The docker files are also misleading I guess. Because they are for official bvlc/caffe not for this repository.

sumsuddin avatar Jan 23 '18 15:01 sumsuddin

Is there any solution to the above problem I an facing the same problem.

sejal-gupta avatar Apr 08 '18 13:04 sejal-gupta

@sejal-gupta Did you try to build 32 bits program? Can you paste the error message?

joey2014 avatar Apr 08 '18 14:04 joey2014

@joey2014 thank you for your reply. Following is the error I am getting. LD -o .build_release/lib/libcaffe.so.1.0.0-rc5 /usr/bin/ld: skipping incompatible /usr/local/AID/ComputeLibrary/lib/libarm_compute.so when searching for -larm_compute /usr/bin/ld: cannot find -larm_compute /usr/bin/ld: skipping incompatible /usr/local/AID/ComputeLibrary/lib/libarm_compute_core.so when searching for -larm_compute_core /usr/bin/ld: cannot find -larm_compute_core /usr/bin/ld: cannot find -lhdf5_hl /usr/bin/ld: cannot find -lhdf5 collect2: error: ld returned 1 exit status Makefile:626: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc5' failed make: *** [.build_release/lib/libcaffe.so.1.0.0-rc5] Error 1

sejal-gupta avatar Apr 08 '18 16:04 sejal-gupta

@sejal-gupta
You tried to build 32 bits Caffe, but the default build enviroment only works on 64 bits.

There are two reasons that caused the link failure:

  1. The prebuilt arm compute libraries is 64 bits /usr/local/AID/ComputeLibrary/lib/libarm_compute_core.so is 64bits library, [solution] delete or rename /usr/local/AID, and git clone the arm compute libraries and build 32 bits libraries yourself: scons Werror=1 -j8 debug=1 neon=1 opencl=1 os=linux arch=armv7a refer to https://arm-software.github.io/ComputeLibrary/v18.03/index.xhtml#S3_2_1_library *You also can build arm compute libraries without opencl support, let opencl=0. In this case you need change USE_OPENCL:=0 in Caffe-HRT/Makefile.config.acl.
  2. not set correct search path for 32 bits hdf5 libraries you need change HDF5_LIBRARY_DIRS := /usr/lib/arm-linux-gnueabihf/hdf5/serial in Caffe-HRT/Makefile.config.acl. *new version we add variable ARM_ARCH to control, currently you have to change the search path yourself.

joey2014 avatar Apr 09 '18 01:04 joey2014

@joey2014 Thanks a lot

sejal-gupta avatar Apr 09 '18 01:04 sejal-gupta