ToniWestbrook / paladin

Protein Alignment and Detection Interface
MIT License
60 stars 7 forks source link

make fails #2

Closed macmanes closed 9 years ago

macmanes commented 9 years ago
macmanes@davinci:/share/paladin$ make
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  utils.c -o utils.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  kthread.c -o kthread.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  kstring.c -o kstring.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  ksw.c -o ksw.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  bwt.c -o bwt.o
bwt.c: In function ‘bwt_invPsi’:
bwt.c:56:2: warning: passing argument 1 of ‘unpackBWTValue’ discards ‘const’ qualifier from pointer target type [enabled by default]
  x = unpackBWTValue(bwt, x);
  ^
bwt.c:28:9: note: expected ‘struct bwt_t *’ but argument is of type ‘const struct bwt_t *’
 ubyte_t unpackBWTValue(bwt_t * passBWT, int passSeqIdx) {
         ^
bwt.c: In function ‘bwt_occ’:
bwt.c:132:2: warning: passing argument 1 of ‘getOccInterval’ discards ‘const’ qualifier from pointer target type [enabled by default]
  n = ((bwtint_t*)(p = getOccInterval(bwt, k)))[c];
  ^
bwt.c:18:12: note: expected ‘struct bwt_t *’ but argument is of type ‘const struct bwt_t *’
 uint32_t * getOccInterval(bwt_t * passBWT, bwtint_t passIndex) {
            ^
bwt.c: In function ‘bwt_2occ’:
bwt.c:161:3: warning: passing argument 1 of ‘getOccInterval’ discards ‘const’ qualifier from pointer target type [enabled by default]
   n = ((bwtint_t*)(p = getOccInterval(bwt, k)))[c];
   ^
bwt.c:18:12: note: expected ‘struct bwt_t *’ but argument is of type ‘const struct bwt_t *’
 uint32_t * getOccInterval(bwt_t * passBWT, bwtint_t passIndex) {
            ^
bwt.c: In function ‘bwt_occ4’:
bwt.c:195:2: warning: passing argument 1 of ‘getOccInterval’ discards ‘const’ qualifier from pointer target type [enabled by default]
  p = getOccInterval(bwt, k);
  ^
bwt.c:18:12: note: expected ‘struct bwt_t *’ but argument is of type ‘const struct bwt_t *’
 uint32_t * getOccInterval(bwt_t * passBWT, bwtint_t passIndex) {
            ^
bwt.c:204:3: warning: passing argument 1 of ‘unpackBWTValue’ discards ‘const’ qualifier from pointer target type [enabled by default]
   cnt[unpackBWTValue(bwt, k/128*128 + supercount)]++;
   ^
bwt.c:28:9: note: expected ‘struct bwt_t *’ but argument is of type ‘const struct bwt_t *’
 ubyte_t unpackBWTValue(bwt_t * passBWT, int passSeqIdx) {
         ^
bwt.c:205:3: warning: passing argument 1 of ‘unpackBWTValue’ discards ‘const’ qualifier from pointer target type [enabled by default]
   cnt[unpackBWTValue(bwt, k/128*128 + supercount+1)]++;
   ^
bwt.c:28:9: note: expected ‘struct bwt_t *’ but argument is of type ‘const struct bwt_t *’
 ubyte_t unpackBWTValue(bwt_t * passBWT, int passSeqIdx) {
         ^
bwt.c:206:3: warning: passing argument 1 of ‘unpackBWTValue’ discards ‘const’ qualifier from pointer target type [enabled by default]
   cnt[unpackBWTValue(bwt, k/128*128 + supercount+2)]++;
   ^
bwt.c:28:9: note: expected ‘struct bwt_t *’ but argument is of type ‘const struct bwt_t *’
 ubyte_t unpackBWTValue(bwt_t * passBWT, int passSeqIdx) {
         ^
bwt.c:207:3: warning: passing argument 1 of ‘unpackBWTValue’ discards ‘const’ qualifier from pointer target type [enabled by default]
   cnt[unpackBWTValue(bwt, k/128*128 + supercount+3)]++;
   ^
bwt.c:28:9: note: expected ‘struct bwt_t *’ but argument is of type ‘const struct bwt_t *’
 ubyte_t unpackBWTValue(bwt_t * passBWT, int passSeqIdx) {
         ^
bwt.c:214:3: warning: passing argument 1 of ‘unpackBWTValue’ discards ‘const’ qualifier from pointer target type [enabled by default]
   cnt[unpackBWTValue(bwt, k/128*128 + supercount++)]++;
   ^
bwt.c:28:9: note: expected ‘struct bwt_t *’ but argument is of type ‘const struct bwt_t *’
 ubyte_t unpackBWTValue(bwt_t * passBWT, int passSeqIdx) {
         ^
bwt.c:184:15: warning: unused variable ‘tmp’ [-Wunused-variable]
  uint32_t *p, tmp, *end;
               ^
bwt.c:183:11: warning: variable ‘x’ set but not used [-Wunused-but-set-variable]
  bwtint_t x;
           ^
bwt.c: In function ‘bwt_2occ4’:
bwt.c:222:15: warning: variable ‘_l’ set but not used [-Wunused-but-set-variable]
  bwtint_t _k, _l;
               ^
bwt.c:222:11: warning: variable ‘_k’ set but not used [-Wunused-but-set-variable]
  bwtint_t _k, _l;
           ^
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  bntseq.c -o bntseq.o
bntseq.c: In function ‘add1’:
bntseq.c:315:3: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   int c = (int) aa_encode_hash[seq->seq.s[i]];
   ^
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  bwa.c -o bwa.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  bwamem.c -o bwamem.o
bwamem.c: In function ‘mem_aln2sam’:
bwamem.c:931:3: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   for (i = qb; i < qe; ++i) str->s[str->l++] = aa_ascii_hash[s->seq[i]];
   ^
bwamem.c:946:3: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   for (i = qe-1; i >= qb; --i) str->s[str->l++] = aa_ascii_hash[s->seq[i]];
   ^
bwamem.c: In function ‘mem_reg2sam’:
bwamem.c:1037:9: warning: unused variable ‘uniprotEntry’ [-Wunused-variable]
  char * uniprotEntry;
         ^
bwamem.c:1035:12: warning: unused variable ‘parseIdx’ [-Wunused-variable]
  int k, l, parseIdx;
            ^
In file included from bwamem.c:19:0:
bwamem.c: At top level:
uniprot.h:17:22: warning: ‘uniprotEntryLists’ defined but not used [-Wunused-variable]
 static UniprotList * uniprotEntryLists = 0;
                      ^
uniprot.h:18:12: warning: ‘uniprotListCount’ defined but not used [-Wunused-variable]
 static int uniprotListCount = 0;
            ^
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  bwamem_pair.c -o bwamem_pair.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  bwamem_extra.c -o bwamem_extra.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  malloc_wrap.c -o malloc_wrap.o
ar -csru libbwa.a utils.o kthread.o kstring.o ksw.o bwt.o bntseq.o bwa.o bwamem.o bwamem_pair.o bwamem_extra.o malloc_wrap.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  is.c -o is.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  bwtindex.c -o bwtindex.o
bwtindex.c:23:6: error: conflicting types for ‘packValue’
 void packValue(bwt_t * passBWT, int64_t passSeqIdx, bwtint_t passValue) {
      ^
In file included from bwtindex.c:9:0:
bwtindex.h:10:6: note: previous declaration of ‘packValue’ was here
 void packValue(bwt_t * passBWT, int passSeqIdx, bwtint_t passValue);
      ^
bwtindex.c:31:9: error: conflicting types for ‘unpackValue’
 ubyte_t unpackValue(bwt_t * passBWT, int64_t passSeqIdx) {
         ^
In file included from bwtindex.c:9:0:
bwtindex.h:13:9: note: previous declaration of ‘unpackValue’ was here
 ubyte_t unpackValue(bwt_t * passBWT, int passSeqIdx);
         ^
bwtindex.c: In function ‘command_index’:
bwtindex.c:259:4: warning: implicit declaration of function ‘writeIndexTestProtein’ [-Wimplicit-function-declaration]
    writeIndexTestProtein(prefix, proName); break;
    ^
make: *** [bwtindex.o] Error 1
ToniWestbrook commented 9 years ago

Huh, that's an old header from way back when I was doing the 32->64bit conversion for the indexing (which is causing the mismatch). I must have missed uploading that to Github. I made a bunch of bug fixes today, but one of them broke something else, so as soon as I fix that thing I broke, I will make sure the repository has the latest copy of everything, and then let you know.

macmanes commented 9 years ago

Sorry @twestbrookunh, make still fails with pulling the latest build

>make
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  utils.c -o utils.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  kthread.c -o kthread.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  kstring.c -o kstring.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  ksw.c -o ksw.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  bwt.c -o bwt.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  bntseq.c -o bntseq.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  bwa.c -o bwa.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  bwamem.c -o bwamem.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  bwamem_pair.c -o bwamem_pair.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  bwamem_extra.c -o bwamem_extra.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  malloc_wrap.c -o malloc_wrap.o
ar -csru libbwa.a utils.o kthread.o kstring.o ksw.o bwt.o bntseq.o bwa.o bwamem.o bwamem_pair.o bwamem_extra.o malloc_wrap.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  is.c -o is.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  bwtindex.c -o bwtindex.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  kopen.c -o kopen.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  pemerge.c -o pemerge.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  align.c -o align.o
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  protein.c -o protein.o
protein.c: In function ‘getIndexHeader’:
protein.c:93:8: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
  fscanf(filePtr, ">NT=%d:MF=%d", &readNT, &readMF);
        ^
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  bwashm.c -o bwashm.o
bwashm.c: In function ‘bwa_shm_stage’:
bwashm.c:29:11: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  ftruncate(shmid, BWA_CTL_SIZE);
           ^
bwashm.c:66:11: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
  ftruncate(shmid, idx->l_mem);
           ^
gcc -c -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS  main.c -o main.o
gcc -g -Wall -Wno-unused-function -O2  -DHAVE_PTHREAD -DUSE_MALLOC_WRAPPERS is.o bwtindex.o kopen.o pemerge.o align.o protein.o bwashm.o main.o -o paladin -L. -lbwa -lm -lz -lpthread -lrt
align.o: In function `command_align':
/share/paladin/align.c:375: undefined reference to `renderUniprotReport'
./libbwa.a(bwamem.o): In function `mem_process_seqs':
/share/paladin/bwamem.c:1281: undefined reference to `addUniprotList'
collect2: error: ld returned 1 exit status
make: *** [paladin] Error 1
ToniWestbrook commented 9 years ago

Whoops, I had uploaded all the changed source files to the repository, but forgot to upload the updated Makefile. Just updated (I also cloned the repository back down to my desktop to check it and it appears to compile fine now - just make sure you have libcurl-dev installed). Thanks

macmanes commented 9 years ago

that worked! Thanks.