LD Changes To Implicit DSO Linking Update

Parag N(पराग़) panemade at gmail.com
Tue Feb 9 17:39:50 UTC 2010

On Tue, Feb 9, 2010 at 9:14 PM, Roland Grunberg <rgrunber at redhat.com> wrote:
>>Most of the time upstream (myself included) just forgets to add a
>>library at the end of the LDADD line, so all I had to do was send a
>>trivial patch upstream to add "-lm" or something.
>>See here for an example:
> In fact most of the changes will probably involve a one line addition.
> As an example, galculator-1.3.4-2.fc12.src.rpm was found to be failing
> because libm is used but not explicitly linked.
> RPM build errors:
> /usr/bin/ld.bfd: math_functions.o: undefined reference to symbol 'sin@@GLIBC_2.0'
> /usr/bin/ld.bfd: note: 'sin@@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
> The following would fix this and allow the package to build.
> --- configure.in.old    2010-02-09 10:25:30.000000000 -0500
> +++ configure.in        2010-02-09 10:26:28.000000000 -0500
> @@ -16,6 +16,7 @@
>  PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
> +AC_CHECK_LIB(m, pow)
>  GETTEXT_PACKAGE=galculator
> There's an example at the bottom of the page :
> https://fedoraproject.org/wiki/UnderstandingDSOLinkChange
> demonstrating what a failed build message would look like,
> and how to go about fixing the issue.

 Anyway I find adding missing DSO to CFLAGS in SPEC is easy solution for now.


More information about the devel mailing list