0

I'm developing an C++ application under Ubuntu 16 using google protobuf. When I compile and run at the same machine, it works fine, but when I try to run it at another Ubuntu 16 I get the following error

./APP: Symbol `_ZTVN6google8protobuf11MessageLiteE' has different size in shared object, consider re-linking
./APP: Symbol `_ZTVN6google8protobuf7MessageE' has different size in shared object, consider re-linking

If I compile the same source at this second machine it works fine, but if I run at the first machine, I get the error too.

I tried to copy all the libraries listed with ldd to an path at the other machine and I user the export LD_LIBRARY_PATH, and not working too.

ldd result at both machines are the same.

linux-vdso.so.1 =>  (0x00007ffd40fda000)
libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007f011b4b3000)
libzmq.so.5 => /usr/lib/x86_64-linux-gnu/libzmq.so.5 (0x00007f011b24d000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f011b030000)
libprotobuf.so.22 => /usr/local/lib/libprotobuf.so.22 (0x00007f011ab87000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f011a805000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f011a5ef000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f011a225000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f011a021000)
libsodium.so.18 => /usr/lib/x86_64-linux-gnu/libsodium.so.18 (0x00007f0119dc3000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f0119bbb000)
/lib64/ld-linux-x86-64.so.2 (0x00007f011b788000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f01198b2000)
rici
  • 234,347
  • 28
  • 237
  • 341
Adm
  • 37
  • 8
  • How are you linking the proto library? This possibly-related question suggests building it from source: https://stackoverflow.com/q/47900268/5535482 – Greg Krimer May 09 '20 at 02:57
  • thanks for the answer. But it's different, I'm using cmake to link the library, and that library is compiled at my enviroment and installed at my linux following the instructions below https://github.com/protocolbuffers/protobuf/blob/master/src/README.md – Adm May 09 '20 at 18:21

0 Answers0