Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check protoc version if same as libprotobuf?

I have protoc --version:

libprotoc 3.12.4

But locate libprotbuf:

locate libprotobuf        
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.a
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.23
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.23.0.4
/usr/lib/x86_64-linux-gnu/libprotobuf.a
/usr/lib/x86_64-linux-gnu/libprotobuf.so
/usr/lib/x86_64-linux-gnu/libprotobuf.so.23
/usr/lib/x86_64-linux-gnu/libprotobuf.so.23.0.4

I am confused here, how to check if 23 == 3.12??

like image 934
Nicholas Jela Avatar asked Oct 17 '25 08:10

Nicholas Jela


1 Answers

The number after the library name is called SOVERSION, which stands for shared object version. It is changed when incompatible changes are made to the library.

For the protobuf 3.x series, SOVERSION equals 11 + x, as defined in update_version.py.

Protobuf 3.12 should therefore be libprotobuf.so.23, like you have.

Another way is to check PROTOBUF_VERSION define in Makefile.am of the specific version. In GitHub you can select the version tag from the dropdown menu at the top.

like image 86
jpa Avatar answered Oct 21 '25 01:10

jpa