SeqPrep icon indicating copy to clipboard operation
SeqPrep copied to clipboard

Compiler error on Ubuntu -

Open conchoecia opened this issue 10 years ago • 2 comments

I'm getting weird compiler errors where functions are "declared but never defined"!

System info

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 15.10
Release:    15.10
Codename:   wily
make
gcc -std=gnu11 -c -Wall -O0 -g SeqPrep.c -o SeqPrep.o
SeqPrep.c: In function ‘main’:
SeqPrep.c:107:8: warning: variable ‘print_overhang’ set but not used [-Wunused-but-set-variable]
   bool print_overhang = false;
        ^
In file included from SeqPrep.c:10:0:
SeqPrep.c: At top level:
utils.h:80:20: warning: inline function ‘rev_qual’ declared but never defined
 extern inline void rev_qual( char q[], int len );
                    ^
utils.h:79:20: warning: inline function ‘revcom_char’ declared but never defined
 extern inline char revcom_char(const char base);
                    ^
utils.h:63:20: warning: inline function ‘f_r_id_check’ declared but never defined
 extern inline bool f_r_id_check( char fid[], size_t fid_len, char rid[], size_t rid_len );
                    ^
utils.h:62:19: warning: inline function ‘write_fastq’ declared but never defined
 extern inline int write_fastq(gzFile out, char id[], char seq[], char qual[]);
                   ^
utils.h:61:20: warning: inline function ‘next_fastqs’ declared but never defined
 extern inline bool next_fastqs( gzFile ffq, gzFile rfq, SQP curr_sqp, bool p64 );
                    ^
utils.h:49:20: warning: inline function ‘match_p33_merge’ declared but never defined
 extern inline char match_p33_merge(char pA, char pB);
                    ^
utils.h:48:20: warning: inline function ‘mismatch_p33_merge’ declared but never defined
 extern inline char mismatch_p33_merge(char pA, char pB);
                    ^
SeqPrep.c:81:23: warning: ‘spcount’ defined but not used [-Wunused-variable]
 static unsigned short spcount = 0;
                       ^
gcc -std=gnu11 -c -Wall -O0 -g utils.c -o utils.o
gcc -std=gnu11 -c -Wall -O0 -g stdaln.c -o stdaln.o
stdaln.c: In function ‘aln_local_core’:
stdaln.c:548:25: warning: variable ‘b’ set but not used [-Wunused-but-set-variable]
  int gap_open, gap_ext, b;
                         ^
stdaln.c: In function ‘aln_extend_core’:
stdaln.c:868:16: warning: variable ‘tmp_len’ set but not used [-Wunused-but-set-variable]
  int q, r, qr, tmp_len;
                ^
gcc -std=gnu11 SeqPrep.o utils.o stdaln.o -lz -lm -o SeqPrep
utils.o: In function `fill_merged_sequence':
/usr/local/bin/SeqPrep-1.1/utils.c:298: undefined reference to `gap_p33_qual'
/usr/local/bin/SeqPrep-1.1/utils.c:322: undefined reference to `gap_p33_qual'
collect2: error: ld returned 1 exit status
Makefile:13: recipe for target 'SeqPrep' failed
make: *** [SeqPrep] Error 1

I deleted your spinner progress bar function and the lines that called it, since it seemed like it was generating errors for other people.

Any ideas? I'm at UCSC too!

conchoecia avatar Feb 17 '16 20:02 conchoecia

After giving up with editing the Makefile, the SeqPrep.c file, and the utils.h file, I pulled the latest version of the repo (commit 488ef06).

I didn't edit anything, ran make, and here is the resulting output.

make
cc  -c -Wall -O0 -g SeqPrep.c -o SeqPrep.o
SeqPrep.c: In function ‘main’:
SeqPrep.c:137:8: warning: variable ‘print_overhang’ set but not used [-Wunused-but-set-variable]
   bool print_overhang = false;
        ^
cc  -c -Wall -O0 -g utils.c -o utils.o
cc  -c -Wall -O0 -g stdaln.c -o stdaln.o
stdaln.c: In function ‘aln_local_core’:
stdaln.c:548:25: warning: variable ‘b’ set but not used [-Wunused-but-set-variable]
  int gap_open, gap_ext, b;
                         ^
stdaln.c: In function ‘aln_extend_core’:
stdaln.c:868:16: warning: variable ‘tmp_len’ set but not used [-Wunused-but-set-variable]
  int q, r, qr, tmp_len;
                ^
cc  SeqPrep.o utils.o stdaln.o -lz -lm -o SeqPrep

conchoecia avatar Feb 17 '16 23:02 conchoecia

Cool! So it's working now?

jstjohn avatar Oct 04 '16 20:10 jstjohn