Question: BLAT installation *** No rule to make target '../lib//jkweb.a', needed by 'blat'
0
gravatar for marongiu.luigi
3 months ago by
Germany, Mannheim, UMM
marongiu.luigi140 wrote:

Dear all,

I am trying to install BLAT. As specified in the README file that accompanies the package I created the folder ~/bin/$MACHTYPE.

My MACHTYPE variable is

x86_64-pc-linux-gnu

which matches with the directory blatSrc/lib/x86_64 contained in BLAT. I added ~/bin/x86_64-pc-linux-gnu to the PATH. The BLAT directory (blatSrc) is in /usr/local/lib/ but when i ran the make command i got:

/usr/local/lib/blatSrc $ sudo make
cd lib && make
make[1]: Entering directory '/usr/local/lib/blatSrc/lib'
make[1]: '/jkweb.a' is up to date.
make[1]: Leaving directory '/usr/local/lib/blatSrc/lib'
cd jkOwnLib && make
make[1]: Entering directory '/usr/local/lib/blatSrc/jkOwnLib'
make[1]: '../lib//jkOwnLib.a' is up to date.
make[1]: Leaving directory '/usr/local/lib/blatSrc/jkOwnLib'
cd blat && make
make[1]: Entering directory '/usr/local/lib/blatSrc/blat'
make[1]: *** No rule to make target '../lib//jkweb.a', needed by 'blat'.  Stop.
make[1]: Leaving directory '/usr/local/lib/blatSrc/blat'
makefile:2: recipe for target 'all' failed
make: *** [all] Error 2

I found that MACHTYPE should not have dashes so I changed the folder to ~/bin/x86_64 (again in the PATH) and I ran:

MACHTYPE=x86_64
export $MACHTYPE

but I got the following:

 /usr/local/lib/blatSrc  $ sudo make
cd lib && make
make[1]: Entering directory '/usr/local/lib/blatSrc/lib'
make[1]: '/jkweb.a' is up to date.
make[1]: Leaving directory '/usr/local/lib/blatSrc/lib'
cd jkOwnLib && make
make[1]: Entering directory '/usr/local/lib/blatSrc/jkOwnLib'
make[1]: '../lib//jkOwnLib.a' is up to date.
make[1]: Leaving directory '/usr/local/lib/blatSrc/jkOwnLib'
cd blat && make
make[1]: Entering directory '/usr/local/lib/blatSrc/blat'
make[1]: *** No rule to make target '../lib//jkweb.a', needed by 'blat'.  Stop.
make[1]: Leaving directory '/usr/local/lib/blatSrc/blat'
makefile:2: recipe for target 'all' failed
make: *** [all] Error 2

Same thing if i do export MACTYPE. I also tried with make MACHTYPE=$MACHTYPE as reported, but same error.

Could you tell me what I am getting wrong?

Thank you

assembly software error • 434 views
ADD COMMENTlink modified 3 months ago • written 3 months ago by marongiu.luigi140

Does BLAT make call for a sudo? It is very uncommon for software to need sudo to make anything.

ADD REPLYlink written 3 months ago by Ram14k

I use sudo because of the privileged location /usr/... when building without privileges I sometimes got problems with writing permissions. anyhow even with make only I got the same error.

ADD REPLYlink written 3 months ago by marongiu.luigi140
1

You should never sudo make. If you have exported variables, they are not passed on through make because a new shell is opened for make targets. If you need to pass on variables through sudo, which might be the case for building and installing cpan modules globally, e.g. those that link against the kent-source tree containing jkweb.a, you can and have to do it like so:

sudo MACHTYPE=x86_64 cpan Bio::DB::SAM
or 
sudo -E cpan

but this is only for commands where you can't separate the build from the install process.

ADD REPLYlink modified 3 months ago • written 3 months ago by Michael Dondrup43k

If I don't sudo it, it won't even start; I would simply get the error:

make

 

cd lib && make
make[1]: Entering directory '/usr/local/lib/blatSrc/lib'
gcc -O -g  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DMACHTYPE_   -I../inc -I../../inc -I../../../inc -I../../../../inc -I../../../../../inc  -o aliType.o -c aliType.c
Assembler messages:
Fatal error: can't create aliType.o: Permission denied
../inc/common.mk:32: recipe for target 'aliType.o' failed
make[1]: *** [aliType.o] Error 1
make[1]: Leaving directory '/usr/local/lib/blatSrc/lib'
makefile:2: recipe for target 'all' failed
make: *** [all] Error 2

gcc is launched only with sudo

ADD REPLYlink modified 16 days ago by Ram14k • written 16 days ago by marongiu.luigi140

Did you get it running in the meantime? The reason for the error is that you ran make via sudo the first time you invoked it and all paths are now owned by 'root'.

ADD REPLYlink written 16 days ago by Michael Dondrup43k

This belongs in a comment, not as an answer. I'll move it to a comment now, but please be more cautious in the future and use the Add Comment or Add Reply (which you've used above) facilities.

