tensorflow-cpp icon indicating copy to clipboard operation
tensorflow-cpp copied to clipboard

make error: No rule to make target `lib/libtensorflow.so'

Open GraceDD opened this issue 8 years ago • 1 comments

When use "make" command to build this project, it tells me "make error: No rule to make target `lib/libtensorflow.so'". So I wonder that is libtensorflow.so automatically generated by make this project, or libtensorflow.so should be prepared well before make ? When I read the makefile (actually I'm not very familiar with makefile rules), I wonder what should be contatined in "include" folders? Are those header files downloaded automatically or put by hand beforehand?

GraceDD avatar May 08 '17 03:05 GraceDD

You need to build tensorflow from the source but this will be automatically done by triggering make target. The first thing to do is to install dependency with make dependency. And then basically calling make is equivalent to

make build    # create libtensorflow.so
make data     # download pretrained model
make app      # build the app
make run      # test the app

I guess your attempt was failed while building tensorflow library. I suggest to clean the repo make reset and then run the individual target make build to see what the error message was.

After successful tensorflow build, the script (more specifically https://github.com/jhjin/tensorflow-cpp/blob/master/CMakeLists.txt#L53-L55) will copy header files under include so you do not need to worry about it.

jhjin avatar May 08 '17 05:05 jhjin