vsbuffalo/scythe — pull request #8 by mylons (2012-11-07 13:01:34+00:00)
Title: Possible Makefile linux compatibility issue

I was getting these linking errors on a fresh checkout of the repo

gcc -Wall -pedantic -DVERSION=0.981 -std=gnu99 -lz -lm match.o scythe.o util.o prob.o -o scythe
scythe.o: In function `ks_getc':
scythe.c:(.text+0x18a): undefined reference to `gzread'
scythe.o: In function `ks_getuntil':
scythe.c:(.text+0x289): undefined reference to `gzread'
scythe.o: In function `main':
scythe.c:(.text+0xc4b): undefined reference to `gzopen'
scythe.c:(.text+0x1024): undefined reference to `gzclose'
scythe.c:(.text+0x1044): undefined reference to `gzopen'
scythe.c:(.text+0x151a): undefined reference to `gzclose'
util.o: In function `ks_getc':
util.c:(.text+0x18a): undefined reference to `gzread'
util.o: In function `ks_getuntil':
util.c:(.text+0x289): undefined reference to `gzread'
prob.o: In function `qual_to_probs':
prob.c:(.text+0x129): undefined reference to `powf'
prob.c:(.text+0x1a8): undefined reference to `powf'
collect2: ld returned 1 exit status
make: *** [build] Error 1

Comments in this thread led me to this solution: moving the $(LDFLAGS) after the
sources ensures some linux compatibility

http://stackoverflow.com/questions/9145177/undefined-reference-to-gzopen-error