setup.sh failed on ubuntu.
Closed this issue · 2 comments
shouldsee commented
#50-Ubuntu SMP Wed Mar 13 10:44:52 UTC 2019
Building cgpBigWig ...make: Entering directory '/tmp/temp/c'
clean
rm -f ./*.o *~ ../bin/bam2bedgraph ../bin/bam2bw ../bin/bg2bw ../bin/bam2bwbases ../bin/bwjoin ../bin/detectExtremeDepth ../bin/bwcat ./tests/tests_log ./c_tests/utils_tests ./*.gcda ./*.gcov ./*.gcno *.gcda *.gcov *.gcno ./c_tests/*.gcda ./c_tests/*.gcov ./c_tests/*.gcno
rm -rf ./htslib_tmp ../bin
make: Leaving directory '/tmp/temp/c'
make: Entering directory '/tmp/temp/c'
clean
rm -f ./*.o *~ ../bin/bam2bedgraph ../bin/bam2bw ../bin/bg2bw ../bin/bam2bwbases ../bin/bwjoin ../bin/detectExtremeDepth ../bin/bwcat ./tests/tests_log ./c_tests/utils_tests ./*.gcda ./*.gcov ./*.gcno *.gcda *.gcov *.gcno ./c_tests/*.gcda ./c_tests/*.gcov ./c_tests/*.gcno
rm -rf ./htslib_tmp ../bin
mkdir ../bin
mkdir ./htslib_tmp
#Do some magic to ensure we compile with the static libhts.a rather than libhts.so
ln -s /tmp/temp/install_tmp/htslib/libhts.a ./htslib_tmp/libhts.a
gcc -O3 -DVERSION='"1.0.4"' -g -Wall -I/tmp/include -I/tmp/temp/install_tmp/htslib/ -rdynamic -c bam_access.c -o bam_access.o
bam_access.c: In function ‘process_bam_region_bases’:
bam_access.c:329:9: warning: unused variable ‘contig’ [-Wunused-variable]
char *contig = parseRegionString(region, &start, &stop);
^~~~~~
bam_access.c: In function ‘process_bam_region’:
bam_access.c:439:9: warning: unused variable ‘contig’ [-Wunused-variable]
char *contig = parseRegionString(region, ®_sta, ®_sto);
^~~~~~
gcc -O3 -DVERSION='"1.0.4"' -g -Wall -I/tmp/include -I/tmp/temp/install_tmp/htslib/ -rdynamic -c utils.c -o utils.o
utils.c: In function ‘parse_file_name’:
utils.c:53:22: warning: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
memset(dir,0,sizeof(dir));
^
utils.c:54:24: warning: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
memset(fname,0,sizeof(fname));
^
utils.c: In function ‘parseRegionString’:
utils.c:103:41: warning: pointer targets in passing argument 2 of ‘hts_parse_reg’ differ in signedness [-Wpointer-sign]
const char *q = hts_parse_reg(region, start, stop);
^~~~~
In file included from /tmp/temp/install_tmp/htslib/htslib/sam.h:31:0,
from utils.c:36:
/tmp/temp/install_tmp/htslib/htslib/hts.h:664:13: note: expected ‘int *’ but argument is of type ‘uint32_t * {aka unsigned int *}’
const char *hts_parse_reg(const char *str, int *beg, int *end);
^~~~~~~~~~~~~
utils.c:103:48: warning: pointer targets in passing argument 3 of ‘hts_parse_reg’ differ in signedness [-Wpointer-sign]
const char *q = hts_parse_reg(region, start, stop);
^~~~
In file included from /tmp/temp/install_tmp/htslib/htslib/sam.h:31:0,
from utils.c:36:
/tmp/temp/install_tmp/htslib/htslib/hts.h:664:13: note: expected ‘int *’ but argument is of type ‘uint32_t * {aka unsigned int *}’
const char *hts_parse_reg(const char *str, int *beg, int *end);
^~~~~~~~~~~~~
gcc -O3 -DVERSION='"1.0.4"' -g -Wall -I/tmp/include -I/tmp/temp/install_tmp/htslib/ -rdynamic ./bam2bedgraph.c ./bam_access.o ./utils.o -L./htslib_tmp -lhts -lpthread -lz -lbz2 -llzma -lm -ldl -o ../bin/bam2bedgraph
./bam2bedgraph.c: In function ‘main’:
./bam2bedgraph.c:228:25: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
bw_func_reg func_reg = &pileup_func;
^
./bam2bedgraph.c:231:12: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
func_reg = &pileup_func_overlap;
^
gcc -O3 -DVERSION='"1.0.4"' -g -I/tmp/include -I/tmp/temp/install_tmp/htslib/ -rdynamic -Wall ./bam2bw.c ./bam_access.o ./utils.o -L./htslib_tmp -L/tmp/lib -lBigWig -lz -lbz2 -llzma -lcurl -lm -lgnutls -ltasn1 -lhogweed -lnettle -lgmp -lp11-kit -lhts -lpthread -lz -lbz2 -llzma -lm -ldl -o ../bin/bam2bw
./bam2bw.c: In function ‘main’:
./bam2bw.c:539:4: warning: ‘chromList’ may be used uninitialized in this function [-Wmaybe-uninitialized]
free(chromList);
^~~~~~~~~~~~~~~
/usr/bin/ld: cannot find -lgnutls
/usr/bin/ld: cannot find -ltasn1
/usr/bin/ld: cannot find -lhogweed
/usr/bin/ld: cannot find -lnettle
/usr/bin/ld: cannot find -lgmp
/usr/bin/ld: cannot find -lp11-kit
collect2: error: ld returned 1 exit status
make: *** [Makefile:98: ../bin/bam2bw] Error 1
make: Leaving directory '/tmp/temp/c'
keiranmraine commented
See required packages in INSTALL.md
shouldsee commented
@keiranmraine Installing libcurl4-gnutls-dev
does not resolve "-lgnutls", and there is no libgnutls-dev
available. The installed libgnutls.so.30
is somehow poorly linked
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
# apt list libgnutls-dev libcurl4-gnutls-dev
Listing... Done
libcurl4-gnutls-dev/bionic-updates,bionic-security 7.58.0-2ubuntu3.7 amd64
N: There is 1 additional version. Please use the '-a' switch to see it
## ld --verbose -lgnutls
attempt to open //usr/local/lib/x86_64-linux-gnu/libgnutls.so failed
attempt to open //usr/local/lib/x86_64-linux-gnu/libgnutls.a failed
attempt to open //lib/x86_64-linux-gnu/libgnutls.so failed
attempt to open //lib/x86_64-linux-gnu/libgnutls.a failed
attempt to open //usr/lib/x86_64-linux-gnu/libgnutls.so failed
attempt to open //usr/lib/x86_64-linux-gnu/libgnutls.a failed
attempt to open //usr/lib/x86_64-linux-gnu64/libgnutls.so failed
attempt to open //usr/lib/x86_64-linux-gnu64/libgnutls.a failed
attempt to open //usr/local/lib64/libgnutls.so failed
attempt to open //usr/local/lib64/libgnutls.a failed
attempt to open //lib64/libgnutls.so failed
attempt to open //lib64/libgnutls.a failed
attempt to open //usr/lib64/libgnutls.so failed
attempt to open //usr/lib64/libgnutls.a failed
attempt to open //usr/local/lib/libgnutls.so failed
attempt to open //usr/local/lib/libgnutls.a failed
attempt to open //lib/libgnutls.so failed
attempt to open //lib/libgnutls.a failed
attempt to open //usr/lib/libgnutls.so failed
attempt to open //usr/lib/libgnutls.a failed
attempt to open //usr/x86_64-linux-gnu/lib64/libgnutls.so failed
attempt to open //usr/x86_64-linux-gnu/lib64/libgnutls.a failed
attempt to open //usr/x86_64-linux-gnu/lib/libgnutls.so failed
attempt to open //usr/x86_64-linux-gnu/lib/libgnutls.a failed
In contrast, the full ld worked
ld --verbose -l:libgnutls.so.30
attempt to open //usr/lib/x86_64-linux-gnu/libgnutls.so.30 succeeded