I'm installing softwares on a cluster so that I can run a pipeline. Right now, I'm installing Stacks and seeing an error.
This is the way I'm installing the program:
###########################################################################
# Stacks
cd ~/programs/
wget http://catchenlab.life.illinois.edu/stacks/source/stacks-1.42.tar.gz
tar -zxf stacks-1.42.tar.gz
cd ~/programs/stacks-1.42
./configure prefix=$HOME/programs/stacks-1.42
make
make install prefix=$HOME/programs/stacks-1.42
###########################################################################
This is the error:
install -p bgzip htsfile tabix /home/username/programs/stacks-1.42/bin
if test -n ""; then install -p ; fi
install -p -m 644 htslib/*.h /home/username/programs/stacks-1.42/include/htslib
install -p -m 644 libhts.a /home/username/programs/stacks-1.42/lib/libhts.a
install -p -m 644 htsfile.1 tabix.1 /home/username/programs/stacks-1.42/share/man/man1
install: cannot stat `htsfile.1': No such file or directory
install: cannot stat `tabix.1': No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/sb/home/username/programs/stacks-1.42/htslib'
make: *** [install-recursive] Error 1
Do you know what am I doing wrong?
Normally, configure take options preceded by -- (two hyphens), i.e. --prefix=... Fix this and see if it now works. You also don't need to use prefix with make install; you've already given the path to configure.
It changes nothing. I've run the prefix command before without two hyphens and it worked. I still don't understand why I have this error
Unrelated but make install typically does not need any arguments (prefix was provided to the configure already). Most likely not a cause for failure.
Also if you need to specify prefix for make, it usually takes the form of an environment variable and so should be specified before the make command e.g.
So the error is still there. But it arrives only when I run
make install
. Is it necessary to tun it? I need to create the /usr/local/lib/pkgconfig but since I'm on a cluster, I cannot create this file. How should I go around this?What make install usually does is simply copying the compiled stuff to the installation location specified by prefix. There could be many reasons why make install doesn't find some files. One could be that some files were not included in the tarball or have the wrong permissions (check if the files exist and that you have the necessary permissions). Another possibility is a mistake in the make file and yet another could be a slow responding NFS mount if you're accessing your directory over NFS.
It may not be necessary to run
make install
since you would not be able to write to common program directories unless you have admin privileges.As long as the program compiled you can amend your $PATH to include the directories as needed. Make sure this path is accessible on the compute nodes if you were planning to use the cluster.
Write permissions shouldn't be an issue here since the OP seems to be installing in his $HOME. Although amending $PATH is a workaround, it could be risky if the software is broken (but it seems here it's about manpages not being found).
Out of curiosity even though I used
--prefix
for a local directory withconfigure
,make install
tried to create directories under/usr/local
(include/share/lib
) and failed.Then this is a bug in the makefile.
I made progress with this:
But I'm still having the same error!
What kind of progress ?
DESTDIR should be specified before make otherwise it's useless (make doesn't know about it since it is executed before DESTDIR is defined). Again, this should be completely unnecessary if configure got the right thing.
In fact writing
make install DESTDIR=…
and similar (with the assignment after the command) is perfectly normal, and is the best way to writeDESTDIR
in particular. Make parses its command line arguments that look likeVAR=VALUE
as overriding the value of$(VAR)
, and it's the most convenient way of setting a variable just for make.Good to know. Thanks.
I mean that the process is running a bit longer before I have the same error.
htsfile.1
andtabix.1
are not present in the folder...As @genomax2 reported above, it seems that make install ignores the prefix option given to configure. It may also ignore anything you give it on the command line. It could be there are other mistakes in the package like missing manpages. I would report this to the authors.