Closed karl616 closed 6 years ago
Did you already run make libs from top level kent source? What make were you running that generated this error?
Thanks,
Christopher Lee UCSC Genomics Institute
Also if you don't need to compile it yourself, you can download a pre-compiled version here: http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/
I used GNU Make 3.81 under Debian 7.11 and yes I followed the instructions in the README file, first compiling src/lib, then jkOwnLib and htslib. This was the first error I saw.
I saw the pre-compiled binaries. The reason I want to compile myself is to be able to track which release I'm using. It's a bit cumbersome, but the best I have at the moment.
I have the same problem trying to compile the packed archive of v357:
http://hgdownload.soe.ucsc.edu/admin/exe/userApps.v357.src.tgz
I am able to compile userApps.v309.src.tgz without problems.
Looks like htslib was not compiled before this was run.
You can go into the htslib directory and run "make" there. "make libs" or "make topLibs" in kent/src would also make all required libraries, including htslib.
The top-level targets "make" or "make userApps" or "make cgi" in kent/src will build the libraries first and then the tools.
How did you arrive at a situation where htslib was not compiled? What was the "make" command that you ran to get here?
Sorry if this overlaps with what Chris commented earlier, I didn't see that he replied.
htslib compiles without errors. IThe libhts.a file referred while building bamToPsl is there.
make libs
fails trying to enter the non-existing folder of optimalLeaf. make topLibs
finishes without error. Both these make commands only have targets in the src folder though. The targets in the htslib directory is missing.
As tried to describe above:
wget .../userApps.v357.src.tgz
tar xzf userApps.v357.src.tgz
cd userApps
make CFLAGS=-I<non-standard path to uuid-include> LDFLAGS=-L<non-standard path to uuid-libs>
This builds the libraries first and then fails to build bamToPsl
git clone .../kent.git
cd kent/src/lib
make CFLAGS=-I<non-standard path to uuid-include> LDFLAGS=-L<non-standard path to uuid-libs>
cd ../jkOwnLib
make CFLAGS=-I<non-standard path to uuid-include> LDFLAGS=-L<non-standard path to uuid-libs>
cd ../htslib
make CFLAGS=-I<non-standard path to uuid-include> LDFLAGS=-L<non-standard path to uuid-libs>
cd ../utils/bamToPsl
make CFLAGS=-I<non-standard path to uuid-include> LDFLAGS=-L<non-standard path to uuid-libs>
Again, returning the reported error when trying to compile bamToPsl
Good Morning Karl: I've been trying to reproduce your issue here. One thing to note, with the userApps.src.tgz source, the make target is 'userApps' as in: make userApps
, I believe we have never mentioned that in any README instructions.
The typical 'make libs' does not function with this userApps.src since the optimalLeaf directory is not included in that source. You would need the entire source tree for that.
I'm not sure what happens with the build when you set a CFLAGS and LDFLAGS on the command line. I don't know if src/inc/common.mk is aware of how to handle that.
If you want to use the download binaries and keep track of their version, place your
download binaries in a versioned directory, e.g.: kent357/
For your build, compare your compile output with this sequence from 'make' in src/utils/bamToPsl, I would be curious to see what yours looks like:
`gcc -O -g -Wall -Wformat -Wimplicit -Wreturn-type -Wuninitialized -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DMACHTYPE_x86_64 -Wall -Wformat -Wimplicit -Wreturn-type -Wuninitialized -I../inc -I../../inc -I../../../inc -I../../../../inc -I../../../../../inc -I../../htslib -I/include -I/usr/include/libpng12 -o bamToPsl.o -c bamToPsl.c
gcc -O -g -o /home/hiram/bin/x86_64/bamToPsl bamToPsl.o ../../lib/x86_64/jkweb.a -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -lz -lm -ldl -lstdc++ -lrt -lpthread -L/lib -lssl -lcrypto ../../htslib/libhts.a -L/usr/lib/x86_64-linux-gnu -lpng12 -lz -lm true /home/hiram/bin/x86_64/bamToPsl`
This assumes the kent/src libraries have already been built.
What is is your install location for uuid includes and libraries ? If it is a 'standard' location for Debian, perhaps I can get that into src/inc/common.mk for future Debian users.
I note your example gcc link line is remarkably void of the gcc options that I see when I run it ?
I have verified you can set CFLAGS and that will get into the compile. However LDFLAGS will not, to get something extra in the library link, use the variable: L
` export L="-L/path/to/uuid"
gcc -O -g -o /home/hiram/bin/x86_64/bamToPsl bamToPsl.o ../../lib/x86_64/jkweb.a -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -lz -lm -ldl -lstdc++ -lrt -L/path/to/uuid -lpthread -L/lib -lssl -lcrypto ../../htslib/libhts.a -L/usr/lib/x86_64-linux-gnu -lpng12 -lz -lm `
Sorry for the late reply. Other things came in between.
Only being an C end-user I don't see how the uuid path can be relevant here. I read the error as bamFile.c missing references to bam/cram specific functions, which I assume are located in htslib.
The "missing" gcc options are hidden behind the scroll bar. Copied it out below:
gcc -O -g -o /home/karln/bin/x86_64/bamToPsl bamToPsl.o ../../lib/x86_64/jkweb.a -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -lz -lm -lrt -ldl -lstdc++ -lrt -lpthread -L/lib -lssl -lcrypto ../../htslib/libhts.a -L/usr/lib/x86_64-linux-gnu -lpng12 -lz -lm
Anyhow, if this hasn't shown up elsewhere and you cannot repeat it, I would write it of as something system specific. I was able to compile the parts I needed.
I have problems compiling bamToPsl. Error output pasted at the end. I saw there were changes to htslib, could this have an impact here?
My target was v357, but I also tried to checkout the head of the repository and the problem persists.