You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tensorflow is not failing on unstable yet, but it is on staging-next, and we need your help to fix it. The gist is that protobuf and abseil were updated in #244539, and a good amount of effort (#248231, #248306, #248532, #248536, #249420, #249692, #249752, #249883, #249995, #250193, d90b1cd) has gone into either fixing or pinning protobuf to fix various packages. A couple of us have tried with tensorflow (pinning and fixing) and have not been successful.
Build log
/nix/store/1z4w76wz18jajq9r8p18li7ixq4y3ggk-protobuf-3.23.4/include/google/protobuf/port_def.inc:219:15: error: static assertion failed: Protobuf only supports Abseil version 20230125.3 and newer.
219 | static_assert(PROTOBUF_ABSL_MIN(20230125, 3),
| ^~~~~~~~~~~~~~~~~
Looking for someone who is invested and more knowledgeable about this package to please help out. Tagging a couple of folks who I've seen involved with tensorflow on GitHub or Discourse: @abbradar@samuela@risicle@Minnozz@SomeoneSerge @NixOS/cuda-maintainers
FYI, Tensorflow compiles fine when the reverse dependencies of abseil (its Python wrapper, grpc(io) and its Python wrapper, protobuf) aren't taken from the system anymore (example build script patch: zeuner@bcc36f9).
I would prefer using more system packages, but this might require help from someone who knows more about Tensorflow's build process. In particular, I think it would be better if abseil-cpp could also be taken from the system. com_google_absl is even among Tensorflow's VALID_LIBS that allow using the system version, but actually doing so seems non-trivial. The way it's currently done, protobuf is taken from the system and thereby pulls in the system abseil-cpp, while Tensorflow adds its own abseil-cpp library.
ERROR: /build/output/external/pybind11_protobuf/pybind11_protobuf/BUILD:46:15: no such target '@com_google_protobuf//:proto_api': target 'proto_api' not declared in package '' (did you mean 'protobuf'?) defined by /build/output/external/com_google_protobuf/BUILD.bazel and referenced by '@pybind11_protobuf//pybind11_protobuf:proto_cast_util'
which looks like it's new in 2.13, and is being worked on by the Conda packagers at conda-forge/tensorflow-feedstock#329 but I wasn't able to solve it by adapting their patch.
I made some progress and re-added abseil and protobuf. Since I'm on the way to achieving parity with the previous build with respect to system library integration, I'll start to roll this into a PR: #255998
Activity
[-]Build failure: tensorflow[/-][+]Call for help: build failure: tensorflow[/+]nixos-discourse commentedon Aug 19, 2023
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/call-for-help-build-failure-tensorflow/31945/1
vcunat commentedon Aug 20, 2023
Our current (lib)tensorflow version has some security issues as well, by a quick glance at https://github.com/tensorflow/tensorflow/releases
libtensorflow: mark as broken and vulnerable
zeuner commentedon Aug 28, 2023
FYI, Tensorflow compiles fine when the reverse dependencies of abseil (its Python wrapper, grpc(io) and its Python wrapper,
protobuf) aren't taken from the system anymore (example build script patch: zeuner@bcc36f9).I would prefer using more system packages, but this might require help from someone who knows more about Tensorflow's build process. In particular, I think it would be better if abseil-cpp could also be taken from the system.
com_google_abslis even among Tensorflow'sVALID_LIBSthat allow using the system version, but actually doing so seems non-trivial. The way it's currently done,protobufis taken from the system and thereby pulls in the systemabseil-cpp, while Tensorflow adds its ownabseil-cpplibrary.Also, are there any details regarding the vulnerability warning? The available information about the CVE (e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-33976) is not very informative. Will it help to just upgrade Tensorflow?
vcunat commentedon Aug 29, 2023
Vulnerabilities: I was just looking at https://github.com/tensorflow/tensorflow/releases (e.g. word "security")
zeuner commentedon Aug 29, 2023
@vcunat Great, thanks. Looking at this information, I guess CVE-2023-33976 could be fixed by either upgrading to https://github.com/tensorflow/tensorflow/tree/v2.13.0, or possibly by backporting tensorflow/tensorflow@915884f.
vcunat commentedon Aug 29, 2023
There are many vulnerabilities on that link after the release we have now, so patching everything might be lots of work.
kevinmehall commentedon Sep 1, 2023
I attempted to update tensorflow to 2.13.
First ran into tensorflow/tensorflow#60667 for which I found a patch from Conda's packaging of 2.12.1 at https://github.com/conda-forge/tensorflow-feedstock/blob/main/recipe/patches/0002-fix-genproto.patch, and also found that another of their patches resolved a subsequent error. It's now failing with:
which looks like it's new in 2.13, and is being worked on by the Conda packagers at conda-forge/tensorflow-feedstock#329 but I wasn't able to solve it by adapting their patch.
Pushed my changes to master...kevinmehall:nixpkgs:tensorflow. Hoping someone who knows Bazel can pick up where I left off.
zeuner commentedon Sep 1, 2023
I have a working build of 2.13.0 here (https://github.com/zeuner/nixpkgs/tree/tensorflow-build-test-2-13), again relying less on compatible system packages. Maybe it can help to better understand how the build can succeed, also when going back to integrating with the dependencies as system packages.
nixos-discourse commentedon Sep 17, 2023
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/rebuild-errors-with-attrsets-and-tensorflow/32927/3
zeuner commentedon Sep 19, 2023
I made some progress and re-added
abseilandprotobuf. Since I'm on the way to achieving parity with the previous build with respect to system library integration, I'll start to roll this into a PR: #255998zeuner commentedon Sep 27, 2023
Help from someone experienced with x86_64-darwin would also be great. There was quite some progress here (#255998) on Linux platforms, but a Darwin developer might know something about undeclared
DISPATCH_APPLY_AUTOidentifiers (see https://logs.ofborg.org/?key=nixos/nixpkgs.255998&attempt_id=1b644ce1-ba04-4473-9e1a-94937ca086fd), which, telling from the manpage (https://www.mankier.com/3/dispatch_apply), would be expected to be there when includingdispatch/dispatch.h, but is not anyway.samuela commentedon Sep 27, 2023
Can we drop x86_64-darwin support? There are fewer and fewer contributors and users with x86_64-darwin machines, making support increasingly onerous
zeuner commentedon Oct 19, 2023
aarch64-darwin could also use someone knowledgeable to fix compilation: https://github.com/NixOS/nixpkgs/runs/17702324156 . Might also related to clang (see also #254362 (comment))