When I make Perl 5.10.1 I get some errors, I found some related threads that stated:
The error messages are from the linker, not from the compiler. You should get away by placing a
-lm
at the end of all compilation lines.
My Question is where are the compilation lines that I need to add -lm
to ?
miniperlmain.o opmini.o perlmini.o
pp.o: In function `Perl_pp_pow':
pp.c:(.text+0x2daf): undefined reference to `pow'
pp.o: In function `Perl_pp_modulo':
pp.c:(.text+0x39fc): undefined reference to `floor'
pp.c:(.text+0x3a28): undefined reference to `floor'
pp.c:(.text+0x3a51): undefined reference to `fmod'
pp.o: In function `Perl_pp_atan2':
pp.c:(.text+0x89c5): undefined reference to `atan2'
pp.o: In function `Perl_pp_sin':
pp.c:(.text+0x8b62): undefined reference to `sin'
pp.o: In function `Perl_pp_int':
pp.c:(.text+0x9021): undefined reference to `floor'
pp.c:(.text+0x9091): undefined reference to `ceil'
pp.o:(.rodata+0x120): undefined reference to `cos'
pp.o:(.rodata+0x128): undefined reference to `sin'
pp.o:(.rodata+0x130): undefined reference to `sin'
pp.o:(.rodata+0x138): undefined reference to `exp'
pp.o:(.rodata+0x140): undefined reference to `log'
pp.o:(.rodata+0x148): undefined reference to `sqrt'
pp_pack.o: In function `S_pack_rec':
pp_pack.c:(.text+0x72b3): undefined reference to `floor'
pp_pack.c:(.text+0x72d6): undefined reference to `floor'
pp_pack.c:(.text+0x7303): undefined reference to `floor'
collect2: error: ld returned 1 exit status
make: *** [miniperl] Error 1