-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
No local rpath settings #36
Comments
Thanks for sending this as a pull request, much easier to keep track of things :-) I've removed the rpath flag in 4feec1f. However, I don't agree with the install target: when you're packaging, you a) know the version and b) know where to install the libraries, so why do this as well in the Makefile? When hiredis is compiled and installed from source, the person using it is aware that upgrades overwrite the existing library... |
Thanks for removing the rpath! The reasons for the versionto be included are that: (1) When a new release is made, just the VERSION is increased, and it reflects in your original sources. You can also refer 3.4 Creating a Shared Library from: http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN95 |
Ok, I'm convinced :-). Added this in 81c00aa. Note that I use both the major and minor version in the soname because the API may change between minors (but not between patch versions), in contrary to what I believe the convention is (use only the major version in the soname). |
When packaging software, the installed executables will obtain the library paths from the environment. Hence, it is not recommended to use a local rpath. The patch below removes hard-coding of the same, and also creates versioned shared libraries.
diff -up antirez-hiredis-0fbfa45/Makefile.fix antirez-hiredis-0fbfa45/Makefile$(OPTIMIZATION) -fPIC -Wall -W -Wwrite-strings $ (ARCH) $(PROF)
--- antirez-hiredis-0fbfa45/Makefile.fix 2011-04-19 13:06:43.214439002 +0530
+++ antirez-hiredis-0fbfa45/Makefile 2011-04-19 13:12:52.137439004 +0530
@@ -27,9 +27,12 @@ else ifeq ($(uname_S),Darwin)
else
CFLAGS?=-std=c99 -pedantic
CCLINK?=-lm -pthread
DYLIBNAME?=libhiredis.so
STLIBNAME?=libhiredis.a
STLIB_MAKE_CMD?=ar rcs ${STLIBNAME} ${OBJ}
endif
@@ -53,6 +56,8 @@ test.o: test.c hiredis.h
${DYLIBNAME}: ${OBJ}
${DYLIB_MAKE_CMD}
${STLIBNAME}: ${OBJ}
${STLIB_MAKE_CMD}
The text was updated successfully, but these errors were encountered: