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

make install won't work when INCLUDE_PATH/LIBRARY_PATH is colon seperated #382

Closed
owensss opened this issue Nov 26, 2015 · 3 comments
Closed

Comments

@owensss
Copy link

owensss commented Nov 26, 2015

according to Makefile Line 22
INSTALL_INCLUDE_PATH= $(DESTDIR)$(PREFIX)/$(INCLUDE_PATH)

if user set INCLUDE_PATH(which is an environment variable affecting gcc) to some colon seperated string , the header file installation path will be /usr/local//somepath1:/somepath2/libhiredis.so.0.13, this is apparently not a proper position.

same thing with LIBRARY_PATH


example

the following is a dry run result in my laptop.

 $ export INCLUDE_PATH=/somepath1:/somepath2
 $ export LIBRARY_PATH=/somepath1:/somepath2  
$ make -n install 
mkdir -p /usr/local//somepath1:/somepath2 /usr/local//somepath1:/somepath2
cp -a hiredis.h async.h read.h sds.h adapters /usr/local//somepath1:/somepath2
cp -a libhiredis.so /usr/local//somepath1:/somepath2/libhiredis.so.0.13
cd /usr/local//somepath1:/somepath2 && ln -sf libhiredis.so.0.13 libhiredis.so
cp -a libhiredis.a /usr/local//somepath1:/somepath2
mkdir -p /usr/local//somepath1:/somepath2/pkgconfig
cp -a hiredis.pc /usr/local//somepath1:/somepath2/pkgconfig

solve

I think change ?= to = in line 19, 20, 21 will solve the problem

@badboy
Copy link
Contributor

badboy commented Nov 26, 2015

INCLUDE_PATH is not used by gcc, it uses C_INCLUDE_PATH. LIBRARY_PATH is indeed used, so it might be valid to assume we shouldn't use it.
Changing from ?= to = would make it useless, because it is that way to specifically set these from the outside (not sure if anyone really used it, but here we are)

@ryandesign
Copy link
Contributor

You've fixed this before; see #176. Please fix it again. Reusing compiler environment variables for your own purposes is problematic.

@michael-grunder
Copy link
Collaborator

Closing this issue in favor of #806, which should solve the problem and a few others.

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

4 participants