xfwm4 should link to -lm when using composite, as it needs a symbol from there. This currently works fine, but newer linkers will complain about this. It's also good practice as if composite stops depending on libm it would leave xfwm4 not working. See: https://fedoraproject.org/wiki/Features/ChangeInImplicitDSOLinking Small patch to fix this (Although you likely want to change it in Makefile.am or the like): diff -Nur xfwm4-4.6.1.orig/src/Makefile.in xfwm4-4.6.1/src/Makefile.in --- xfwm4-4.6.1.orig/src/Makefile.in 2009-04-15 01:59:55.000000000 -0600 +++ xfwm4-4.6.1/src/Makefile.in 2010-02-13 14:29:19.000000000 -0700 @@ -107,7 +107,7 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPOSITOR_CFLAGS = @COMPOSITOR_CFLAGS@ -COMPOSITOR_LIBS = @COMPOSITOR_LIBS@ +COMPOSITOR_LIBS = @COMPOSITOR_LIBS@ -lm CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@
Can you point me in what symbol used in xfwm4 compositor comes from libm? I suspect the requirement for libm comes instead from one of the libs that in which case -lm should be added in the LDFLAGS from the corresponding lib, and not in xfwm4. But I could be wrong, I might be missing the symbol used in my code which needs libm.
Sorry, I meant to include the symbol in any of these reports, but I failed here. ;( /usr/bin/ld: xfwm4-compositor.o: undefined reference to symbol 'exp@@GLIBC_2.2.5' /usr/bin/ld: note: 'exp@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line So, it looks like the compositor is using 'exp'.
(In reply to comment #2) > So, it looks like the compositor is using 'exp'. Oh yeah, right, that's exp(). thanks!
I builded latest git fine with -Wl,--no-add-needed.