aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Oneata2017-10-03 16:27:54 -0500
committerDaniel Povey2017-10-03 16:27:54 -0500
commitf348b26c1fccd3ba71837826cfcbb9ee6a9ce6ee (patch)
tree3fef678ad557f56c510e29f70fba06bd550a9fa1
parent87107ed4c8c323cc4228032df670aff63b52be69 (diff)
downloadkaldi-f348b26c1fccd3ba71837826cfcbb9ee6a9ce6ee.tar.gz
kaldi-f348b26c1fccd3ba71837826cfcbb9ee6a9ce6ee.tar.xz
kaldi-f348b26c1fccd3ba71837826cfcbb9ee6a9ce6ee.zip
[build] Fix TensorFlow installation issues (#1920)
-rw-r--r--src/tfrnnlm/Makefile1
-rw-r--r--src/tfrnnlmbin/Makefile3
-rwxr-xr-xtools/extras/install_tensorflow_cc.sh4
3 files changed, 5 insertions, 3 deletions
diff --git a/src/tfrnnlm/Makefile b/src/tfrnnlm/Makefile
index 6550d9bdc..ffaf77d10 100644
--- a/src/tfrnnlm/Makefile
+++ b/src/tfrnnlm/Makefile
@@ -19,6 +19,7 @@ all:
19EXTRA_CXXFLAGS = -Wno-sign-compare -I$(TENSORFLOW)/bazel-tensorflow/external/protobuf/src \ 19EXTRA_CXXFLAGS = -Wno-sign-compare -I$(TENSORFLOW)/bazel-tensorflow/external/protobuf/src \
20 -I$(TENSORFLOW)/bazel-genfiles -I$(TENSORFLOW) \ 20 -I$(TENSORFLOW)/bazel-genfiles -I$(TENSORFLOW) \
21 -I$(TENSORFLOW)/tensorflow/contrib/makefile/downloads/eigen \ 21 -I$(TENSORFLOW)/tensorflow/contrib/makefile/downloads/eigen \
22 -I$(TENSORFLOW)/tensorflow/contrib/makefile/downloads/nsync/public \
22 -I$(TENSORFLOW)/tensorflow/contrib/makefile/downloads/protobuf/src 23 -I$(TENSORFLOW)/tensorflow/contrib/makefile/downloads/protobuf/src
23 24
24OBJFILES = tensorflow-rnnlm.o 25OBJFILES = tensorflow-rnnlm.o
diff --git a/src/tfrnnlmbin/Makefile b/src/tfrnnlmbin/Makefile
index 3ed6804c6..2fb6014b0 100644
--- a/src/tfrnnlmbin/Makefile
+++ b/src/tfrnnlmbin/Makefile
@@ -17,6 +17,7 @@ all:
17EXTRA_CXXFLAGS = -Wno-sign-compare -I$(TENSORFLOW)/bazel-tensorflow/external/protobuf/src \ 17EXTRA_CXXFLAGS = -Wno-sign-compare -I$(TENSORFLOW)/bazel-tensorflow/external/protobuf/src \
18 -I$(TENSORFLOW)/bazel-genfiles -I$(TENSORFLOW) \ 18 -I$(TENSORFLOW)/bazel-genfiles -I$(TENSORFLOW) \
19 -I$(TENSORFLOW)/tensorflow/contrib/makefile/downloads/eigen \ 19 -I$(TENSORFLOW)/tensorflow/contrib/makefile/downloads/eigen \
20 -I$(TENSORFLOW)/tensorflow/contrib/makefile/downloads/nsync/public \
20 -I$(TENSORFLOW)/tensorflow/contrib/makefile/downloads/protobuf/src 21 -I$(TENSORFLOW)/tensorflow/contrib/makefile/downloads/protobuf/src
21include ../kaldi.mk 22include ../kaldi.mk
22 23
@@ -32,7 +33,7 @@ ADDLIBS = ../lat/kaldi-lat.a ../lm/kaldi-lm.a ../fstext/kaldi-fstext.a \
32 ../base/kaldi-base.a ../tfrnnlm/kaldi-tensorflow-rnnlm.a 33 ../base/kaldi-base.a ../tfrnnlm/kaldi-tensorflow-rnnlm.a
33 34
34LDLIBS += -lz -ldl -fPIC -lrt 35LDLIBS += -lz -ldl -fPIC -lrt
35LDLIBS += -L$(TENSORFLOW)/bazel-bin/tensorflow -ltensorflow_cc 36LDLIBS += -L$(TENSORFLOW)/bazel-bin/tensorflow -ltensorflow_cc -ltensorflow_framework
36 37
37LDFLAGS += -Wl,-rpath=$(shell pwd)/../../tools/tensorflow/bazel-bin/tensorflow/ 38LDFLAGS += -Wl,-rpath=$(shell pwd)/../../tools/tensorflow/bazel-bin/tensorflow/
38 39
diff --git a/tools/extras/install_tensorflow_cc.sh b/tools/extras/install_tensorflow_cc.sh
index 31d8b2cd3..e7622c8fd 100755
--- a/tools/extras/install_tensorflow_cc.sh
+++ b/tools/extras/install_tensorflow_cc.sh
@@ -3,7 +3,7 @@
3set -e 3set -e
4 4
5#export JAVA_HOME=/LOCATION_ON_YOUR_MACHINE/java/jdk1.8.0_121 5#export JAVA_HOME=/LOCATION_ON_YOUR_MACHINE/java/jdk1.8.0_121
6PATH=$PATH:$PWD/bazel/output 6PATH=$PWD/bazel/output:$PATH
7export HOME=$PWD/tensorflow_build/ 7export HOME=$PWD/tensorflow_build/
8mkdir -p $HOME 8mkdir -p $HOME
9 9
@@ -25,7 +25,7 @@ else
25fi 25fi
26 26
27 27
28[ ! -f bazel.zip ] && wget https://github.com/bazelbuild/bazel/releases/download/0.5.1/bazel-0.5.1-dist.zip -O bazel.zip 28[ ! -f bazel.zip ] && wget https://github.com/bazelbuild/bazel/releases/download/0.5.4/bazel-0.5.4-dist.zip -O bazel.zip
29mkdir -p bazel 29mkdir -p bazel
30cd bazel 30cd bazel
31unzip ../bazel.zip 31unzip ../bazel.zip