Installing Stacks on a cluster problem with Make install
1
0
Entering edit mode
7.7 years ago
beausoleilmo ▴ 580

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?

software error • 3.2k views
ADD COMMENT
2
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
1
Entering edit mode

Unrelated but make install typically does not need any arguments (prefix was provided to the configure already). Most likely not a cause for failure.

ADD REPLY
0
Entering edit mode

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.

PREFIX=$HOME/programs/stacks-1.42 make
ADD REPLY
0
Entering edit mode

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?

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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).

ADD REPLY
2
Entering edit mode

Out of curiosity even though I used --prefix for a local directory with configure, make install tried to create directories under /usr/local (include/share/lib) and failed.

ADD REPLY
1
Entering edit mode

Then this is a bug in the makefile.

ADD REPLY
0
Entering edit mode

I made progress with this:

make install DESTDIR=$HOME/programs/stacks-1.42

But I'm still having the same error!

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
1
Entering edit mode

In fact writing make install DESTDIR=… and similar (with the assignment after the command) is perfectly normal, and is the best way to write DESTDIR in particular. Make parses its command line arguments that look like VAR=VALUE as overriding the value of $(VAR), and it's the most convenient way of setting a variable just for make.

ADD REPLY
0
Entering edit mode

Good to know. Thanks.

ADD REPLY
0
Entering edit mode

I mean that the process is running a bit longer before I have the same error.

htsfile.1 and tabix.1 are not present in the folder...

 ls -al

-rwxr-xr-x 1 username xpa-194-01 1768808 Aug  8 14:05 bgzip
-rwxr-xr-x 1 username xpa-194-01 2104616 Aug  8 14:05 htsfile
-rwxr-xr-x 1 username xpa-194-01 2171920 Aug  8 14:05 tabix
ADD REPLY
1
Entering edit mode

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.

ADD REPLY
2
Entering edit mode
7.7 years ago

This is bug in Stacks's build system, which doesn't really want to be installing HTSlib. Stacks contains a copy of HTSlib and uses it (statically) to read BAM files, but its copy is incomplete — in particular, it doesn't include the manual pages, as you've found.

Ideally make install in the top-level directory would not run install in the htslib subdirectory, but it's not clear that this is possible with automake.

The quickest way to get this to work is to edit the install rule in stacks-1.42/htslib/Makefile (at about line 347), deleting the six $(INSTALL_foo) … lines. This will make install in the htslib subdirectory do nothing, as desired.

I see this HTSlib-using version of Stacks has only been released in the last few days. You should report this problem to the Stacks authors.

ADD COMMENT
0
Entering edit mode

I emailed the developers! Thanks, I've tried what you propose. This is what I deleted (line 348)

$(INSTALL_PROGRAM) $(BUILT_PROGRAMS) $(DESTDIR)$(bindir)
if test -n "$(BUILT_PLUGINS)"; then $(INSTALL_PROGRAM) $(BUILT_PLUGINS) $(DESTDIR)$(plugindir); fi
$(INSTALL_DATA) htslib/*.h $(DESTDIR)$(includedir)/htslib
$(INSTALL_DATA) libhts.a $(DESTDIR)$(libdir)/libhts.a
$(INSTALL_DATA) htsfile.1 tabix.1 $(DESTDIR)$(man1dir)
$(INSTALL_DATA) faidx.5 sam.5 vcf.5 $(DESTDIR)$(man5dir)

But I still get the same error.

ADD REPLY
0
Entering edit mode

Those are the right lines to remove. The error in your original posting comes from the $(INSTALL_DATA) htsfile.1 … line, so it would appear that you did not successfully delete them in the Makefile as saved in the directory.

Deleting them made make install from the top-level directory install Stacks correctly for me.

ADD REPLY

Login before adding your answer.

Traffic: 1953 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6