#28 Compile fails due to lack of -lm flag

open
nobody
None
5
2006-03-20
2006-03-20
Greg Kochanski
No

When building pympi on the head node of a beowulf
cluster, ./configure seems to run perfectly,
but when I run make, it terminates with many errors
in the linking stage. All the errors are things
like this:

/users/gpk/local/lib/python2.4/config/libpython2.4.a(complexobject.o)(.text+0x29cd):Objects/complexobject.c:140:
undefined reference to `pow'
/users/gpk/local/lib/python2.4/config/libpython2.4.a(complexobject.o)(.text+0x29e4):Objects/complexobject.c:141:
undefined reference to `atan2'

The failing step of the make is the following:

/opt/score/bin/mpicc -g -O2 -g -O2 -o pyMPI pyMPI.o
-L. libpyMPI.a -lm
-L/users/gpk/local/lib/python2.4/config -lpython2.4
-Xlinker -export-dynamic -lpthread -ldl -lutil

and it runs to completion when I add "-lm" to the end.

I attach the config.log

Discussion