PatWie / tensorflow-cmake

TensorFlow examples in C, C++, Go and Python without bazel but with cmake and FindTensorFlow.cmake
Apache License 2.0
439 stars 91 forks source link

cmake error #27

Closed burui11087 closed 5 years ago

burui11087 commented 5 years ago

Thanks for your great work firstly.

When I cmake resize project, I occurred a fatal error that

Project requires TensorFlow source directory, please specify the path in
  ENV-VAR 'TENSORFLOW_SOURCE_DIR'

I have build tensorflow from source code successfully, but cmake can't find necessary files.

The all log information posted here

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting TensorFlow using python3 (use -DPYTHON_EXECUTABLE=... otherwise)
-- Detecting TensorFlow info - done
-- Found TensorFlow: (found appropriate version "1.12.0")
-- TensorFlow-ABI is 0
-- TensorFlow-INCLUDE_DIR is /usr/local/lib/python3.5/dist-packages/tensorflow/include
-- TensorFlow-LIBRARY is /usr/local/lib/python3.5/dist-packages/tensorflow/libtensorflow_framework.so
-- [WARNING] The TensorFlow version 1.12.0 has a bug (see #22766). We disable asserts using -DNDEBUG=True 
-- TensorFlow-CC-LIBRARY is /usr/local/lib/libtensorflow_cc.so
-- No TensorFlow source repository detected
-- Found TENSORFLOW: /usr/local/lib/python3.5/dist-packages/tensorflow/libtensorflow_framework.so (found version "1.12.0") 
-- Found OpenCV: /usr/local (found version "3.4.5") 
-- Include dirs /usr/local/include;/usr/local/include/opencv
-- LINK LIBRARIES opencv_core;opencv_dnn;opencv_highgui;opencv_stitching;opencv_videoio;opencv_video;opencv_photo;opencv_calib3d;opencv_features2d;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_shape;opencv_flann;opencv_superres;opencv_videostab
CMake Error at /workspace/ali/tensorflow-cmake/cmake/modules/FindTensorFlow.cmake:229 (message):
  Project requires TensorFlow source directory, please specify the path in
  ENV-VAR 'TENSORFLOW_SOURCE_DIR'
Call Stack (most recent call first):
  CMakeLists.txt:19 (TensorFlow_REQUIRE_SOURCE)

-- Configuring incomplete, errors occurred!

Hope your help.

burui11087 commented 5 years ago

sorry for disturbing you, I find TENSORFLOW_SOURCE_DIR defination in README.

Thanks again