ADD REPLYlink written 3 months ago by Ram14k
1
gravatar for Ram
3 months ago by
Ram14k
New York
Ram14k wrote:

Also, you may want to take a look at this: http://nix-bio.blogspot.com/2013/10/installing-blat-and-blast.html

ADD COMMENTlink written 3 months ago by Ram14k

Thank you, the link seems very good. This time i ran:

$ echo $MACHTYPE
x86_64-pc-linux-gnu
$ MACHTYPE=x86_64
$ export MACHTYPE
$ echo $MACHTYPE 
x86_64
$ export PATH=~/bin/x86_64::$PATH
$ make

and the following files are created in ~/bin/x86_64/

$ ls
blat     faToTwoBit  gfServer  pslPretty  pslSort     twoBitToFa
faToNib  gfClient    nibFrag   pslReps    twoBitInfo

I refreshed the PATH variable with source ~/.bashrc and then I ran

$ blat
blat - Standalone BLAT v. 35 fast sequence search command line tool

So I'd say the problem is solved. Thanks again.

ADD REPLYlink written 3 months ago by marongiu.luigi140

Great, glad to know.

If the answer was helpful, upvote it, if it resolved your question, mark it as accepted. Upvote|Bookmark|Accept

ADD REPLYlink written 3 months ago by Ram14k

Further on this. I tried to install BLAT on a new machine with Ubuntu 17.10 and I followed the same strategy outlined here. But I got several lines of gcc compilation with the ending:

...
gcc -O -g  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DMACHTYPE_   -I../inc -I../../inc -I../../../inc -I../../../../inc -I../../../../../inc  -o xensmall.o -c xensmall.c
ar rcus ../lib//jkOwnLib.a bandExt.o crudeali.o ffAliHelp.o ffSeedExtend.o fuzzyFind.o genoFind.o gfBlatLib.o gfClientLib.o gfInternal.o gfOut.o gfPcrLib.o gfWebLib.o ooc.o patSpace.o splix.o supStitch.o trans3.o xenbig.o xensmall.o 
ar: 'u' modifier ignored since 'D' is the default (see 'U')
make[1]: Leaving directory '/usr/local/lib/blatSrc/jkOwnLib'
cd blat && make
make[1]: Entering directory '/usr/local/lib/blatSrc/blat'
gcc -O -g  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DMACHTYPE_   -I../inc -I../../inc -I../../../inc -I../../../../inc -I../../../../../inc  -o blat.o -c blat.c
make[1]: *** No rule to make target '../lib//jkweb.a', needed by 'blat'. Stop.
make[1]: Leaving directory '/usr/local/lib/blatSrc/blat'
makefile:2: recipe for target 'all' failed
make: *** [all] Error 2

What went wrong this time?

ADD REPLYlink modified 16 days ago by Ram14k • written 16 days ago by marongiu.luigi140

I agree blat is hard to build because it doesn't use standard build chain configure; make; make install; , if possible you should maybe consider using something else or get some help locally. This time it looks like MACHTYPE is empty.

ADD REPLYlink written 16 days ago by Michael Dondrup43k

but I got: $ echo $MACHTYPE x86_64. Strange that worked in one computer and not in the twin one...

ADD REPLYlink written 16 days ago by marongiu.luigi140

did you try with sudo again?

ADD REPLYlink written 16 days ago by Michael Dondrup43k

yes, otherwise it does not compile (see update above)

ADD REPLYlink written 16 days ago by marongiu.luigi140

what about the fact that i told you not to do that? :/ try to remove the extracted folder using sudo if necessary, start from a fresh directory extracted into your home, and do not use sudo for make! The reason you needed that in the first place was that you tried to build the library in /usr/local/lib which is an absolute no-no. Always build and test new software in your home. you can then install them to the right location is necessary.

ADD REPLYlink modified 16 days ago • written 16 days ago by Michael Dondrup43k

sorry about that, I understood that /usr/local/lib is where to put all the customer's new software, thus I needed sudo to work (anyway I am the root of my own computer). I placed it on ~/ and looks like it compiled properly, now I get $ blat blat - Standalone BLAT v. 35 fast sequence search command line tool. If /usr/local/lib is the repository for customer software, how do I install in that folder?

Also, I have been now trying -- following your input -- to install the software in ~/src, a newly created folder that I will use to replace /usr/local/lib. While in the machine with the PATH pointing to /usr/local/lib the commands are running properly, the one with PATH pointing to ~/src is giving permission denied errors.

ADD REPLYlink modified 16 days ago • written 16 days ago by marongiu.luigi140

I think the error here is that the executables are not in /blatSrc but in ~/bin/x86_64; by inserting this path in .bashrc it works fine

ADD REPLYlink written 15 days ago by marongiu.luigi140

/usr/local/lib is for user installed libraries, and /usr/local/bin for binaries. I don't quite remember, doesn't kent source at least support a simple make install target? If not, you can use the unix command install like in sudo install -c ./blat /usr/local/bin or simply copy the file there.

ADD REPLYlink modified 15 days ago • written 15 days ago by Michael Dondrup43k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 754 users visited in the last hour