Closed onnoeberhard closed 4 years ago
It seems it fails to apply a patch. I have no idea why and it looks more tensorflow level than DeepSpeech. Make sure you are on our r1.15 branch and not upstream one, but 0.24.1 should work. Try purging bazel cache as well?
Yes I am on the r1.15 branch. I tried removing bazel using rm -fr ~/.bazel ~/.bazelrc ~/.cache/bazel
and reinstalling it but the error remains the same..
It can be tricky to understand all the ways bazel does cashing, so instead of deleting folders by hand try running bazel clean --expunge.
Am 08.05.2020 um 19:36 schrieb Onno Eberhard notifications@github.com:
Yes I am on the r1.15 branch. I tried removing bazel using rm -fr ~/.bazel ~/.bazelrc ~/.cache/bazel and reinstalling it but the error remains the same..
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I don't really know what else to try.. I ran the following script:
rm -fr ~/.bazel ~/.bazelrc ~/.cache/bazel # Uninstall bazel
# Install bazel
curl -LO https://github.com/bazelbuild/bazel/releases/download/0.24.1/bazel-0.24.1-installer-darwin-x86_64.sh
chmod +x bazel-0.24.1-installer-darwin-x86_64.sh
./bazel-0.24.1-installer-darwin-x86_64.sh --user
rm bazel-0.24.1-installer-darwin-x86_64.sh
# Clone tensorflow
git clone https://github.com/mozilla/tensorflow.git
cd tensorflow
git checkout origin/r1.15
bazel clean --expunge # Whether or not I run this command, nothing changes
# Build libdeepspeech
ln -s ../DeepSpeech/native_client ./
bazel build --workspace_status_command="bash native_client/bazel_workspace_status_cmd.sh" --config=monolithic -c opt --copt=-O3 --copt="-D_GLIBCXX_USE_CXX11_ABI=0" --copt=-fvisibility=hidden //native_client:libdeepspeech.so
And I get the error message above..
Note the message about there being a cache hit for the protobuf package, indicating you're not properly cleaning the (correct) cache.
Also you forgot the configure step. For libdeepspeech alone I don't think it makes any difference but to be safe, do that.
zsh: command not found: bazel
. After the installation, bazel version
returns:
Build label: 0.24.1
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Apr 2 16:32:47 2019 (1554222767)
Build timestamp: 1554222767
Build timestamp as int: 1554222767
As for the configure script, I get another weird bug. When running ./configure
, I get env: bash\r: No such file or directory
, even though the file is in the directory (shows up in ls). As a workaround, I just ran python configure.py
, which works just fine and the configure script doesn't seem to be doing anything else either. But the error when running the bazel command still does not change.
I don't know how to clean the cache bazel uses.. Apparently removing the ~/.cache/bazel directory did not do the trick, neither does specifying --repository_cache=""
when running the command, though I don't know what exactly that option does. It just says in the documentary "An empty string as argument requests the cache to be disabled." However, the info message about the protobuf cache hit still appears.
I get
env: bash\r: No such file or directory
Hm. The \r
in this message, plus the ?
symbols in the patch apply error message, plus the fact that the error is a patch failing to apply, seems to indicate there's something wrong with your Git config where it's writing bad newlines in the files it checks out. You should check if your git config doesn't include any bad newline settings.
You were right! I deleted my .gitconfig file and re-cloned both mozilla/DeepSpeech and mozilla/tensorflow; after that the ./configure command worked and the bazel build command succeeded without error. Thank you so much!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hello, I am trying to build DeepSpeech according to the instructions on https://github.com/mozilla/DeepSpeech/tree/master/native_client. When running the bazel build command (written above, unchanged from the instructions) I get the following output:
It seems that the actual error message is
no such package '@com_google_protobuf//'
. I do have protobuf version 3.11.3 installed. I found similar issues mentioned elsewhere but the solution always seemed to be to change the bazel version, but bazel 0.24.1 ist explicitly mentioned in the instructions (and I get different errors when trying different bazel versions).