Fix shared object ABI exports (#5144) (#11032)

On some linkers, the ABI definitions in src/libprotoc.map and friends do not match all symbols that need to be exported. This causes a linker error when trying to use the resulting shared object library: `undefined reference to 'scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto'`

Quite a few people seem to be affected by this, see #5144 for discussion. It seems that yocto now applies this patch itself, but that doesn't help people building in other places (I encountered this on some HPC machines), so it would probably be good to apply it upstream as well.

Closes #11032

COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/11032 from LourensVeen:issue-5144-linker-maps 3039f932aa
PiperOrigin-RevId: 512810858
pull/12046/head
Lourens Veen 2 years ago committed by Copybara-Service
parent dd9dd86fbc
commit 462964ed32
  1. 2
      src/libprotobuf-lite.map
  2. 2
      src/libprotobuf.map
  3. 2
      src/libprotoc.map

@ -3,6 +3,8 @@
extern "C++" {
*google*;
};
scc_info_*;
descriptor_table_*;
local:
*;

@ -3,6 +3,8 @@
extern "C++" {
*google*;
};
scc_info_*;
descriptor_table_*;
local:
*;

@ -3,6 +3,8 @@
extern "C++" {
*google*;
};
scc_info_*;
descriptor_table_*;
local:
*;

Loading…
Cancel
Save