After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 606388 - mutter fails to build when using ld with --no-add-needed
mutter fails to build when using ld with --no-add-needed
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2010-01-08 10:13 UTC by Richard Hughes
Modified: 2010-02-16 21:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
new patch, please review (939 bytes, patch)
2010-02-04 10:06 UTC, Richard Hughes
committed Details | Review

Description Richard Hughes 2010-01-08 10:13:54 UTC
/usr/bin/ld.bfd: mutter-mag.31673.test: undefined reference to symbol 'rint@@GLIBC_2.0'
/usr/bin/ld.bfd: note: 'rint@@GLIBC_2.0' is defined in DSO /lib/libm.so.6 so try adding it to the linker command line
/lib/libm.so.6: could not read symbols: Invalid operation
*** /usr/bin/ld: ld behavior mismatch! ***
*** /usr/bin/ld.bfd succeeeded ***
*** /usr/bin/ld.bfd --no-add-needed exits 1 ***
*** arguments: --eh-frame-hdr --build-id -m elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 -o mutter-mag /usr/lib/gcc/i686-redhat-linux/4.4.2/../../../crt1.o /usr/lib/gcc/i686-redhat-linux/4.4.2/../../../crti.o /usr/lib/gcc/i686-redhat-linux/4.4.2/crtbegin.o -L/usr/lib/gcc/i686-redhat-linux/4.4.2 -L/usr/lib/gcc/i686-redhat-linux/4.4.2 -L/usr/lib/gcc/i686-redhat-linux/4.4.2/../../.. mutter-mag.o -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lSM -lICE -lX11 -lXext -lXinerama -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/i686-redhat-linux/4.4.2/crtend.o /usr/lib/gcc/i686-redhat-linux/4.4.2/../../../crtn.o
collect2: ld returned 1 exit status

Obvious fix is to append "-lm" to the end of the linker line in the Makefile, although I'm not sure -lm is portable to all UNIXs.

Richard.
Comment 1 Richard Hughes 2010-02-04 10:06:23 UTC
Created attachment 152993 [details] [review]
new patch, please review

This patch fixes the issue. Thanks.
Comment 2 Owen Taylor 2010-02-16 21:33:06 UTC
Looks harmless anyways.. thanks for the patch!