GNOME Bugzilla – Bug 664439
Missing to link libm on the tools
Last modified: 2011-11-22 09:35:49 UTC
While building libgxps on openSUSE 12.1 / Factory, this build error appears: CCLD xpstops /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: ./.libs/libgxpstools.a(libgxpstools_la-gxps-converter.o): undefined reference to symbol 'ceil@@GLIBC_2.2.5' /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: note: 'ceil@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line /lib64/libm.so.6: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[2]: *** [xpstopng] Error 1 make[2]: *** Waiting for unfinished jobs.... /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: ./.libs/libgxpstools.a(libgxpstools_la-gxps-converter.o): undefined reference to symbol 'ceil@@GLIBC_2.2.5' /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: note: 'ceil@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line /lib64/libm.so.6: could not read symbols: Invalid operation collect2: ld returned 1 exit status /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: ./.libs/libgxpstools.a(libgxpstools_la-gxps-converter.o): undefined reference to symbol 'ceil@@GLIBC_2.2.5' /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: note: 'ceil@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line /lib64/libm.so.6: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[2]: *** [xpstojpeg] Error 1 make[2]: *** [xpstopdf] Error 1 /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: ./.libs/libgxpstools.a(libgxpstools_la-gxps-converter.o): undefined reference to symbol 'ceil@@GLIBC_2.2.5' /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: note: 'ceil@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line /lib64/libm.so.6: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[2]: *** [xpstosvg] Error 1 /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: ./.libs/libgxpstools.a(libgxpstools_la-gxps-converter.o): undefined reference to symbol 'ceil@@GLIBC_2.2.5' /usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: note: 'ceil@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line /lib64/libm.so.6: could not read symbols: Invalid operation collect2: ld returned 1 exit status make[2]: *** [xpstops] Error 1 make[2]: Leaving directory `/home/abuild/rpmbuild/BUILD/libgxps-0.2.0/tools'
Created attachment 201776 [details] [review] Add missing libm linking
I think you should use LT_LIB_M in configure.ac and then $(LIBM) in the Makefile.am .
Created attachment 201788 [details] [review] Thanks for the pointer! Much better indeed. Please see a 'rewrite' of the patch.
Review of attachment 201788 [details] [review]: Pushed! thank you very much.
(In reply to comment #2) > I think you should use LT_LIB_M in configure.ac and then $(LIBM) in the > Makefile.am . Thanks for the quick review :-)