[build] Fix TensorFlow installation issues (#1920)
authorDan Oneata <dan.oneata@gmail.com>
Tue, 3 Oct 2017 21:27:54 +0000 (00:27 +0300)
committerDaniel Povey <dpovey@gmail.com>
Tue, 3 Oct 2017 21:27:54 +0000 (17:27 -0400)
src/tfrnnlm/Makefile
src/tfrnnlmbin/Makefile
tools/extras/install_tensorflow_cc.sh

index 6550d9bdc2658a2ac79d0bb08fe6154cdf8ab067..ffaf77d1016f9089e739d0560d43b02c4781e432 100644 (file)
@@ -19,6 +19,7 @@ all:
 EXTRA_CXXFLAGS = -Wno-sign-compare -I$(TENSORFLOW)/bazel-tensorflow/external/protobuf/src \
                  -I$(TENSORFLOW)/bazel-genfiles -I$(TENSORFLOW) \
                  -I$(TENSORFLOW)/tensorflow/contrib/makefile/downloads/eigen \
+                 -I$(TENSORFLOW)/tensorflow/contrib/makefile/downloads/nsync/public \
                  -I$(TENSORFLOW)/tensorflow/contrib/makefile/downloads/protobuf/src
 
 OBJFILES = tensorflow-rnnlm.o
index 3ed6804c64e1d99e7be84363288d9b8bc123c595..2fb6014b03640290f92921a51295a924fb4016a4 100644 (file)
@@ -17,6 +17,7 @@ all:
 EXTRA_CXXFLAGS = -Wno-sign-compare -I$(TENSORFLOW)/bazel-tensorflow/external/protobuf/src \
                  -I$(TENSORFLOW)/bazel-genfiles -I$(TENSORFLOW) \
                  -I$(TENSORFLOW)/tensorflow/contrib/makefile/downloads/eigen \
+                 -I$(TENSORFLOW)/tensorflow/contrib/makefile/downloads/nsync/public \
                  -I$(TENSORFLOW)/tensorflow/contrib/makefile/downloads/protobuf/src
 include ../kaldi.mk
 
@@ -32,7 +33,7 @@ ADDLIBS = ../lat/kaldi-lat.a ../lm/kaldi-lm.a ../fstext/kaldi-fstext.a \
           ../base/kaldi-base.a ../tfrnnlm/kaldi-tensorflow-rnnlm.a
 
 LDLIBS +=  -lz -ldl -fPIC -lrt
-LDLIBS += -L$(TENSORFLOW)/bazel-bin/tensorflow -ltensorflow_cc
+LDLIBS += -L$(TENSORFLOW)/bazel-bin/tensorflow -ltensorflow_cc -ltensorflow_framework
 
 LDFLAGS += -Wl,-rpath=$(shell pwd)/../../tools/tensorflow/bazel-bin/tensorflow/
 
index 31d8b2cd337abd5ba455a891b914c53b84374e6e..e7622c8fd277748dbab80326505680d1e320a8ca 100755 (executable)
@@ -3,7 +3,7 @@
 set -e
 
 #export JAVA_HOME=/LOCATION_ON_YOUR_MACHINE/java/jdk1.8.0_121
-PATH=$PATH:$PWD/bazel/output
+PATH=$PWD/bazel/output:$PATH
 export HOME=$PWD/tensorflow_build/
 mkdir -p $HOME
 
@@ -25,7 +25,7 @@ else
 fi
 
 
-[ ! -f bazel.zip ] && wget https://github.com/bazelbuild/bazel/releases/download/0.5.1/bazel-0.5.1-dist.zip -O bazel.zip
+[ ! -f bazel.zip ] && wget https://github.com/bazelbuild/bazel/releases/download/0.5.4/bazel-0.5.4-dist.zip -O bazel.zip
 mkdir -p bazel
 cd bazel
 unzip ../bazel.zip