Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#56943 - [python-tensorflow-cuda] rebuild with protobuf 3.5

Attached to Project: Community Packages
Opened by André (aandre) - Wednesday, 03 January 2018, 21:11 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Tuesday, 31 July 2018, 18:46 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

It looks like python-tensorflow-cuda needs to be rebuild for protobuf 3.5.

For example
/usr/lib/python3.6/site-packages/tensorflow/include/google/protobuf/any.pb.h
contains
```
#if GOOGLE_PROTOBUF_VERSION < 3004000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3004000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
```
Additional info:
* package version 1.4.1-2
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Tuesday, 31 July 2018, 18:46 GMT
Reason for closing:  Fixed
Comment by André (aandre) - Friday, 05 January 2018, 16:59 GMT
Let me add some details.

I have a program with Python interface that depends on Protobuf. When I try to import tensorflow I get the error show above.
To reproduce the problem install python-tensorflow-cuda and run
$ LD_PRELOAD=/usr/lib/libprotobuf.so python3
and inside python
>>> import tensorflow

Now the error is shown.
Comment by Sven-Hendrik Haase (Svenstaro) - Sunday, 07 January 2018, 15:09 GMT
Please test now.
Comment by André (aandre) - Monday, 08 January 2018, 18:21 GMT
Thanks for the rebuild. But it didn't solve the issue.

I digged into it and noticed that tensorflow uses its own protobuf version (not the system one).
After applying the attached to `tensorflow/workspace.bzl` and a long build the error is gone.

Maybe there is a way to use protobuf from system with bazel to reduce build time.
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 13 January 2018, 18:25 GMT
I reported the problem here: https://github.com/tensorflow/tensorflow/issues/16104

I can't see a way to make it use the system-installed package. I don't think your patch will fix this problem as it would break again with the next version and besides it would still build its own version of protobuf.
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 03 February 2018, 04:15 GMT
Status: Upstream acknowledged the problem on their side.
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 31 July 2018, 18:46 GMT
I guess this is now technically fixed since we now ship the same version of protobuf as we use in the tensorflow package. Sadly, this is only coincidental and will not last. I'll still close this issue as the upstream issue I made tracks this better.

Loading...