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

libfb303_thrift_cpp.so.1.0.0 doesn't have a SONAME #7

Open
yurivict opened this issue Nov 22, 2020 · 5 comments
Open

libfb303_thrift_cpp.so.1.0.0 doesn't have a SONAME #7

yurivict opened this issue Nov 22, 2020 · 5 comments

Comments

@yurivict
Copy link

rev. 94cac88

@yfeldblum
Copy link
Contributor

Would you submit a PR?

@michel-slm

@michel-slm
Copy link
Contributor

So this is intentional - since fb303's API is not stable, leaving the SONAME unset means CMake uses the same value for version and soname. Packagers building shared libraries should make sure to always bump the version.

I'm open to better ideas, or maybe we should just document this better.

@yurivict
Copy link
Author

You don't set SONAME at all. You should add the corresponding argument to the link command.

@michel-slm
Copy link
Contributor

michel-slm commented Nov 23, 2020

see https://cmake.org/cmake/help/latest/prop_tgt/VERSION.html

For shared libraries VERSION and SOVERSION can be used to specify the build version and API version respectively. When building or installing appropriate symlinks are created if the platform supports symlinks and the linker supports so-names. If only one of both is specified the missing is assumed to have the same version number.

Oh, wait, you mean SONAME, not SOVERSION. Where would you suggest it should be set? libfb303_thrift_cpp is eventually generated by this (add_fbthrift_library invokes add_fbthrift_cpp_library)

# Now emit the library rule to compile the sources
if (BUILD_SHARED_LIBS)
set(LIB_TYPE SHARED)
else ()
set(LIB_TYPE STATIC)
endif ()
add_library(
"${LIB_NAME}" ${LIB_TYPE}
${generated_sources}
)

@yfeldblum
Copy link
Contributor

Closing due to age.

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

No branches or pull requests

3 participants