Closed tstraub89 closed 2 years ago
@tstraub89 I have encountered the same problem, could you tell me the detail of the solution? Where should I add the -lm?
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.
The same problem. I only added the -lm
to the first ${cxx} ${cflags} -O3 $< ${API} -o $@.tmp
line, and that is OK
I also found this helpful; it resolved my compilation error for mafTools. Thank you
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 to
log10'
sharedMaf.c:(.text+0x251a): undefined reference to log10' sharedMaf.c:(.text+0x2554): undefined reference to
log10'
collect2: error: ld returned 1 exit status
Makefile:24: recipe for target '../bin/mafExtractor' failed
make: *** [../bin/mafExtractor] Error 1
ran into the same problem. adding -lm doesn't help on two systems I tried
Hello, I've got this same problem. Is this program dead, or?
I received this error while making mafExtrator
I added
-lm
to the line compiling mafExtractor in the makefile for mafExtrator and that seemed to compile correctly.