-
Notifications
You must be signed in to change notification settings - Fork 1.6k
build: add soname to shared libraries #2521
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,16 @@ option (Seastar_DEPRECATED_OSTREAM_FORMATTERS | |
"Enable operator<< for formatting standard library containers, which will be deprecated in future" | ||
ON) | ||
|
||
set (Seastar_RELEASE_DATE | ||
20221127 | ||
CACHE | ||
STRING | ||
"Last release date") | ||
|
||
set_property (CACHE Seastar_RELEASE_DATE | ||
PROPERTY | ||
STRINGS 20221127) | ||
|
||
set (Seastar_API_LEVEL | ||
"7" | ||
CACHE | ||
|
@@ -780,6 +790,15 @@ add_library (seastar | |
src/websocket/server.cc | ||
) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Actually a neat idea. But note, API levels are only about source-level compatibility. It's possible for a function signature to change without change the API level. Example: if we add a trailing default parameters to a function, it's still source compatible, but links against an older .so will fail. Given this, is this still helpful for you? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Am happy to follow up with another change. It would be nice not to carry patches, but yes ideally soname would reflect ABI compatibility, not API compatibility. Still learning about Seastar, so not sure how often ABI is broken in a backwards incompatible manner. If the release year and month is used, then this would always increment the soname, and it would be assumed that typically ABI is broken on each update. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One could run a tool such as libabigail when doing a release and then automatically bump the soname if there is an ABI change. |
||
# Shared library soname | ||
set_target_properties(seastar PROPERTIES | ||
VERSION ${PROJECT_VERSION}.${Seastar_API_LEVEL}.${Seastar_RELEASE_DATE} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In semantic versioning (semver), a version number consists of three components: MAJOR.MINOR.PATCH. The major version number changes least frequently and indicates incompatible API changes. The minor version is incremented more often for backward-compatible feature additions, while the patch version is used for backward-compatible bug fixes. The
Based on the discussion above, I suggest:
|
||
SOVERSION ${PROJECT_VERSION}) | ||
|
||
# We disable _FORTIFY_SOURCE because it generates false positives with longjmp() (src/core/thread.cc) | ||
set_source_files_properties(src/core/thread.cc | ||
PROPERTIES COMPILE_FLAGS -U_FORTIFY_SOURCE) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you are partially reverting c96444f. probably want to drop this change? |
||
|
||
add_library (Seastar::seastar ALIAS seastar) | ||
|
||
add_dependencies (seastar | ||
|
@@ -1170,6 +1189,10 @@ if (Seastar_INSTALL OR Seastar_TESTING) | |
src/testing/seastar_test.cc | ||
src/testing/test_runner.cc) | ||
|
||
set_target_properties(seastar_testing PROPERTIES | ||
VERSION ${PROJECT_VERSION}.${Seastar_API_LEVEL}.${Seastar_RELEASE_DATE} | ||
SOVERSION ${PROJECT_VERSION}) | ||
|
||
add_library (Seastar::seastar_testing ALIAS seastar_testing) | ||
|
||
target_compile_definitions (seastar_testing | ||
|
@@ -1189,6 +1212,9 @@ if (Seastar_INSTALL OR Seastar_TESTING) | |
include/seastar/testing/perf_tests.hh | ||
tests/perf/perf_tests.cc | ||
tests/perf/linux_perf_event.cc) | ||
set_target_properties(seastar_perf_testing PROPERTIES | ||
VERSION ${PROJECT_VERSION}.${Seastar_API_LEVEL}.${Seaster_RELEASE_DATE} | ||
SOVERSION ${PROJECT_VERSION}) | ||
add_library (Seastar::seastar_perf_testing ALIAS seastar_perf_testing) | ||
target_compile_definitions (seastar_perf_testing | ||
PRIVATE ${Seastar_PRIVATE_COMPILE_DEFINITIONS}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need a property for the release date?