dentearl / mafTools

Bioinformatics tools for dealing with Multiple Alignment Format (MAF) files.
Other
104 stars 32 forks source link

Error compiling mafExtrator #16

Closed tstraub89 closed 2 years ago

tstraub89 commented 7 years ago

I received this error while making mafExtrator

gcc -std=c99 -Wno-unused-but-set-variable -O3 -Wall -Werror --pedantic -funroll-loops -DNDEBUG -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -I ../../sonLib/lib -I ../inc -I ../external  -O3 src/mafExtractor.c ../lib/common.o ../lib/sharedMaf.o ../external/CuTest.a src/mafExtractorAPI.o src/buildVersion.o -o ../bin/mafExtractor.tmp
../lib/sharedMaf.o: In function `maf_mafBlock_print':
sharedMaf.c:(.text+0x2406): undefined reference to `log10'
sharedMaf.c:(.text+0x2435): undefined reference to `log10'
sharedMaf.c:(.text+0x2464): undefined reference to `log10'
collect2: error: ld returned 1 exit status
make: *** [../bin/mafExtractor] Error 1

I added -lm to the line compiling mafExtractor in the makefile for mafExtrator and that seemed to compile correctly.

conniecl commented 6 years ago

@tstraub89 I have encountered the same problem, could you tell me the detail of the solution? Where should I add the -lm?

tstraub89 commented 6 years ago

For the Makefile in mafExtractor directory, at each line where you see ${cxx} I added -lm just afterwards. E.g. line 22: ${cxx} ${cflags} -O3 $< ${API} -o $@.tmp becomes ${cxx} -lm ${cflags} -O3 $< ${API} -o $@.tmp

Lines 22, 31, and 60 were the lines that I added -lm to.

Secretloong commented 6 years ago

The same problem. I only added the -lm to the first ${cxx} ${cflags} -O3 $< ${API} -o $@.tmp line, and that is OK

sknaack commented 5 years ago

I also found this helpful; it resolved my compilation error for mafTools. Thank you

sorrywm commented 5 years ago

I've tried adding -lm to every line with ${cxx}, and mine still is failing to compile, with the following errors (makefile attached): mkdir -p ../bin/ gcc -std=c99 -Wno-unused-but-set-variable -lm -O3 -Wall -Werror --pedantic -funroll-loops -DNDEBUG -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -I ../../sonLib/lib -I ../inc -I ../external -O3 src/mafExtractor.c ../lib/common.o ../lib/sharedMaf.o ../external/CuTest.a src/mafExtractorAPI.o src/buildVersion.o -o ../bin/mafExtractor.tmp ../lib/sharedMaf.o: In function maf_mafBlock_print': sharedMaf.c:(.text+0x24e0): undefined reference tolog10' sharedMaf.c:(.text+0x251a): undefined reference to log10' sharedMaf.c:(.text+0x2554): undefined reference tolog10' collect2: error: ld returned 1 exit status Makefile:24: recipe for target '../bin/mafExtractor' failed make: *** [../bin/mafExtractor] Error 1

Makefile.txt

jodyhey commented 3 years ago

ran into the same problem. adding -lm doesn't help on two systems I tried

bioinfowheat commented 2 years ago

Hello, I've got this same problem. Is this program dead, or?