larrylart / codrive

Advanced driver-assistance system with Google Coral Edge TPU Dev Board / USB Accelerator, Intel Movidius NCS (neural compute stick), Myriad 2/X VPU, Gyrfalcon 2801 Neural Accelerator, NVIDIA Jetson Nano and Khadas VIM3
GNU General Public License v3.0
45 stars 9 forks source link

cannot find -ledgetpu #2

Closed John12341234 closed 5 years ago

John12341234 commented 5 years ago

I'm trying to build this project on the coral dev board. I was able to build opencv4.1, but not tensorflow, or this project.

Issues:

  1. I was not able to build tensorflow lite (on the coral dev baord). I followed the instructions in the required section, and did a git reset to the same commit. I ran sh ./build_coral_lib.sh which failed on line 19 (before the line that was modified in your instructions): ./build_coral_lib.sh: 19: ./build_coral_lib.sh: Bad substitution. Full error
  2. I thought that I should be able to ignore the TF build issues and instead use the static library for TF, which I thought would come with the edgetpu library. Maybe it doesn't or maybe the makefile needs to be updated. I get the following error when running make (on the coral dev board): /usr/bin/ld: cannot find -ledgetpu Full error

Do you know how to solve either issue?

larrylart commented 5 years ago

try apt-get install libedgetpu libedgetpu-dev libedgetpu-dbgsym edgetpu-api ldconfig and after that make sure you have /usr/lib/aarch64-linux-gnu/libedgetpu.so and that path is seen by linker

As for building tensorflow on the devboard, I see in your log that is still using arm-linux-gnueabihf- instead of aarch64-linux-gnu- . You can either modify the Makefile in tools/make/ and hardcode aarch64-linux-gnu- or even better ... I noticed there is already a script in the repository to build on aarch64 - use tools/make/build_aarch64_lib.sh, which seems to be working, no changes required. Let me know if the latest tensorflow commit actually works, I had difficulties compiling on aarch64 due to a series of recent changes which impacted on aarch64 build. If you endup with lots of errors you migh want to reset the git chekout to the version which did work for me, see the other issue in this repo

John12341234 commented 5 years ago

Thanks.

sudo apt-get install libedgetpu libedgetpu-dev libedgetpu-dbgsym edgetpu-api && sudo ldconfig resolved the cannot find -ledgetpu error and the build succeeded.

I haven't tried building tensorflow again as it doesn't seem necessary now but I'll likely try it again soon.