Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake build system does not make linker use version scripts #6113

Closed
Arfrever opened this issue May 8, 2019 · 0 comments · Fixed by #9545
Closed

cmake build system does not make linker use version scripts #6113

Arfrever opened this issue May 8, 2019 · 0 comments · Fixed by #9545
Labels

Comments

@Arfrever
Copy link
Contributor

Arfrever commented May 8, 2019

Only Autotools build system uses version scripts:

$ grep -r -- --version-script *
configure.ac:LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
src/Makefile.am:libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map
src/Makefile.am:libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map
src/Makefile.am:libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map

Each of 3 version scripts (src/libprotobuf.map, src/libprotobuf-lite.map, src/libprotoc.map) is currently the same:

{
  global:
    extern "C++" {
      *google*;
    };

  local:
    *;
};

Not passing -Wl,--version-script=... option causes that symbols other than *google* are not hidden. See commit 13d165d by @afrantzis.

@BSBandme BSBandme added the cmake label May 8, 2019
hyunjae92-shin pushed a commit to webosose/meta-webosose that referenced this issue Jan 21, 2021
:Release Notes:
Fix linking error with ld-gold

:Detailed Notes:
protocolbuffers/protobuf#6113
There's a bug in the CMake build leading it to not use the version
scripts, which hides the problem (because all symbols are now public)
but doesn't solve it properly.

:Testing Performed:
Build and test done.

:QA Notes:
N/A

:Issues Addressed:
[PLAT-130506] [webOS OSE]: Service does not exist error message is
                           displayed.
[PLAT-130467] Fix build error for libgoogleassistant with latest
              protobuf-3.11.4
[PLAT-130489] CCC: protobuf=webos2

Change-Id: Id604f45aa06253dfffaa89c52b30c84a51f08bbc
Arfrever added a commit to Arfrever/protobuf that referenced this issue Feb 24, 2022
Autotools build system already uses linker version scripts since
commit 13d165d.

Fixes: protocolbuffers#6113
Arfrever added a commit to Arfrever/protobuf that referenced this issue Feb 28, 2022
Autotools build system already uses linker version scripts since
commit 13d165d.

Fixes: protocolbuffers#6113
acozzette pushed a commit that referenced this issue Mar 2, 2022
Autotools build system already uses linker version scripts since
commit 13d165d.

Fixes: #6113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants