fix: resolve static linking failures with OpenSSL and duplicate symbols#438
fix: resolve static linking failures with OpenSSL and duplicate symbols#438dkropachev wants to merge 5 commits intomasterfrom
Conversation
97356ff to
3b91f17
Compare
|
I am not sure if I took correct way regarding |
No, it's not correct. The real problem in the first place is is that they are duplicated in the sources. I think a proper solution is to delete them from the Optionally, we could make the stubs present in |
Agreed.
Do we need to? Can't we use the stubs from integration.rs? |
I do propose using stubs from |
|
Sysexit or other abort method sounds reasonable. |
|
Guys, could you please tell me what to do with the pr |
|
Section "Fix: Duplicate symbol guards (src/testing_unimplemented.cpp)" should be reverted. The correct fix is to remove those symbols from testing_unimplemented.cpp |
wprzytula
left a comment
There was a problem hiding this comment.
Please improve commit messages. I can't read them.
| - name: Build and test RPM packages | ||
| run: make test-package-rpm-native SCYLLA_HOST=scylla SKIP_DOCKER_COMPOSE=1 | ||
| run: make test-package-rpm-native SCYLLA_HOST=scylla SKIP_DOCKER_COMPOSE=1 SCYLLA_SMOKE_BUILD_STATIC=ON | ||
|
|
||
| - name: Collect artifacts | ||
| if: inputs.save-artifacts | ||
| run: make collect-package-artifacts | ||
|
|
||
| - uses: actions/upload-artifact@v4 | ||
| if: inputs.save-artifacts | ||
| with: | ||
| name: linux-rpm-packages | ||
| path: artifacts/linux | ||
| retention-days: 7 | ||
|
|
||
| macos: | ||
| name: macOS packages | ||
| runs-on: macos-15-intel | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
|
||
| - name: Install GNU make | ||
| run: brew install make | ||
|
|
||
| - name: Build and test macOS packages (PKG + DMG) | ||
| run: gmake test-package-macos | ||
| run: gmake test-package-macos SCYLLA_SMOKE_BUILD_STATIC=ON | ||
|
|
||
| - name: Verify static linking builds (regression test for issue #164) | ||
| run: | | ||
| gmake build-static-integration-test-bin | ||
| rm -rf build_static | ||
|
|
||
| - name: Collect artifacts | ||
| if: inputs.save-artifacts | ||
| run: gmake collect-package-artifacts | ||
|
|
||
| - uses: actions/upload-artifact@v4 | ||
| if: inputs.save-artifacts |
There was a problem hiding this comment.
❓ Why are you adding SCYLLA_SMOKE_BUILD_STATIC=ON everywhere?
There was a problem hiding this comment.
My bad, removed it
There was a problem hiding this comment.
commit Keep Windows package builds from exporting a literal OpenSSL variable name: commit message is not readable. Also, it contains magic formulas like Rejected: etc. Please write the commit message suitable for human reviewers.
Publish the static driver's transitive dependencies in generated pkg-config metadata, teach the smoke app to consume static pkg-config output safely, and add package-level/static-integration checks that exercise the installed artifacts.\n\nThis keeps installed static consumers aligned with the in-tree target and makes the Windows OpenSSL external-project path explicit during static integration builds.
The Rust integration layer already provides these test-only symbols when cpp_integration_testing is enabled. Drop the duplicate C++ stubs from testing_unimplemented.cpp so static integration builds link against a single definition.
Build the OPENSSL_LIBS environment variable with an explicit join instead of relying on PowerShell interpolation. This keeps openssl-sys from seeing a literal variable name in package and static-integration builds.
Add dedicated static-smoke make targets and call them directly from the package workflow. This keeps CI failures scoped to one smoke mode and avoids threading SCYLLA_SMOKE_BUILD_STATIC through the workflow YAML.
c3db5d3 to
5f4f201
Compare
Summary
Fix the static-linking regressions behind
#164at the installed-package boundary, not just for the in-tree integration binary. The branch now publishes the static driver's transitive link requirements through pkg-config, teaches the package smoke app to consume that metadata safely, removes duplicate testing stubs from the C++ side, and keeps the package CI coverage readable with dedicated static-smoke targets.Fixes: #164
What Changed
scylla-cpp-driver_static.pcsrc/testing_unimplemented.cppthat are already provided by the Rust integration layer duringcpp_integration_testingOPENSSL_LIBSassemblyOPENSSL_LIBSwith an explicit join soopenssl-sysreceives real library names in package and static-integration buildsSCYLLA_SMOKE_BUILD_STATIC=ONthrough CI YAMLCommit Structure
c1eeee8static linking: support installed consumers and package checks61d6d5ftesting: remove duplicate static-integration stubs1dd2538windows: assemble OPENSSL_LIBS from discovered libraries08cec82ci: split static package smoke checks into dedicated targets5f4f201gitignore: ignore build_staticTesting
cmake -S . -B /tmp/cpp-rs-driver-cmake-check -G Ninja -DCMAKE_BUILD_TYPE=Releasemake checkmake run-test-unitcmake -S . -B /tmp/cpp-rs-driver-install-build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/cpp-rs-driver-install-prefix && cmake --build /tmp/cpp-rs-driver-install-build -j 4 && cmake --install /tmp/cpp-rs-driver-install-buildPKG_CONFIG_PATH=/tmp/cpp-rs-driver-install-prefix/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig cmake -S packaging/smoke-test-app -B /tmp/cpp-rs-driver-smoke-build -G Ninja -DCMAKE_BUILD_TYPE=Release -DSCYLLA_SMOKE_BUILD_STATIC=ON && PKG_CONFIG_PATH=/tmp/cpp-rs-driver-install-prefix/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig cmake --build /tmp/cpp-rs-driver-smoke-build -j 4cmake --build build_static -j 4 --target cassandra-integration-testsmake -n OS=Windows_NT build-driver CMAKE_BUILD_TYPE=Release | rg "OPENSSL_LIBS|Join\(':', @\("make -n OS=Windows_NT build-static-integration-test-bin | rg "OPENSSL_LIBS|Join\(':', @\("make -n test-package-deb-static-smokemake -n test-package-rpm-native-static-smoke SCYLLA_HOST=scylla SKIP_DOCKER_COMPOSE=1make -n test-package-macos-static-smokePre-review checklist
Makefilein{SCYLLA,CASSANDRA}_(NO_VALGRIND_)TEST_FILTER.Fixes:annotations to PR description.