Skip to content

Commit

Permalink
Fix shared object ABI exports (protocolbuffers#5144) (protocolbuffers…
Browse files Browse the repository at this point in the history
…#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 protocolbuffers#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 protocolbuffers#11032

COPYBARA_INTEGRATE_REVIEW=protocolbuffers#11032 from LourensVeen:issue-5144-linker-maps 3039f93
PiperOrigin-RevId: 512810858
  • Loading branch information
LourensVeen authored and copybara-github committed Feb 28, 2023
1 parent dd9dd86 commit 462964e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libprotobuf-lite.map
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
extern "C++" {
*google*;
};
scc_info_*;
descriptor_table_*;

local:
*;
Expand Down
2 changes: 2 additions & 0 deletions src/libprotobuf.map
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
extern "C++" {
*google*;
};
scc_info_*;
descriptor_table_*;

local:
*;
Expand Down
2 changes: 2 additions & 0 deletions src/libprotoc.map
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
extern "C++" {
*google*;
};
scc_info_*;
descriptor_table_*;

local:
*;
Expand Down

0 comments on commit 462964e

Please sign in to comment.