[ 97%] Built target newmatlib
Linking CXX executable mixmod
/usr/bin/ld: cannot find -lm
collect2: ld returned 1 exit status
make[2]: *** [SRC/mixmod] Error 1
make[1]: *** [SRC/CMakeFiles/mixmod.dir/all] Error 2
make: *** [all] Error 2
This is due to the '-static' option passed to the linker. Indeed,
Mixmod 2.1.1 uses static libraries.
Swaping to dynamic library is fine and can be done easily by changing
the ./SRC/CMakeLists.txt file as follows:
##############################################"
--- SRC/CMakeLists.txt 2010-04-06 08:55:40.063337623 +0200
+++ SRC/CMakeLists-patch.txt 2010-04-06 08:56:19.577538936 +0200
@@ -4,13 +4,13 @@
ADD_EXECUTABLE(mixmod ${mixmod_src})
-TARGET_LINK_LIBRARIES(mixmod -static mixmodlib newmatlib)
+TARGET_LINK_LIBRARIES(mixmod mixmodlib newmatlib)
SET(test_src XEMTest.cpp)
ADD_EXECUTABLE(test ${test_src})
-TARGET_LINK_LIBRARIES(test -static mixmodlib newmatlib)
+TARGET_LINK_LIBRARIES(test mixmodlib newmatlib)
INSTALL(TARGETS mixmod test DESTINATION "BIN")
##############################################"