victoryang / elibot-apiserver

A api server for elibot written in Go
1 stars 0 forks source link

Grpc c++ client: cross-compile for protobuf, libstdc++ error #5

Open victoryang opened 6 years ago

victoryang commented 6 years ago

Error message: ./list_people_cpp: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/libprotobuf.so.15)

victoryang commented 6 years ago

Libstdc++.so.6.20 is installed on arm board, which is compiled by gcc 4.8, while I'm trying to build protobuf(which has dependency on c++11) on my Ubuntu 16.04, which had gcc 5.4 installed. So I got a binary libprotobuf.so which needs a more fresh c++ lib installed.

Some solutions:

  1. upgrade arm board.
  2. use LDFLAGS -static-libstdc++ to compile with static c++ library.
  3. switch to another OS which has gcc 4.8 installed, like centOS 7 or Ubuntu 14.04