Skip to content

Fix installation of the unversioned shared library symlink - #506

Open
riken127 wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
riken127:fix/install-shared-library-namelink
Open

Fix installation of the unversioned shared library symlink#506
riken127 wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
riken127:fix/install-shared-library-namelink

Conversation

@riken127

Copy link
Copy Markdown

Fixes #331.

The current CMake installation rules install the versioned shared library files:

  1. libfunctions_framework_cpp.so.1.3.0
  2. libfunctions_framework_cpp.so.1.3

but omit the unversioned development symlink:

  1. libfunctions_framework_cpp.so

The installation configuration used separate LIBRARY clauses with NAMELINK_SKIP and NAMELINK_COMPONENT. Consolidating them into a single LIBRARY clause allows CMake to install the versioned library files as part of the runtime component and the unversioned namelink as part of the development component.

Validation

Configured and installed the project with:


cmake -S . -B build \
  -DBUILD_SHARED_LIBS=ON \
  -DBUILD_TESTING=OFF \
  -DCMAKE_INSTALL_PREFIX="$PWD/staging"

cmake --build build
cmake --install build

The complete installation now contains:

libfunctions_framework_cpp.so -> libfunctions_framework_cpp.so.1.3
libfunctions_framework_cpp.so.1.3 -> libfunctions_framework_cpp.so.1.3.0
libfunctions_framework_cpp.so.1.3.0

Component-specific installation was also verified:

runtime:
  libfunctions_framework_cpp.so.1.3
  libfunctions_framework_cpp.so.1.3.0

development:
  libfunctions_framework_cpp.so

@riken127
riken127 requested a review from a team as a code owner July 22, 2026 10:11
@google-cla

google-cla Bot commented Jul 22, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@scotthart

Copy link
Copy Markdown
Collaborator

/gcbrun

@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.89%. Comparing base (8baacc8) to head (16e1fb0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #506   +/-   ##
=======================================
  Coverage   85.89%   85.89%           
=======================================
  Files          96       96           
  Lines        2814     2814           
  Branches      203      203           
=======================================
  Hits         2417     2417           
  Misses        282      282           
  Partials      115      115           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing .so file / symlink after library is installed

2 participants