sagnikbanerjee15/Abridge

Error during compilation

sagnikbanerjee15 opened this issue · 0 comments

Hello Nathan,

I have tried to implement the compilation strategy you laid out. But there seems to be an issue with linking the modules properly. You can find the docker image for ABRIDGE here https://github.com/sagnikbanerjee15/dockerized_tools_and_pipelines/tree/main/abridge/1.1.0

The make and installation for htslib works without any glitches but not for abridge
I keep getting the following error:

gcc -Ofast -g -Isubmodules/htslib -fvisibility=hidden -fpic -c -Wall   -c -o src/compute_information_for_better_memory_management.o src/compute_information_for_better_memory_management.c
src/compute_information_for_better_memory_management.c: In function 'findMaximumNumberOfReadsMappedToOneNucleotide':
src/compute_information_for_better_memory_management.c:124:13: warning: unused variable 'aln' [-Wunused-variable]
  124 |     bam1_t *aln = bam_init1(); // initialize an alignment
      |             ^~~
src/compute_information_for_better_memory_management.c:123:16: warning: variable 'bamHdr' set but not used [-Wunused-but-set-variable]
  123 |     bam_hdr_t *bamHdr;         // read header
      |                ^~~~~~
src/compute_information_for_better_memory_management.c:113:43: warning: variable 'curr_value' set but not used [-Wunused-but-set-variable]
  113 |     unsigned long long int curr_position, curr_value;
      |                                           ^~~~~~~~~~
src/compute_information_for_better_memory_management.c:108:9: warning: variable 'number_of_fields' set but not used [-Wunused-but-set-variable]
  108 |     int number_of_fields;
      |         ^~~~~~~~~~~~~~~~
src/compute_information_for_better_memory_management.c:107:15: warning: unused variable 'k' [-Wunused-variable]
  107 |     int i, j, k;
      |               ^
src/compute_information_for_better_memory_management.c:107:12: warning: unused variable 'j' [-Wunused-variable]
  107 |     int i, j, k;
      |            ^
In file included from src/compute_information_for_better_memory_management.c:9:
src/function_definitions.h: In function 'convertUnsignedIntegerToString':
src/function_definitions.h:226:1: warning: control reaches end of non-void function [-Wreturn-type]
  226 | }
      | ^
src/compute_information_for_better_memory_management.c: In function 'findMaximumNumberOfReadsMappedToOneNucleotide':
src/compute_information_for_better_memory_management.c:193:24: warning: 'fhr' may be used uninitialized in this function [-Wmaybe-uninitialized]
  193 |     while ((line_len = getline(&line, &len, fhr)) != -1)
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
gcc -Lsubmodules/htslib -Wl,-rpath=/software/abridge/Abridge/submodules/htslib -lhts  src/compute_information_for_better_memory_management.o   -o src/compute_information_for_better_memory_management
/usr/bin/ld: src/compute_information_for_better_memory_management.o: in function `findMaximumNumberOfReadsMappedToOneNucleotide':
/software/abridge/Abridge/src/compute_information_for_better_memory_management.c:124: undefined reference to `bam_init1'
/usr/bin/ld: /software/abridge/Abridge/src/compute_information_for_better_memory_management.c:150: undefined reference to `hts_open'
/usr/bin/ld: /software/abridge/Abridge/src/compute_information_for_better_memory_management.c:151: undefined reference to `sam_hdr_read'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: src/compute_information_for_better_memory_management] Error 1
rm src/compute_information_for_better_memory_management.o

Could you please look into it?

Thank you.