FS#63346 - [python-pytorch-cuda] uses wrong protobuf version

Attached to Project: Community Packages
Opened by Noone (einhorn) - Friday, 02 August 2019, 12:43 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Monday, 05 October 2020, 04:27 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Konstantin Gizdov (kgizdov)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

package: python-pytorch-cuda v1.1.0-8

Description:

When installing python-pytorch-cuda with pacman, it installs protobuf-3.7.0-1 as a dependency. When building a *.cpp file containing caffe2 code, the build process fails with:

/usr/bin/c++ -DGFLAGS_IS_A_DLL=0 -isystem /usr/include/torch/csrc/api/include -isystem /opt/cuda/include -g -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++11 -o CMakeFiles/example-caffe2.dir/caffe2/example.cpp.o -c /home/sebastian/work/geovideo-lab-superresolution/test-bench/cpp/caffe2/example.cpp
In Datei, eingebunden von /usr/include/caffe2/proto/caffe2_pb.h:4,
von /usr/include/caffe2/core/context_base.h:7,
von /usr/include/caffe2/core/context.h:10,
von /usr/include/caffe2/core/storage.h:14,
von /usr/include/caffe2/core/tensor.h:4,
von /usr/include/caffe2/core/blob.h:14,
von /usr/include/caffe2/core/net.h:14,
von /home/sebastian/work/geovideo-lab-superresolution/test-bench/cpp/caffe2/example.cpp:1:
/usr/include/caffe2/proto/caffe2.pb.h:17:2: Fehler: #error This file was generated by an older version of protoc which is
17 | #error This file was generated by an older version of protoc which is
| ^~~~~
/usr/include/caffe2/proto/caffe2.pb.h:18:2: Fehler: #error incompatible with your Protocol Buffer headers. Please
18 | #error incompatible with your Protocol Buffer headers. Please
| ^~~~~
/usr/include/caffe2/proto/caffe2.pb.h:19:2: Fehler: #error regenerate this file with a newer version of protoc.
19 | #error regenerate this file with a newer version of protoc.
| ^~~~~
In Datei, eingebunden von /usr/include/caffe2/utils/filler.h:8,
von /usr/include/caffe2/core/operator_schema.h:16,
von /usr/include/caffe2/core/net.h:18,
von /home/sebastian/work/geovideo-lab-superresolution/test-bench/cpp/caffe2/example.cpp:1:
/usr/include/caffe2/utils/math.h:18:10: schwerwiegender Fehler: caffe2/utils/math/broadcast.h: Datei oder Verzeichnis nicht gefunden
18 | #include "caffe2/utils/math/broadcast.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kompilierung beendet.

I'm sorry my outputs are partly in German. Most parts are understandable, but the part after "broadcast.h" means: "File or directory not found" and "finished compiling" in the last line.

When searching my system for protobuf with "sudo find / -name "protoc" I find:

/usr/bin/protoc
/usr/lib/python3.7/site-packages/torch/bin/protoc

With:

$ protoc --version
libprotoc 3.7.0
$ /usr/bin/protoc --version
libprotoc 3.7.0
$ /usr/lib/python3.7/site-packages/torch/bin/protoc --version
libprotoc 3.6.1

I suspect python-pytorch-cuda was shipped with the correct protobuf package, but uses the wrong one. Caffe2 requires protobuf 3.6.1, but uses protobuf 3.7.0. How do I get pytorch/caffe2 to use protobuf 3.6.1?

Thank you.

This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Monday, 05 October 2020, 04:27 GMT
Reason for closing:  No response
Additional comments about closing:  It probably works now but I received no response from the user. Reopen if it remains an issue.
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 29 October 2019, 08:43 GMT Comment by Sven-Hendrik Haase (Svenstaro) - Monday, 07 September 2020, 06:26 GMT
We can now compile against system protobuf so please check 1.6.0-4 and report results.

Loading...