tensorflow_cc: Build fails with shared ON
Hi,
Thanks for this nice project which is very useful for those of us using CMake. The static version of the project built OK, although I had to remove on line since I am using gcc-6.3 (on Debian stable):
diff --git a/tensorflow_cc/cmake/TensorflowShared.cmake b/tensorflow_cc/cmake/TensorflowShared.cmake
index f1e9d55..d6cdb1d 100644
--- a/tensorflow_cc/cmake/TensorflowShared.cmake
+++ b/tensorflow_cc/cmake/TensorflowShared.cmake
@@ -12,7 +12,6 @@ ExternalProject_Add(
UPDATE_COMMAND ""
CONFIGURE_COMMAND tensorflow/contrib/makefile/compile_linux_protobuf.sh
# patch nsync to use g++-5
- COMMAND sed -i "s/ g++/ g++-5/g" tensorflow/contrib/makefile/compile_nsync.sh
COMMAND tensorflow/contrib/makefile/compile_nsync.sh
COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cmake/build_tensorflow.sh" .
COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cmake/copy_links.sh" .
After that and I was able to use the example to check that everything is OK.
However, the shared version fails with this error:
compile_linux_protobuf.sh finished successfully!!!
+ g++ -DNSYNC_USE_CPP11_TIMEPOINT -DNSYNC_ATOMIC_CPP11 -I../../platform/c++11.futex -I../../platform/c++11 -I../../platform/gcc -I../../platform/posix -pthread -I../../public -I../../internal -O -std=c++11 -Werror -Wall -Wextra -pedantic -c ../../platform/linux/src/nsync_semaphore_futex.c
+ g++ -DNSYNC_USE_CPP11_TIMEPOINT -DNSYNC_ATOMIC_CPP11 -I../../platform/c++11.futex -I../../platform/c++11 -I../../platform/gcc -I../../platform/posix -pthread -I../../public -I../../internal -O -std=c++11 -Werror -Wall -Wextra -pedantic -c ../../platform/c++11/src/per_thread_waiter.cc
+ g++ -DNSYNC_USE_CPP11_TIMEPOINT -DNSYNC_ATOMIC_CPP11 -I../../platform/c++11.futex -I../../platform/c++11 -I../../platform/gcc -I../../platform/posix -pthread -I../../public -I../../internal -O -std=c++11 -Werror -Wall -Wextra -pedantic -c ../../platform/c++11/src/yield.cc
+ g++ -DNSYNC_USE_CPP11_TIMEPOINT -DNSYNC_ATOMIC_CPP11 -I../../platform/c++11.futex -I../../platform/c++11 -I../../platform/gcc -I../../platform/posix -pthread -I../../public -I../../internal -O -std=c++11 -Werror -Wall -Wextra -pedantic -c ../../platform/c++11/src/time_rep_timespec.cc
+ g++ -DNSYNC_USE_CPP11_TIMEPOINT -DNSYNC_ATOMIC_CPP11 -I../../platform/c++11.futex -I../../platform/c++11 -I../../platform/gcc -I../../platform/posix -pthread -I../../public -I../../internal -O -std=c++11 -Werror -Wall -Wextra -pedantic -c ../../platform/c++11/src/nsync_panic.cc
tensorflow/contrib/makefile/downloads/nsync/builds/default.linux.c++11/nsync.a
CUDA support disabled
You have bazel 0.13.1- (@non-git) installed.
Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See tools/bazel.rc for more details.
--config=mkl # Build with MKL support.
--config=monolithic # Config for mostly static monolithic build.
Configuration finished
Starting local Bazel server and connecting to it...
..........
WARNING: /home/user/.cache/bazel/_bazel_user/6f6dfefb4e43ac28cb8d73e15d94e2f8/external/protobuf_archive/WORKSPACE:1: Workspace name in /home/user/.cache/bazel/_bazel_user/6f6dfefb4e43ac28cb8d73e15d94e2f8/external/protobuf_archive/WORKSPACE (@com_google_protobuf) does not match the name given in the repository's definition (@protobuf_archive); this will cause a build error in future versions
INFO: Analysed target //tensorflow:libtensorflow_cc.so (96 packages loaded).
INFO: Found 1 target...
Target //tensorflow:libtensorflow_cc.so up-to-date:
bazel-bin/tensorflow/libtensorflow_cc.so
INFO: Elapsed time: 62.900s, Critical Path: 14.75s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
Replacing links with the copies of their targets.
This may take a while...
rm: cannot remove './bazel-tensorflow/external/local_jdk/lib/jexec': Permission denied
CMakeFiles/tensorflow_shared.dir/build.make:106: recipe for target 'tensorflow-stamp/tensorflow_shared-configure' failed
make[2]: *** [tensorflow-stamp/tensorflow_shared-configure] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/tensorflow_shared.dir/all' failed
make[1]: *** [CMakeFiles/tensorflow_shared.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Thanks.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (8 by maintainers)
cool, it will get to the master, then