Skip to content

Feature request: Allow the build to use the system-installed protobuf lib #16104

Closed

Description

@svenstaro

Describe the problem

Currently, it's impossible to use the system-installed protobuf library because the tensorflow build always uses the protobuf_archive version. There should be an option to use the one installed in the system.

Background: I package tensorflow for Arch Linux and we run into symbol conflicts if a user wants to use protobuf and tensorflow together in a binary because tensorflow's protobuf symbols conflict with the one installed in the system already.

Original Arch bug report: https://bugs.archlinux.org/task/56943

Activity

  1. changed the title [-]Allow the build to use the system-installed protobuf lib[/-] [+]Feature request: Allow the build to use the system-installed protobuf lib[/+] on Jan 13, 2018
  2. tensorflowbutler commented on Jan 14, 2018

    @tensorflowbutler
    Member

    Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
    Have I written custom code
    OS Platform and Distribution
    TensorFlow installed from
    TensorFlow version
    Bazel version
    CUDA/cuDNN version
    GPU model and memory
    Exact command to reproduce

  3. svenstaro commented on Jan 22, 2018

    @svenstaro
    ContributorAuthor

    sigh for this kind of issue, it really doesn't matter but for the sake of automation, here I go:

    • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): yes
    • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Arch Linux
    • TensorFlow installed from (source or binary): source
    • TensorFlow version (use command below): 1.4.1
    • Python version: 3.6
    • Bazel version (if compiling from source): 0.9.0
    • GCC/Compiler version (if compiling from source): 7.2.1
    • CUDA/cuDNN version: 9.1.85/7.0.5
    • GPU model and memory: 1080 TI with 11711807488 bytes
    • Exact command to reproduce: N/A
  4. drpngx commented on Jan 30, 2018

    @drpngx
    Contributor

    I think there was a similar question but can't seem to find it.

    @gunan what's our position here?

  5. gunan commented on Jan 31, 2018

    @gunan
    Contributor

    Eventually, we would like to enable this.
    Maybe we can control this using environment variables just like we do for MKL?

  6. dbarnes commented on Feb 18, 2018

    @dbarnes

    @drpngx could it be this question I posted a while ago #8403 ? I'd be very interested as well if any progress is made on this!

  7. drpngx commented on Feb 18, 2018

    @drpngx
    Contributor

    @danbarnes333 yes that's right on.

    Maybe a stepping stone would be to allow people to link against the system protobuf during the configure step, via some environment variable or a configure flag. I think that would be a good contribution.

    We should also consider, at some point, distributing pip packages that are dependent on a libprotobuf package.

    CC @allenlavoie @skye

  8. RichDubielzig commented on Feb 22, 2018

    @RichDubielzig

    This would be useful to us as well. We are currently stuck in a situation where the protobuf symbols in libtensorflow_framework.so are being clobbered by symbols in a custom libprotobuf from a different API revision that is being loaded to support the operations of our custom backend to TensorFlow.

    In other words, we have this library dependency tree right now:

    • _pywrap_tensorflow_internal.so
      • libtensorflow_framework.so (contains protobuf 3.4 library)
      • our_high_level_library.so
        • our_device_library.so
          • libprotobuf.so (version 3.x)
  9. RichDubielzig commented on Mar 9, 2018

    @RichDubielzig

    We found a workaround by forcing bazel to use a protobuf version that matched the one used elsewhere on the system. Here is a patch that will force usage of the 3.4.0 library, but one can also point to any other archive tag on github.
    patch.tar.gz

  10. dbarnes commented on Mar 9, 2018

    @dbarnes

    @RichDubielzig that is what we have been doing, as well as hiding more symbols in the tensorflow shared library, and has been working ok. However @drpngx mentioned on my original issue that this isnt completely safe unless I misunderstood (about halfway down #8403) but perhaps things have changed since then. Either way simply building against the system protobuf would be great.

  11. 8 remaining items

  12. svenstaro commented on Mar 28, 2023

    @svenstaro
    ContributorAuthor

    This is definitely still valid.

  13. removed
    staleThis label marks the issue/pr stale - to be closed automatically if no activity
    on Mar 28, 2023
  14. github-actions commented on Sep 25, 2023

    @github-actions

    This issue is stale because it has been open for 180 days with no activity. It will be closed if no further activity occurs. Thank you.

  15. added
    staleThis label marks the issue/pr stale - to be closed automatically if no activity
    on Sep 25, 2023
  16. svenstaro commented on Sep 25, 2023

    @svenstaro
    ContributorAuthor

    It's still relevant.

  17. removed
    staleThis label marks the issue/pr stale - to be closed automatically if no activity
    on Sep 25, 2023
  18. github-actions commented on Mar 24, 2024

    @github-actions

    This issue is stale because it has been open for 180 days with no activity. It will be closed if no further activity occurs. Thank you.

  19. added
    staleThis label marks the issue/pr stale - to be closed automatically if no activity
    on Mar 24, 2024
  20. svenstaro commented on Mar 24, 2024

    @svenstaro
    ContributorAuthor

    It's still a problem.

  21. removed
    staleThis label marks the issue/pr stale - to be closed automatically if no activity
    on Mar 24, 2024
  22. added 2 commits that reference this issue on Aug 16, 2024
  23. svenstaro commented on Aug 17, 2024

    @svenstaro
    ContributorAuthor

    I don't see how #73933 fixes this.

  24. aikawayataro commented on Aug 18, 2024

    @aikawayataro

    Probably because issue # collided with openxla/xla#16104, which was closed in the imported patch
    Any way to reopen this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions