Setting custom prefix is ignored during install
ForrestCKoch opened this issue · 2 comments
ForrestCKoch commented
The supplied Makefile ignores the prefix variable set during configuration.
Steps to reproduce:
wget "https://github.com/hasindu2008/slow5tools/releases/download/v1.2.0/slow5tools-v1.2.0-release.tar.gz"
tar -xzf slow5tools-v1.2.0-release.tar.gz
cd slow4tools-v1.2.0
./configure --prefix=$HOME/.local # or any other directory
make
make install
Problem:
make install
throws an error
mkdir -p /usr/local/bin
cp -f slow5tools /usr/local/bin
cp: cannot create regular file '/usr/local/bin/slow5tools': Permission denied
make: *** [Makefile:154: install] Error 1
Expected behavior:
The binaries should be installed into the requested location
Possible Solution:
There seem to be two problems. The config.mk
file does not set the PREFIX variable. This is what mine looks like.
LIBS = -lhdf5 -lz
LDFLAGS =
CPPFLAGS =
HDF5 = autoconf
disable_hdf5 =
ifeq "locallibhdf5-no" "locallibhdf5-yes"
CPPFLAGS += -I./hdf5/include/
LDFLAGS += hdf5/lib/libhdf5.a -ldl
endif
ifeq "locallibzstd-no" "locallibzstd-yes"
zstd_local = ../zstd/lib/
LDFLAGS += zstd/lib/libzstd.a
endif
Even if it did set the PREFIX variable, the Makefile would overwrite at
Line 39 in cdc52c8
hasindu2008 commented
Hello
Thanks for the feedback. Indeed, I have not implemented this PREFIX option. I will get it fixed and released in the next version :)
hasindu2008 commented
@ForrestCKoch
Could you check if it works for you with the latest slow5tools version?