BLAT installation *** No rule to make target '../lib//jkweb.a', needed by 'blat'
1
0
Entering edit mode
6.3 years ago

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 • 5.8k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
1
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
3
Entering edit mode
6.3 years ago
Ram 43k

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

ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

Great, glad to know.

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

did you try with sudo again?

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

/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 REPLY

Login before adding your answer.

Traffic: 2141 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