GNOME Bugzilla – Bug 657529
Build failure
Last modified: 2011-08-29 21:19:53 UTC
Clutter fails to build here today, with make[3]: Entering directory `/home/mclasen/Sources/clutter/tests/interactive' CCLD test-interactive /usr/bin/ld: test_interactive-test-cogl-vertex-buffer.o: undefined reference to symbol 'sinf@@GLIBC_2.2.5' /usr/bin/ld: note: 'sinf@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line
and CCLD test-picking /usr/bin/ld: test-picking.o: undefined reference to symbol 'fmod@@GLIBC_2.2.5' /usr/bin/ld: note: 'fmod@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line
thanks, should be fixed in master.
Clutter itself uses symbols from libm, not just tests, example: $ grep tanf clutter/*.c clutter/clutter-stage.c: return z_near * tanf (30.0f * _DEG_TO_RAD) * clutter/clutter-stage.c: tanf ((perspective.fovy / 2.0f) * _DEG_TO_RAD) * z_2d * 20.0f; A fix would be to add -lm to all flavours (but I don't know enough about the usage of "flavours" to be sure this is the right fix). -FLAVOUR_LIBS="" +FLAVOUR_LIBS="-lm"
pushed this commit: commit 96810e1d4d07dc75e9622f352674885977c34e60 Author: Emmanuele Bassi <ebassi@gnome.org> Date: Mon Aug 29 22:17:53 2011 +0100 build: Add -lm to clutter's LIBADD rule We need to explicitly link against libm when building Clutter, since we use libm API. https://bugzilla.gnome.org/show_bug.cgi?id=657529 to master, which should hopefully fix the issue.