New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no such package 'util/hash': BUILD file not found #22665
Comments
@arrowd Looks like some files are missing, try to install TensorFlow from the binary. |
I doubt there are binaries for FreeBSD. This is why I'm doing the port, after all. Can you point me to FreeBSD binaries? |
I already have the latest bazel. The problem is not with bazel, but TensorFlow. |
I don't quite get what you are saying. I'm simply trying to compile latest TensorFlow release with latest Bazel release and https://www.tensorflow.org/install/source is exactly steps I'm following. Is this supported? The manual you provided uses ancient Bazel to build old version of TF. I don't need it, I want to create a package of recent TF for FreeBSD users. |
Ping? Maybe I'm just doing something wrong? Is
command supposed to work at all? |
I'd like to add a confirmation that I have this issue, too. In NixOS we try to use bazel by fetching, patching, then building. I am using a built-from-source version of AMD's ROCm patches to tensorflow, but had to ultimately create a new bazel wrapper to apply the needed patches during the build since the fetch command fails with this problem. |
@arrowd The instructions can be adapted to the newer TensorFlow version but it won't be trivial. @acowley glad you found a solution. Applying all needed patches is essential to get around this problem. Installing TensorFlow from source is usually challenging which is why we recommend binary. |
Can you please elaborate on this? What protobuf patches? |
Was just hit with this as well. @acowley I'm using Nix to build TF as well, how did you end up working around this? Did you override |
FWIW versions 1.11, 1.10.1, and 1.10.0 are affected. Version 1.9.0 isn't, it seems. |
@TravisWhitaker Yes, exactly, I used a custom rocm-bazel = (pkgs.bazel.override {enableNixHacks = true;}).overrideAttrs (old: {
# Packages that bazel fetches often include hard-coded paths to
# /usr/bin/ar. We in turn hard code a fix for that here. If
# bazel's fetch command works for your build, then this is not
# needed as these paths can be patched after download but before
# build. If fetching does not work, and you need to rely upon
# downloads during the build phase, this can help.
postPatch = old.postPatch + ''
find -type f -name CROSSTOOL\* -exec sed -i -e 's,/usr/bin/ar,${pkgs.binutils.bintools}/bin/ar,g' {} \;
sed -e 's|if (execvp(opt.args\[0\]|if (execvp(strcmp(opt.args[0], "/usr/bin/ar") == 0 ? "${pkgs.binutils.bintools}/bin/ar" : opt.args[0]|' \
-e 's|\(#include <vector>\)|\1\n#include <cstring>|' \
-i src/main/tools/process-wrapper-legacy.cc
'';
}); |
@acowley Ah nice, I'll give that a go. Thanks! |
Thanks for sharing your fix for NixOS @acowley. The patches that may be helpful for FreeBSD case can be found in https://svnweb.freebsd.org/ports/head/devel/protobuf/files/, locate the correct files that match with the FreeBSD version installed. |
Closing this out since I understand it to be resolved, but please let me know if I'm mistaken. If the issue is persists again, please open a new ticket. Thanks! |
System information
bazel fetch --repository_cache=/path/to/empty/bazel_cache //tensorflow:libtensorflow.so
Describe the problem
I'm doing the port for tensorflow and trying to fetch everything that's required for build first. After extracting tensorflow tarball I run
bazel fetch --repository_cache=/path/to/empty/bazel_cache //tensorflow:libtensorflow.so
and get the following error:The text was updated successfully, but these errors were encountered: