[Buildroot] [PATCH] gqview: Fix build failure due to missing -lm

Valentine Barshak gvaxon at gmail.com
Thu Oct 25 19:02:38 UTC 2012


On 10/25/2012 10:23 PM, Will Newton wrote:
> On Thu, Oct 25, 2012 at 6:25 PM, Valentine Barshak <gvaxon at gmail.com> wrote:
>> On 10/25/2012 01:02 PM, Will Newton wrote:
>>>
>>> On Wed, Oct 24, 2012 at 10:35 PM, Valentine Barshak <gvaxon at gmail.com>
>>> wrote:
>>>>
>>>> On 10/25/2012 12:51 AM, Will Newton wrote:
>>>>>
>>>>>
>>>>> On Wed, Oct 24, 2012 at 8:22 PM, Valentine Barshak <gvaxon at gmail.com>
>>>>> wrote:
>>>>>>
>>>>>>
>>>>>> On 10/07/2012 12:35 AM, Valentine Barshak wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Signed-off-by: Valentine Barshak <gvaxon at gmail.com>
>>>>>>> ---
>>>>>>>      package/gqview/gqview.mk | 1 +
>>>>>>>      1 file changed, 1 insertion(+)
>>>>>>>
>>>>>>> diff --git a/package/gqview/gqview.mk b/package/gqview/gqview.mk
>>>>>>> index 2f64cd0..7d09fda 100644
>>>>>>> --- a/package/gqview/gqview.mk
>>>>>>> +++ b/package/gqview/gqview.mk
>>>>>>> @@ -7,6 +7,7 @@ GQVIEW_VERSION = 2.1.5
>>>>>>>      GQVIEW_SOURCE = gqview-$(GQVIEW_VERSION).tar.gz
>>>>>>>      GQVIEW_SITE = http://prdownloads.sourceforge.net/gqview
>>>>>>>      GQVIEW_DEPENDENCIES = host-pkg-config libgtk2
>>>>>>> +GQVIEW_CONF_ENV = LIBS="-lm"
>>>>>>>
>>>>>>>      $(eval $(autotools-package))
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> Does this work for everyone else or is it just deprecated and nobody
>>>>>> should
>>>>>> use it?
>>>>>>
>>>>>> I can't build without -lm neither in BR nor using my native host tools.
>>>>>
>>>>>
>>>>>
>>>>> Which version of binutils are you using? 2.22?
>>>>>
>>>>
>>>> Yes, 2.22.
>>>
>>>
>>> I believe this is caused by an issue with linking indirectly with the
>>> newer binutils. gqview relies on a library that is linked against libm
>>> but does not explicitly link against libm itself. Before 2.22 binutils
>>> would copy the DT_NEEDED entries from the library into gqview but it
>>> does not do this any more.
>>
>>
>> gqview calls pow() and sqrt() directly, though it doesn't link against libm.
>>
>>
>>>
>>> A number of packages are affected by this. I believe the correct fix
>>> is to modify the affected packages to link against the libraries they
>>> use explicitly.
>>>
>>
>> Is the above patch OK?
>
> I think so, although it could do with a comment to say why it is
> needed. Peter or Thomas may disagree though?

I thought it was kind of obvious.

>
>> Or do you mean configure/makefile(.in) should be patched to add libm
>> dependency?
>
> That is the proper long term fix that should be pushed to gqview upstream.
>

Gqview is no longer supported. There's a Geeqie project that has been 
forked from gqview and is currently active.

I still use gqview since it has all the features I need and is smaller 
than geeqie. I also prefer gqview because it opens a window and shows
a "broken image" icon for unsupported image types, while geeqie doesn't 
create any window (even an error message box), which is a bit confusing.

Thanks,
Val.


More information about the buildroot mailing list