Protobuf fatal error

Hi,

I try to run a project on Jetson Nano, which already runned succesfully on other Jetson device.

While building a part which compiles protobuff and tensorflow I get following error:

fatal error: google/protobuf/port_def.inc: No such file or directory
 #include <google/protobuf/port_def.inc>

I’ve already tried different versions of libprotoc, now it’s set to 3.8.0 like on the mentioned Jetson where it runned successfully.

Anybody has any ideas how to solve it?

Regards!
Piotrek

How are you trying to install tensorflow?

Hi,

You can try to upgrade the protobuf version to see if helps:

$ sudo apt-get install python3-pip
$ sudo pip3 install -U pip testresources setuptools

$ sudo pip3 install -U protobuf

By the way, you don’t need to build TensorFlow on your own.
We built several TensorFlow packages and you can install it directly with the instructions here:
https://docs.nvidia.com/deeplearning/frameworks/install-tf-jetson-platform/index.html

Thanks.

Thanks for reply.

Well, i’ve just copied installed libraries from another jetson device.

I followed the steps and I got such output:

Requirement already up-to-date: protobuf in /usr/local/lib/python3.6/dist-packages (3.11.3)
Requirement already satisfied, skipping upgrade: six>=1.9 in /usr/lib/python3/dist-packages (from protobuf) (1.11.0)
Requirement already satisfied, skipping upgrade: setuptools in /usr/local/lib/python3.6/dist-packages (from protobuf) (46.0.0)

What is more, I believe it didn’t affect the protobuf installed by me before.
Still :

piotrek@JetsonNano:~$ which protoc
/usr/local/bin/protoc
piotrek@JetsonNano:~$ protoc --version
libprotoc 3.8.0

3.8.0 is actually the version which I wanted, but still I get mentioned error :(

Ok guys, thank you for any advice.

I’ve solved it.

Finally, I went to the directory :

/usr/local/include/google/protobuf

and it appeared that it lucks some files, for example: port_def.inc

I copied the whole protobuf directory from the other jetson and it now works properly.

Good to know this.
Thanks for the update.