Aborted core dumped when executing grpc route_guide

  • Steps to reproduce:
    Execute in one terminal ./route_guide_server, and execute in another terminal ./route_guide_client. When executing ./route_guide_client, an error displays "Aborted (core dumped)"
  • Find the problem:
    1. Use gdb, execute gdb ./route_guild_client, and runthen display received signal SIGABRT. View bt, it is shown that __GI_abort() is caused by calling grpc_slice_malloc() in /usr/local/lib/libgrpc++.so.1. In fact, the location of the lib to install grpc is in ~/.local/lib, use nm -A ~/.local/lib/libgrpc++* 2>/dev/null | grep "grpc_slice_malloc" indeed found in libgrpc++. There is a symbol of grpc_slice_malloc in a.
    2. Check the Makefile, add -L/usr/local/lib to the LDFLAGS line, indicating that it is looking for the lib file in /usr/local/lib, and then pkg-config --libs protobuf grpc++display -L/[homedir]/.local/lib at the beginning, so in the Makefile Directly remove -L/usr/local/lib, recompile and execute
  • Solve the problem:
    remove -L/usr/local/lib in the Makefile, recompile and execute

Guess you like

Origin blog.csdn.net/iamanda/article/details/112464748