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 sets incorrect version for library #1231

Open
kendamaskareivis opened this issue Oct 6, 2023 · 1 comment
Open

CMake sets incorrect version for library #1231

kendamaskareivis opened this issue Oct 6, 2023 · 1 comment

Comments

@kendamaskareivis
Copy link

When compiling this library, incorrect version is linked to shared object file. I pulled latest 1.2.0 tag, it's creating 1.1.0 instead of 1.2.0.
https://github.com/redis/hiredis/blob/master/CMakeLists.txt#L53
https://github.com/redis/hiredis/blob/master/CMakeLists.txt#L167

Plus it would be very nice to also add in symlinking to major release so when compiling this library we would get .so .so.1 .so.1.x.x instead of currently .so .so.1.x.x

# Proper symlinks with correct Cmakefile
lrwxrwxrwx 1 root root     15 okt  6 13:33 libhiredis.so -> libhiredis.so.1
lrwxrwxrwx 1 root root     19 okt  6 13:33 libhiredis.so.1 -> libhiredis.so.1.2.0
-rwxrwxr-x 1 root root 106296 okt  6 13:33 libhiredis.so.1.2.0

# What current project Cmakefile is doing
lrwxrwxrwx 1 root root     19 okt  6 13:44 libhiredis.so -> libhiredis.so.1.1.0
-rwxrwxr-x 1 root root 106296 okt  6 13:44 libhiredis.so.1.1.0

This is caused because of improper CMake configuration and wrong hiredis.h header .so (shared object) definitions

@truongan07
Copy link

I get error ./hiredis-test: error while loading shared libraries: libhiredis.so.1.1.0: cannot open shared object file: No such file or directory on hiredis-1.2.0. How to fix ?

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

2 participants